@ddict/popup 1.2.1 → 1.3.0
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 +662 -624
- package/dist/popup.umd.js +8 -8
- package/package.json +1 -1
package/dist/popup.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
const y2 = "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", w2 = "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", _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%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", 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%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", 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='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", O2 = { 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 v2, watch as N, triggerRef as ut, onScopeDispose as tt, ref as $, onUnmounted as nt, inject as Te, watchEffect as re, onMounted as ve, cloneVNode as $t, h as Ee, Fragment as G, defineComponent as ue, provide as ot, reactive as It, nextTick as oe, toRaw as ee, effectScope as Tt, markRaw as fe, hasInjectionContext as h2, getCurrentInstance as Lt, isRef as ye, isReactive as lt, toRef as Ge, getCurrentScope as Mt, toRefs as ct, mergeModels as m2, useModel as b2, createBlock as q, withCtx as ke, createVNode as B, renderList as te, normalizeClass as j, toDisplayString as K, createCommentVNode as H, withModifiers as dt, createTextVNode as g2, withDirectives as kt, vModelText as At, pushScopeId as C2, popScopeId as x2 } from "vue";
|
|
2
|
+
const y2 = "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", w2 = "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", _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%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", 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%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", 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='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", O2 = { class: "flex justify-between" }, $2 = /* @__PURE__ */ v("div", { class: "flex flex-row" }, [
|
|
3
3
|
/* @__PURE__ */ v("img", {
|
|
4
4
|
src: y2,
|
|
5
5
|
alt: "Vue logo",
|
|
6
6
|
class: "w-24"
|
|
7
7
|
})
|
|
8
|
-
], -1),
|
|
8
|
+
], -1), I2 = { class: "flex" }, T2 = {
|
|
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
11
|
}, L2 = /* @__PURE__ */ v("img", {
|
|
@@ -14,15 +14,15 @@ const y2 = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%20
|
|
|
14
14
|
class: "w-7"
|
|
15
15
|
}, null, -1), M2 = [
|
|
16
16
|
L2
|
|
17
|
-
],
|
|
17
|
+
], k2 = {
|
|
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
|
-
},
|
|
20
|
+
}, A2 = /* @__PURE__ */ v("img", {
|
|
21
21
|
src: _2,
|
|
22
22
|
alt: "Reader",
|
|
23
23
|
class: "w-7"
|
|
24
|
-
}, null, -1),
|
|
25
|
-
|
|
24
|
+
}, null, -1), V2 = [
|
|
25
|
+
A2
|
|
26
26
|
], F2 = {
|
|
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"
|
|
@@ -46,20 +46,20 @@ const y2 = "data:image/svg+xml,%3csvg%20width='96'%20height='32'%20viewBox='0%20
|
|
|
46
46
|
emits: ["settings", "fullScreen", "reader", "starList"],
|
|
47
47
|
setup(e, { emit: o }) {
|
|
48
48
|
const t = o;
|
|
49
|
-
return (n, l) => (
|
|
50
|
-
|
|
51
|
-
v("div",
|
|
49
|
+
return (n, l) => (m(), O("div", O2, [
|
|
50
|
+
$2,
|
|
51
|
+
v("div", I2, [
|
|
52
52
|
v("div", T2, [
|
|
53
53
|
v("button", {
|
|
54
54
|
class: "btn btn-ghost btn-circle",
|
|
55
55
|
onClick: l[0] || (l[0] = (a) => t("starList"))
|
|
56
56
|
}, M2)
|
|
57
57
|
]),
|
|
58
|
-
v("div",
|
|
58
|
+
v("div", k2, [
|
|
59
59
|
v("button", {
|
|
60
60
|
class: "btn btn-ghost btn-circle",
|
|
61
61
|
onClick: l[1] || (l[1] = (a) => t("reader"))
|
|
62
|
-
},
|
|
62
|
+
}, V2)
|
|
63
63
|
]),
|
|
64
64
|
v("div", F2, [
|
|
65
65
|
v("button", {
|
|
@@ -84,18 +84,18 @@ function we(e, o, t) {
|
|
|
84
84
|
let u;
|
|
85
85
|
t.key && ((a = t.debug) != null && a.call(t)) && (u = Date.now());
|
|
86
86
|
const c = e();
|
|
87
|
-
if (!(c.length !== n.length || c.some((w,
|
|
87
|
+
if (!(c.length !== n.length || c.some((w, b) => n[b] !== w)))
|
|
88
88
|
return l;
|
|
89
89
|
n = c;
|
|
90
|
-
let
|
|
91
|
-
if (t.key && ((i = t.debug) != null && i.call(t)) && (
|
|
92
|
-
const w = Math.round((Date.now() - u) * 100) / 100,
|
|
90
|
+
let g;
|
|
91
|
+
if (t.key && ((i = t.debug) != null && i.call(t)) && (g = Date.now()), l = o(...c), t.key && ((s = t.debug) != null && s.call(t))) {
|
|
92
|
+
const w = Math.round((Date.now() - u) * 100) / 100, b = Math.round((Date.now() - g) * 100) / 100, _ = b / 16, P = (I, x) => {
|
|
93
93
|
for (I = String(I); I.length < x; )
|
|
94
94
|
I = " " + I;
|
|
95
95
|
return I;
|
|
96
96
|
};
|
|
97
97
|
console.info(
|
|
98
|
-
`%c⏱ ${P(
|
|
98
|
+
`%c⏱ ${P(b, 5)} /${P(w, 5)} ms`,
|
|
99
99
|
`
|
|
100
100
|
font-size: .6rem;
|
|
101
101
|
font-weight: bold;
|
|
@@ -325,8 +325,8 @@ class Y2 {
|
|
|
325
325
|
this.pendingMeasuredCacheIndexes = [];
|
|
326
326
|
const c = this.measurementsCache.slice(0, u);
|
|
327
327
|
for (let p = u; p < t; p++) {
|
|
328
|
-
let
|
|
329
|
-
|
|
328
|
+
let g = (r = this.measurementsCache[p]) == null ? void 0 : r.measureElement;
|
|
329
|
+
g || (g = (R) => {
|
|
330
330
|
const y = a(p), M = this.elementsCache.get(y);
|
|
331
331
|
if (!R) {
|
|
332
332
|
M && (this.observer.unobserve(M), this.elementsCache.delete(y));
|
|
@@ -337,15 +337,15 @@ class Y2 {
|
|
|
337
337
|
this.options.measureElement(R, void 0, this)
|
|
338
338
|
);
|
|
339
339
|
});
|
|
340
|
-
const w = a(p),
|
|
340
|
+
const w = a(p), b = this.options.lanes === 1 ? c[p - 1] : this.getFurthestMeasurement(c, p), _ = b ? b.end + this.options.gap : n + l, P = s.get(w), I = typeof P == "number" ? P : this.options.estimateSize(p), x = _ + I, A = b ? b.lane : p % this.options.lanes;
|
|
341
341
|
c[p] = {
|
|
342
342
|
index: p,
|
|
343
343
|
start: _,
|
|
344
344
|
size: I,
|
|
345
345
|
end: x,
|
|
346
346
|
key: w,
|
|
347
|
-
lane:
|
|
348
|
-
measureElement:
|
|
347
|
+
lane: A,
|
|
348
|
+
measureElement: g
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
351
|
return this.measurementsCache = c, c;
|
|
@@ -426,7 +426,7 @@ class Y2 {
|
|
|
426
426
|
const n = this.getMeasurements();
|
|
427
427
|
if (n.length !== 0)
|
|
428
428
|
return qe(
|
|
429
|
-
n[
|
|
429
|
+
n[Vt(
|
|
430
430
|
0,
|
|
431
431
|
n.length - 1,
|
|
432
432
|
(l) => qe(n[l]).start,
|
|
@@ -505,7 +505,7 @@ class Y2 {
|
|
|
505
505
|
}, this.setOptions(o);
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
|
-
const
|
|
508
|
+
const Vt = (e, o, t, n) => {
|
|
509
509
|
for (; e <= o; ) {
|
|
510
510
|
const l = (e + o) / 2 | 0, a = t(l);
|
|
511
511
|
if (a < n)
|
|
@@ -522,7 +522,7 @@ function Q2({
|
|
|
522
522
|
outerSize: o,
|
|
523
523
|
scrollOffset: t
|
|
524
524
|
}) {
|
|
525
|
-
const n = e.length - 1, a =
|
|
525
|
+
const n = e.length - 1, a = Vt(0, n, (s) => e[s].start, t);
|
|
526
526
|
let i = a;
|
|
527
527
|
for (; i < n && e[i].end < t + o; )
|
|
528
528
|
i++;
|
|
@@ -530,7 +530,7 @@ function Q2({
|
|
|
530
530
|
}
|
|
531
531
|
function X2(e) {
|
|
532
532
|
const o = new Y2(L(e)), t = v2(o), n = o._didMount();
|
|
533
|
-
return
|
|
533
|
+
return N(
|
|
534
534
|
() => L(e).getScrollElement(),
|
|
535
535
|
(l) => {
|
|
536
536
|
l && o._willUpdate();
|
|
@@ -538,7 +538,7 @@ function X2(e) {
|
|
|
538
538
|
{
|
|
539
539
|
immediate: !0
|
|
540
540
|
}
|
|
541
|
-
),
|
|
541
|
+
), N(
|
|
542
542
|
() => L(e),
|
|
543
543
|
(l) => {
|
|
544
544
|
o.setOptions({
|
|
@@ -627,7 +627,7 @@ let s0 = Symbol("headlessui.useid"), a0 = 0;
|
|
|
627
627
|
function Le() {
|
|
628
628
|
return Te(s0, () => `${++a0}`)();
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function V(e) {
|
|
631
631
|
var o;
|
|
632
632
|
if (e == null || e.value == null) return null;
|
|
633
633
|
let t = (o = e.value.$el) != null ? o : e.value;
|
|
@@ -669,7 +669,7 @@ function at(e) {
|
|
|
669
669
|
if (st.isServer) return null;
|
|
670
670
|
if (e instanceof Node) return e.ownerDocument;
|
|
671
671
|
if (e != null && e.hasOwnProperty("value")) {
|
|
672
|
-
let o =
|
|
672
|
+
let o = V(e);
|
|
673
673
|
if (o) return o.ownerDocument;
|
|
674
674
|
}
|
|
675
675
|
return document;
|
|
@@ -712,7 +712,7 @@ function b0() {
|
|
|
712
712
|
function Pt() {
|
|
713
713
|
return m0() || b0();
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function Ae(e, o, t) {
|
|
716
716
|
st.isServer || re((n) => {
|
|
717
717
|
document.addEventListener(e, o, t), n(() => document.removeEventListener(e, o, t));
|
|
718
718
|
});
|
|
@@ -732,21 +732,21 @@ function C0(e, o, t = E(() => !0)) {
|
|
|
732
732
|
}(e);
|
|
733
733
|
for (let u of r) {
|
|
734
734
|
if (u === null) continue;
|
|
735
|
-
let c = u instanceof HTMLElement ? u :
|
|
735
|
+
let c = u instanceof HTMLElement ? u : V(u);
|
|
736
736
|
if (c != null && c.contains(s) || a.composed && a.composedPath().includes(c)) return;
|
|
737
737
|
}
|
|
738
738
|
return !p0(s, Ft.Loose) && s.tabIndex !== -1 && a.preventDefault(), o(a, s);
|
|
739
739
|
}
|
|
740
740
|
let l = $(null);
|
|
741
|
-
|
|
741
|
+
Ae("pointerdown", (a) => {
|
|
742
742
|
var i, s;
|
|
743
743
|
t.value && (l.value = ((s = (i = a.composedPath) == null ? void 0 : i.call(a)) == null ? void 0 : s[0]) || a.target);
|
|
744
|
-
}, !0),
|
|
744
|
+
}, !0), Ae("mousedown", (a) => {
|
|
745
745
|
var i, s;
|
|
746
746
|
t.value && (l.value = ((s = (i = a.composedPath) == null ? void 0 : i.call(a)) == null ? void 0 : s[0]) || a.target);
|
|
747
|
-
}, !0),
|
|
747
|
+
}, !0), Ae("click", (a) => {
|
|
748
748
|
Pt() || l.value && (n(a, () => l.value), l.value = null);
|
|
749
|
-
}, !0),
|
|
749
|
+
}, !0), Ae("touchend", (a) => n(a, () => a.target instanceof HTMLElement ? a.target : null), !0), g0("blur", (a) => n(a, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
750
750
|
}
|
|
751
751
|
function ht(e, o) {
|
|
752
752
|
if (e) return e;
|
|
@@ -755,11 +755,11 @@ function ht(e, o) {
|
|
|
755
755
|
}
|
|
756
756
|
function x0(e, o) {
|
|
757
757
|
let t = $(ht(e.value.type, e.value.as));
|
|
758
|
-
return
|
|
758
|
+
return ve(() => {
|
|
759
759
|
t.value = ht(e.value.type, e.value.as);
|
|
760
760
|
}), re(() => {
|
|
761
761
|
var n;
|
|
762
|
-
t.value ||
|
|
762
|
+
t.value || V(o) && V(o) instanceof HTMLButtonElement && !((n = V(o)) != null && n.hasAttribute("type")) && (t.value = "button");
|
|
763
763
|
}), t;
|
|
764
764
|
}
|
|
765
765
|
function mt(e) {
|
|
@@ -785,7 +785,7 @@ function w0({ container: e, accept: o, walk: t, enabled: n }) {
|
|
|
785
785
|
});
|
|
786
786
|
}
|
|
787
787
|
var Oe = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Oe || {}), _0 = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(_0 || {});
|
|
788
|
-
function
|
|
788
|
+
function he({ visible: e = !0, features: o = 0, ourProps: t, theirProps: n, ...l }) {
|
|
789
789
|
var a;
|
|
790
790
|
let i = Dt(n, t), s = Object.assign(l, { props: i });
|
|
791
791
|
if (e || o & 2 && i.static) return Je(s);
|
|
@@ -803,27 +803,27 @@ function Je({ props: e, attrs: o, slots: t, slot: n, name: l }) {
|
|
|
803
803
|
var a, i;
|
|
804
804
|
let { as: s, ...r } = je(e, ["unmount", "static"]), u = (a = t.default) == null ? void 0 : a.call(t, n), c = {};
|
|
805
805
|
if (n) {
|
|
806
|
-
let p = !1,
|
|
807
|
-
for (let [w,
|
|
808
|
-
p && (c["data-headlessui-state"] =
|
|
806
|
+
let p = !1, g = [];
|
|
807
|
+
for (let [w, b] of Object.entries(n)) typeof b == "boolean" && (p = !0), b === !0 && g.push(w);
|
|
808
|
+
p && (c["data-headlessui-state"] = g.join(" "));
|
|
809
809
|
}
|
|
810
810
|
if (s === "template") {
|
|
811
811
|
if (u = Rt(u ?? []), Object.keys(r).length > 0 || Object.keys(o).length > 0) {
|
|
812
|
-
let [p, ...
|
|
813
|
-
if (!E0(p) ||
|
|
812
|
+
let [p, ...g] = u ?? [];
|
|
813
|
+
if (!E0(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((_, P, I) => I.indexOf(_) === P).sort((_, P) => _.localeCompare(P)).map((_) => ` - ${_}`).join(`
|
|
814
814
|
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((_) => ` - ${_}`).join(`
|
|
815
815
|
`)].join(`
|
|
816
816
|
`));
|
|
817
|
-
let w = Dt((i = p.props) != null ? i : {}, r, c),
|
|
818
|
-
for (let _ in w) _.startsWith("on") && (
|
|
819
|
-
return
|
|
817
|
+
let w = Dt((i = p.props) != null ? i : {}, r, c), b = $t(p, w, !0);
|
|
818
|
+
for (let _ in w) _.startsWith("on") && (b.props || (b.props = {}), b.props[_] = w[_]);
|
|
819
|
+
return b;
|
|
820
820
|
}
|
|
821
821
|
return Array.isArray(u) && u.length === 1 ? u[0] : u;
|
|
822
822
|
}
|
|
823
823
|
return Ee(s, Object.assign({}, r, c), { default: () => u });
|
|
824
824
|
}
|
|
825
825
|
function Rt(e) {
|
|
826
|
-
return e.flatMap((o) => o.type ===
|
|
826
|
+
return e.flatMap((o) => o.type === G ? Rt(o.children) : [o]);
|
|
827
827
|
}
|
|
828
828
|
function Dt(...e) {
|
|
829
829
|
if (e.length === 0) return {};
|
|
@@ -858,17 +858,17 @@ let O0 = ue({ name: "Hidden", props: { as: { type: [Object, String], default: "d
|
|
|
858
858
|
return () => {
|
|
859
859
|
var n;
|
|
860
860
|
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" } } };
|
|
861
|
-
return
|
|
861
|
+
return he({ ourProps: i, theirProps: a, slot: {}, attrs: t, slots: o, name: "Hidden" });
|
|
862
862
|
};
|
|
863
863
|
} }), Bt = Symbol("Context");
|
|
864
|
-
var
|
|
865
|
-
function
|
|
864
|
+
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 || {});
|
|
865
|
+
function $0() {
|
|
866
866
|
return Te(Bt, null);
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function I0(e) {
|
|
869
869
|
ot(Bt, e);
|
|
870
870
|
}
|
|
871
|
-
var
|
|
871
|
+
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 || {}), jt = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(jt || {});
|
|
872
872
|
function T0(e) {
|
|
873
873
|
function o() {
|
|
874
874
|
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", o));
|
|
@@ -885,7 +885,7 @@ T0(() => {
|
|
|
885
885
|
function L0(e) {
|
|
886
886
|
throw new Error("Unexpected object: " + e);
|
|
887
887
|
}
|
|
888
|
-
var
|
|
888
|
+
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 || {});
|
|
889
889
|
function bt(e, o) {
|
|
890
890
|
let t = o.resolveItems();
|
|
891
891
|
if (t.length <= 0) return null;
|
|
@@ -932,62 +932,62 @@ function Ut(e, o, t) {
|
|
|
932
932
|
function M0(e, o) {
|
|
933
933
|
return e === o;
|
|
934
934
|
}
|
|
935
|
-
var
|
|
935
|
+
var k0 = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(k0 || {}), A0 = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(A0 || {}), V0 = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(V0 || {});
|
|
936
936
|
let Zt = Symbol("ComboboxContext");
|
|
937
|
-
function
|
|
937
|
+
function me(e) {
|
|
938
938
|
let o = Te(Zt, null);
|
|
939
939
|
if (o === null) {
|
|
940
940
|
let t = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
|
|
941
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t,
|
|
941
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t, me), t;
|
|
942
942
|
}
|
|
943
943
|
return o;
|
|
944
944
|
}
|
|
945
945
|
let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, { slots: o }) {
|
|
946
|
-
let t =
|
|
947
|
-
let s =
|
|
946
|
+
let t = me("VirtualProvider"), n = E(() => {
|
|
947
|
+
let s = V(t.optionsRef);
|
|
948
948
|
if (!s) return { start: 0, end: 0 };
|
|
949
949
|
let r = window.getComputedStyle(s);
|
|
950
950
|
return { start: parseFloat(r.paddingBlockStart || r.paddingTop), end: parseFloat(r.paddingBlockEnd || r.paddingBottom) };
|
|
951
951
|
}), l = e0(E(() => ({ scrollPaddingStart: n.value.start, scrollPaddingEnd: n.value.end, count: t.virtual.value.options.length, estimateSize() {
|
|
952
952
|
return 40;
|
|
953
953
|
}, getScrollElement() {
|
|
954
|
-
return
|
|
954
|
+
return V(t.optionsRef);
|
|
955
955
|
}, overscan: 12 }))), a = E(() => {
|
|
956
956
|
var s;
|
|
957
957
|
return (s = t.virtual.value) == null ? void 0 : s.options;
|
|
958
958
|
}), i = $(0);
|
|
959
|
-
return
|
|
959
|
+
return N([a], () => {
|
|
960
960
|
i.value += 1;
|
|
961
961
|
}), ot(Wt, t.virtual.value ? l : null), () => [Ee("div", { style: { position: "relative", width: "100%", height: `${l.value.getTotalSize()}px` }, ref: (s) => {
|
|
962
962
|
if (s) {
|
|
963
963
|
if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || t.activationTrigger.value === 0) return;
|
|
964
964
|
t.activeOptionIndex.value !== null && t.virtual.value.options.length > t.activeOptionIndex.value && l.value.scrollToIndex(t.activeOptionIndex.value);
|
|
965
965
|
}
|
|
966
|
-
} }, l.value.getVirtualItems().map((s) =>
|
|
966
|
+
} }, l.value.getVirtualItems().map((s) => $t(o.default({ option: t.virtual.value.options[s.index], open: t.comboboxState.value === 0 })[0], { key: `${i.value}-${s.index}`, "data-index": s.index, "aria-setsize": t.virtual.value.options.length, "aria-posinset": s.index + 1, style: { position: "absolute", top: 0, left: 0, transform: `translateY(${s.start}px)`, overflowAnchor: "none" } })))];
|
|
967
967
|
} }), P0 = 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 }) {
|
|
968
|
-
let l = $(1), a = $(null), i = $(null), s = $(null), r = $(null), u = $({ static: !1, hold: !1 }), c = $([]), p = $(null),
|
|
969
|
-
function
|
|
970
|
-
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,
|
|
968
|
+
let l = $(1), a = $(null), i = $(null), s = $(null), r = $(null), u = $({ static: !1, hold: !1 }), c = $([]), p = $(null), g = $(2), w = $(!1);
|
|
969
|
+
function b(d = (f) => f) {
|
|
970
|
+
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) : h0(S, (D) => V(D.dataRef.domRef)), F = f ? T.indexOf(f) : null;
|
|
971
971
|
return F === -1 && (F = null), { options: T, activeOptionIndex: F };
|
|
972
972
|
}
|
|
973
|
-
let _ = E(() => e.multiple ? 1 : 0), P = E(() => e.nullable), [I, x] = t0(E(() => e.modelValue), (d) => n("update:modelValue", d), E(() => e.defaultValue)),
|
|
973
|
+
let _ = E(() => e.multiple ? 1 : 0), P = E(() => e.nullable), [I, x] = t0(E(() => e.modelValue), (d) => n("update:modelValue", d), E(() => e.defaultValue)), A = E(() => I.value === void 0 ? ae(_.value, { 1: [], 0: void 0 }) : I.value), R = null, y = null;
|
|
974
974
|
function M(d) {
|
|
975
975
|
return ae(_.value, { 0() {
|
|
976
976
|
return x == null ? void 0 : x(d);
|
|
977
977
|
}, 1: () => {
|
|
978
|
-
let f =
|
|
978
|
+
let f = ee(h.value.value).slice(), S = ee(d), T = f.findIndex((F) => h.compare(S, ee(F)));
|
|
979
979
|
return T === -1 ? f.push(S) : f.splice(T, 1), x == null ? void 0 : x(f);
|
|
980
980
|
} });
|
|
981
981
|
}
|
|
982
|
-
let
|
|
982
|
+
let C = E(() => {
|
|
983
983
|
});
|
|
984
|
-
|
|
984
|
+
N([C], ([d], [f]) => {
|
|
985
985
|
if (h.virtual.value && d && f && p.value !== null) {
|
|
986
986
|
let S = d.indexOf(f[p.value]);
|
|
987
987
|
S !== -1 ? p.value = S : p.value = null;
|
|
988
988
|
}
|
|
989
989
|
});
|
|
990
|
-
let h = { comboboxState: l, value:
|
|
990
|
+
let h = { comboboxState: l, value: A, mode: _, compare(d, f) {
|
|
991
991
|
if (typeof e.by == "string") {
|
|
992
992
|
let S = e.by;
|
|
993
993
|
return (d == null ? void 0 : d[S]) === (f == null ? void 0 : f[S]);
|
|
@@ -1010,7 +1010,7 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1010
1010
|
if (d !== -1) return d;
|
|
1011
1011
|
}
|
|
1012
1012
|
return p.value;
|
|
1013
|
-
}), activationTrigger:
|
|
1013
|
+
}), activationTrigger: g, optionsPropsRef: u, closeCombobox() {
|
|
1014
1014
|
w.value = !1, !e.disabled && l.value !== 1 && (l.value = 1, p.value = null);
|
|
1015
1015
|
}, openCombobox() {
|
|
1016
1016
|
if (w.value = !0, !e.disabled && l.value !== 0) {
|
|
@@ -1021,29 +1021,29 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1021
1021
|
l.value = 0;
|
|
1022
1022
|
}
|
|
1023
1023
|
}, setActivationTrigger(d) {
|
|
1024
|
-
|
|
1024
|
+
g.value = d;
|
|
1025
1025
|
}, goToOption(d, f, S) {
|
|
1026
1026
|
w.value = !1, R !== null && cancelAnimationFrame(R), R = requestAnimationFrame(() => {
|
|
1027
1027
|
if (e.disabled || r.value && !u.value.static && l.value === 1) return;
|
|
1028
1028
|
if (h.virtual.value) {
|
|
1029
|
-
p.value = d ===
|
|
1030
|
-
var D,
|
|
1031
|
-
return (
|
|
1032
|
-
var
|
|
1033
|
-
return !((
|
|
1034
|
-
})) != null ?
|
|
1029
|
+
p.value = d === Z.Specific ? f : bt({ focus: d }, { resolveItems: () => h.virtual.value.options, resolveActiveIndex: () => {
|
|
1030
|
+
var D, Y;
|
|
1031
|
+
return (Y = (D = h.activeOptionIndex.value) != null ? D : h.virtual.value.options.findIndex((Q) => {
|
|
1032
|
+
var z;
|
|
1033
|
+
return !((z = h.virtual.value) != null && z.disabled(Q));
|
|
1034
|
+
})) != null ? Y : null;
|
|
1035
1035
|
}, resolveDisabled: (D) => h.virtual.value.disabled(D), resolveId() {
|
|
1036
1036
|
throw new Error("Function not implemented.");
|
|
1037
|
-
} }),
|
|
1037
|
+
} }), g.value = S ?? 2;
|
|
1038
1038
|
return;
|
|
1039
1039
|
}
|
|
1040
|
-
let T =
|
|
1040
|
+
let T = b();
|
|
1041
1041
|
if (T.activeOptionIndex === null) {
|
|
1042
|
-
let D = T.options.findIndex((
|
|
1042
|
+
let D = T.options.findIndex((Y) => !Y.dataRef.disabled);
|
|
1043
1043
|
D !== -1 && (T.activeOptionIndex = D);
|
|
1044
1044
|
}
|
|
1045
|
-
let F = d ===
|
|
1046
|
-
p.value = F,
|
|
1045
|
+
let F = d === Z.Specific ? f : bt({ focus: d }, { resolveItems: () => T.options, resolveActiveIndex: () => T.activeOptionIndex, resolveId: (D) => D.id, resolveDisabled: (D) => D.dataRef.disabled });
|
|
1046
|
+
p.value = F, g.value = S ?? 2, c.value = T.options;
|
|
1047
1047
|
});
|
|
1048
1048
|
}, selectOption(d) {
|
|
1049
1049
|
let f = c.value.find((T) => T.id === d);
|
|
@@ -1057,18 +1057,18 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1057
1057
|
let { dataRef: d } = c.value[h.activeOptionIndex.value];
|
|
1058
1058
|
M(d.value);
|
|
1059
1059
|
}
|
|
1060
|
-
h.goToOption(
|
|
1060
|
+
h.goToOption(Z.Specific, h.activeOptionIndex.value);
|
|
1061
1061
|
}
|
|
1062
1062
|
}, registerOption(d, f) {
|
|
1063
|
-
let S =
|
|
1063
|
+
let S = It({ id: d, dataRef: f });
|
|
1064
1064
|
if (h.virtual.value) {
|
|
1065
1065
|
c.value.push(S);
|
|
1066
1066
|
return;
|
|
1067
1067
|
}
|
|
1068
1068
|
y && cancelAnimationFrame(y);
|
|
1069
|
-
let T =
|
|
1070
|
-
p.value === null && h.isSelected(f.value.value) && (T.activeOptionIndex = T.options.indexOf(S)), c.value = T.options, p.value = T.activeOptionIndex,
|
|
1071
|
-
let F =
|
|
1069
|
+
let T = b((F) => (F.push(S), F));
|
|
1070
|
+
p.value === null && h.isSelected(f.value.value) && (T.activeOptionIndex = T.options.indexOf(S)), c.value = T.options, p.value = T.activeOptionIndex, g.value = 2, T.options.some((F) => !V(F.dataRef.domRef)) && (y = requestAnimationFrame(() => {
|
|
1071
|
+
let F = b();
|
|
1072
1072
|
c.value = F.options, p.value = F.activeOptionIndex;
|
|
1073
1073
|
}));
|
|
1074
1074
|
}, unregisterOption(d, f) {
|
|
@@ -1076,79 +1076,79 @@ let Wt = Symbol("VirtualContext"), F0 = ue({ name: "VirtualProvider", setup(e, {
|
|
|
1076
1076
|
c.value = c.value.filter((T) => T.id !== d);
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
|
-
let S =
|
|
1079
|
+
let S = b((T) => {
|
|
1080
1080
|
let F = T.findIndex((D) => D.id === d);
|
|
1081
1081
|
return F !== -1 && T.splice(F, 1), T;
|
|
1082
1082
|
});
|
|
1083
|
-
c.value = S.options, p.value = S.activeOptionIndex,
|
|
1083
|
+
c.value = S.options, p.value = S.activeOptionIndex, g.value = 2;
|
|
1084
1084
|
}, isSelected(d) {
|
|
1085
|
-
return ae(_.value, { 0: () => h.compare(
|
|
1085
|
+
return ae(_.value, { 0: () => h.compare(ee(h.value.value), ee(d)), 1: () => ee(h.value.value).some((f) => h.compare(ee(f), ee(d))) });
|
|
1086
1086
|
}, isActive(d) {
|
|
1087
1087
|
return p.value === h.calculateIndex(d);
|
|
1088
1088
|
} };
|
|
1089
|
-
C0([i, s, r], () => h.closeCombobox(), E(() => l.value === 0)), ot(Zt, h),
|
|
1090
|
-
let
|
|
1089
|
+
C0([i, s, r], () => h.closeCombobox(), E(() => l.value === 0)), ot(Zt, h), I0(E(() => ae(l.value, { 0: $e.Open, 1: $e.Closed })));
|
|
1090
|
+
let k = E(() => {
|
|
1091
1091
|
var d;
|
|
1092
|
-
return (d =
|
|
1092
|
+
return (d = V(i)) == null ? void 0 : d.closest("form");
|
|
1093
1093
|
});
|
|
1094
|
-
return
|
|
1095
|
-
|
|
1096
|
-
if (!
|
|
1094
|
+
return ve(() => {
|
|
1095
|
+
N([k], () => {
|
|
1096
|
+
if (!k.value || e.defaultValue === void 0) return;
|
|
1097
1097
|
function d() {
|
|
1098
1098
|
h.change(e.defaultValue);
|
|
1099
1099
|
}
|
|
1100
|
-
return
|
|
1100
|
+
return k.value.addEventListener("reset", d), () => {
|
|
1101
1101
|
var f;
|
|
1102
|
-
(f =
|
|
1102
|
+
(f = k.value) == null || f.removeEventListener("reset", d);
|
|
1103
1103
|
};
|
|
1104
1104
|
}, { immediate: !0 });
|
|
1105
1105
|
}), () => {
|
|
1106
1106
|
var d, f, S;
|
|
1107
|
-
let { name: T, disabled: F, form: D, ...
|
|
1108
|
-
return Ee(
|
|
1107
|
+
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: A.value };
|
|
1108
|
+
return Ee(G, [...T != null && A.value != null ? Ht({ [T]: A.value }).map(([z, p2]) => Ee(O0, S0({ features: Nt.Hidden, key: z, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: D, disabled: F, name: z, value: p2 }))) : [], he({ theirProps: { ...t, ...je(Y, ["by", "defaultValue", "immediate", "modelValue", "multiple", "nullable", "onUpdate:modelValue", "virtual"]) }, ourProps: {}, slot: Q, slots: o, attrs: t, name: "Combobox" })]);
|
|
1109
1109
|
};
|
|
1110
1110
|
} });
|
|
1111
1111
|
ue({ name: "ComboboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t }) {
|
|
1112
1112
|
var n;
|
|
1113
|
-
let l = (n = e.id) != null ? n : `headlessui-combobox-label-${Le()}`, a =
|
|
1113
|
+
let l = (n = e.id) != null ? n : `headlessui-combobox-label-${Le()}`, a = me("ComboboxLabel");
|
|
1114
1114
|
function i() {
|
|
1115
1115
|
var s;
|
|
1116
|
-
(s =
|
|
1116
|
+
(s = V(a.inputRef)) == null || s.focus({ preventScroll: !0 });
|
|
1117
1117
|
}
|
|
1118
1118
|
return () => {
|
|
1119
1119
|
let s = { open: a.comboboxState.value === 0, disabled: a.disabled.value }, { ...r } = e, u = { id: l, ref: a.labelRef, onClick: i };
|
|
1120
|
-
return
|
|
1120
|
+
return he({ ourProps: u, theirProps: r, slot: s, attrs: o, slots: t, name: "ComboboxLabel" });
|
|
1121
1121
|
};
|
|
1122
1122
|
} });
|
|
1123
1123
|
let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: o, slots: t, expose: n }) {
|
|
1124
1124
|
var l;
|
|
1125
|
-
let a = (l = e.id) != null ? l : `headlessui-combobox-button-${Le()}`, i =
|
|
1125
|
+
let a = (l = e.id) != null ? l : `headlessui-combobox-button-${Le()}`, i = me("ComboboxButton");
|
|
1126
1126
|
n({ el: i.buttonRef, $el: i.buttonRef });
|
|
1127
1127
|
function s(c) {
|
|
1128
|
-
i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (c.preventDefault(), i.openCombobox()),
|
|
1128
|
+
i.disabled.value || (i.comboboxState.value === 0 ? i.closeCombobox() : (c.preventDefault(), i.openCombobox()), oe(() => {
|
|
1129
1129
|
var p;
|
|
1130
|
-
return (p =
|
|
1130
|
+
return (p = V(i.inputRef)) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1131
1131
|
}));
|
|
1132
1132
|
}
|
|
1133
1133
|
function r(c) {
|
|
1134
1134
|
switch (c.key) {
|
|
1135
|
-
case
|
|
1136
|
-
c.preventDefault(), c.stopPropagation(), i.comboboxState.value === 1 && i.openCombobox(),
|
|
1135
|
+
case J.ArrowDown:
|
|
1136
|
+
c.preventDefault(), c.stopPropagation(), i.comboboxState.value === 1 && i.openCombobox(), oe(() => {
|
|
1137
1137
|
var p;
|
|
1138
1138
|
return (p = i.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1139
1139
|
});
|
|
1140
1140
|
return;
|
|
1141
|
-
case
|
|
1142
|
-
c.preventDefault(), c.stopPropagation(), i.comboboxState.value === 1 && (i.openCombobox(),
|
|
1143
|
-
i.value.value || i.goToOption(
|
|
1144
|
-
})),
|
|
1141
|
+
case J.ArrowUp:
|
|
1142
|
+
c.preventDefault(), c.stopPropagation(), i.comboboxState.value === 1 && (i.openCombobox(), oe(() => {
|
|
1143
|
+
i.value.value || i.goToOption(Z.Last);
|
|
1144
|
+
})), oe(() => {
|
|
1145
1145
|
var p;
|
|
1146
1146
|
return (p = i.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1147
1147
|
});
|
|
1148
1148
|
return;
|
|
1149
|
-
case
|
|
1149
|
+
case J.Escape:
|
|
1150
1150
|
if (i.comboboxState.value !== 0) return;
|
|
1151
|
-
c.preventDefault(), i.optionsRef.value && !i.optionsPropsRef.value.static && c.stopPropagation(), i.closeCombobox(),
|
|
1151
|
+
c.preventDefault(), i.optionsRef.value && !i.optionsPropsRef.value.static && c.stopPropagation(), i.closeCombobox(), oe(() => {
|
|
1152
1152
|
var p;
|
|
1153
1153
|
return (p = i.inputRef.value) == null ? void 0 : p.focus({ preventScroll: !0 });
|
|
1154
1154
|
});
|
|
@@ -1158,50 +1158,50 @@ let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1158
1158
|
let u = x0(E(() => ({ as: e.as, type: o.type })), i.buttonRef);
|
|
1159
1159
|
return () => {
|
|
1160
1160
|
var c, p;
|
|
1161
|
-
let
|
|
1162
|
-
return
|
|
1161
|
+
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 };
|
|
1162
|
+
return he({ ourProps: b, theirProps: w, slot: g, attrs: o, slots: t, name: "ComboboxButton" });
|
|
1163
1163
|
};
|
|
1164
1164
|
} }), D0 = 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 }) {
|
|
1165
1165
|
var a;
|
|
1166
|
-
let i = (a = e.id) != null ? a : `headlessui-combobox-input-${Le()}`, s =
|
|
1166
|
+
let i = (a = e.id) != null ? a : `headlessui-combobox-input-${Le()}`, s = me("ComboboxInput"), r = E(() => at(V(s.inputRef))), u = { value: !1 };
|
|
1167
1167
|
l({ el: s.inputRef, $el: s.inputRef });
|
|
1168
1168
|
function c() {
|
|
1169
1169
|
s.change(null);
|
|
1170
|
-
let y =
|
|
1171
|
-
y && (y.scrollTop = 0), s.goToOption(
|
|
1170
|
+
let y = V(s.optionsRef);
|
|
1171
|
+
y && (y.scrollTop = 0), s.goToOption(Z.Nothing);
|
|
1172
1172
|
}
|
|
1173
1173
|
let p = E(() => {
|
|
1174
1174
|
var y;
|
|
1175
1175
|
let M = s.value.value;
|
|
1176
|
-
return
|
|
1176
|
+
return V(s.inputRef) ? typeof e.displayValue < "u" && M !== void 0 ? (y = e.displayValue(M)) != null ? y : "" : typeof M == "string" ? M : "" : "";
|
|
1177
1177
|
});
|
|
1178
|
-
|
|
1179
|
-
|
|
1178
|
+
ve(() => {
|
|
1179
|
+
N([p, s.comboboxState, r], ([y, M], [C, h]) => {
|
|
1180
1180
|
if (u.value) return;
|
|
1181
|
-
let
|
|
1182
|
-
|
|
1181
|
+
let k = V(s.inputRef);
|
|
1182
|
+
k && ((h === 0 && M === 1 || y !== C) && (k.value = y), requestAnimationFrame(() => {
|
|
1183
1183
|
var d;
|
|
1184
|
-
if (u.value || !
|
|
1185
|
-
let { selectionStart: f, selectionEnd: S } =
|
|
1186
|
-
Math.abs((S ?? 0) - (f ?? 0)) === 0 && f === 0 &&
|
|
1184
|
+
if (u.value || !k || ((d = r.value) == null ? void 0 : d.activeElement) !== k) return;
|
|
1185
|
+
let { selectionStart: f, selectionEnd: S } = k;
|
|
1186
|
+
Math.abs((S ?? 0) - (f ?? 0)) === 0 && f === 0 && k.setSelectionRange(k.value.length, k.value.length);
|
|
1187
1187
|
}));
|
|
1188
|
-
}, { immediate: !0 }),
|
|
1188
|
+
}, { immediate: !0 }), N([s.comboboxState], ([y], [M]) => {
|
|
1189
1189
|
if (y === 0 && M === 1) {
|
|
1190
1190
|
if (u.value) return;
|
|
1191
|
-
let
|
|
1192
|
-
if (!
|
|
1193
|
-
let h =
|
|
1194
|
-
|
|
1191
|
+
let C = V(s.inputRef);
|
|
1192
|
+
if (!C) return;
|
|
1193
|
+
let h = C.value, { selectionStart: k, selectionEnd: d, selectionDirection: f } = C;
|
|
1194
|
+
C.value = "", C.value = h, f !== null ? C.setSelectionRange(k, d, f) : C.setSelectionRange(k, d);
|
|
1195
1195
|
}
|
|
1196
1196
|
});
|
|
1197
1197
|
});
|
|
1198
|
-
let
|
|
1198
|
+
let g = $(!1);
|
|
1199
1199
|
function w() {
|
|
1200
|
-
|
|
1200
|
+
g.value = !0;
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1202
|
+
function b() {
|
|
1203
1203
|
De().nextFrame(() => {
|
|
1204
|
-
|
|
1204
|
+
g.value = !1;
|
|
1205
1205
|
});
|
|
1206
1206
|
}
|
|
1207
1207
|
let _ = l0();
|
|
@@ -1209,37 +1209,37 @@ let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1209
1209
|
switch (u.value = !0, _(() => {
|
|
1210
1210
|
u.value = !1;
|
|
1211
1211
|
}), y.key) {
|
|
1212
|
-
case
|
|
1213
|
-
if (u.value = !1, s.comboboxState.value !== 0 ||
|
|
1212
|
+
case J.Enter:
|
|
1213
|
+
if (u.value = !1, s.comboboxState.value !== 0 || g.value) return;
|
|
1214
1214
|
if (y.preventDefault(), y.stopPropagation(), s.activeOptionIndex.value === null) {
|
|
1215
1215
|
s.closeCombobox();
|
|
1216
1216
|
return;
|
|
1217
1217
|
}
|
|
1218
1218
|
s.selectActiveOption(), s.mode.value === 0 && s.closeCombobox();
|
|
1219
1219
|
break;
|
|
1220
|
-
case
|
|
1221
|
-
return u.value = !1, y.preventDefault(), y.stopPropagation(), ae(s.comboboxState.value, { 0: () => s.goToOption(
|
|
1222
|
-
case
|
|
1223
|
-
return u.value = !1, y.preventDefault(), y.stopPropagation(), ae(s.comboboxState.value, { 0: () => s.goToOption(
|
|
1224
|
-
s.openCombobox(),
|
|
1225
|
-
s.value.value || s.goToOption(
|
|
1220
|
+
case J.ArrowDown:
|
|
1221
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), ae(s.comboboxState.value, { 0: () => s.goToOption(Z.Next), 1: () => s.openCombobox() });
|
|
1222
|
+
case J.ArrowUp:
|
|
1223
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), ae(s.comboboxState.value, { 0: () => s.goToOption(Z.Previous), 1: () => {
|
|
1224
|
+
s.openCombobox(), oe(() => {
|
|
1225
|
+
s.value.value || s.goToOption(Z.Last);
|
|
1226
1226
|
});
|
|
1227
1227
|
} });
|
|
1228
|
-
case
|
|
1228
|
+
case J.Home:
|
|
1229
1229
|
if (y.shiftKey) break;
|
|
1230
|
-
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(
|
|
1231
|
-
case
|
|
1232
|
-
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(
|
|
1233
|
-
case
|
|
1230
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(Z.First);
|
|
1231
|
+
case J.PageUp:
|
|
1232
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(Z.First);
|
|
1233
|
+
case J.End:
|
|
1234
1234
|
if (y.shiftKey) break;
|
|
1235
|
-
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(
|
|
1236
|
-
case
|
|
1237
|
-
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(
|
|
1238
|
-
case
|
|
1235
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(Z.Last);
|
|
1236
|
+
case J.PageDown:
|
|
1237
|
+
return u.value = !1, y.preventDefault(), y.stopPropagation(), s.goToOption(Z.Last);
|
|
1238
|
+
case J.Escape:
|
|
1239
1239
|
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1240
1240
|
y.preventDefault(), s.optionsRef.value && !s.optionsPropsRef.value.static && y.stopPropagation(), s.nullable.value && s.mode.value === 0 && s.value.value === null && c(), s.closeCombobox();
|
|
1241
1241
|
break;
|
|
1242
|
-
case
|
|
1242
|
+
case J.Tab:
|
|
1243
1243
|
if (u.value = !1, s.comboboxState.value !== 0) return;
|
|
1244
1244
|
s.mode.value === 0 && s.activationTrigger.value !== 1 && s.selectActiveOption(), s.closeCombobox();
|
|
1245
1245
|
break;
|
|
@@ -1249,35 +1249,35 @@ let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1249
1249
|
o("change", y), s.nullable.value && s.mode.value === 0 && y.target.value === "" && c(), s.openCombobox();
|
|
1250
1250
|
}
|
|
1251
1251
|
function x(y) {
|
|
1252
|
-
var M,
|
|
1253
|
-
let
|
|
1254
|
-
if (u.value = !1, !((
|
|
1255
|
-
}
|
|
1256
|
-
function
|
|
1257
|
-
var M,
|
|
1258
|
-
let
|
|
1259
|
-
(
|
|
1252
|
+
var M, C, h;
|
|
1253
|
+
let k = (M = y.relatedTarget) != null ? M : de.find((d) => d !== y.currentTarget);
|
|
1254
|
+
if (u.value = !1, !((C = V(s.optionsRef)) != null && C.contains(k)) && !((h = V(s.buttonRef)) != null && h.contains(k)) && 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();
|
|
1255
|
+
}
|
|
1256
|
+
function A(y) {
|
|
1257
|
+
var M, C, h;
|
|
1258
|
+
let k = (M = y.relatedTarget) != null ? M : de.find((d) => d !== y.currentTarget);
|
|
1259
|
+
(C = V(s.buttonRef)) != null && C.contains(k) || (h = V(s.optionsRef)) != null && h.contains(k) || s.disabled.value || s.immediate.value && s.comboboxState.value !== 0 && (s.openCombobox(), De().nextFrame(() => {
|
|
1260
1260
|
s.setActivationTrigger(1);
|
|
1261
1261
|
}));
|
|
1262
1262
|
}
|
|
1263
1263
|
let R = E(() => {
|
|
1264
|
-
var y, M,
|
|
1265
|
-
return (h = (
|
|
1264
|
+
var y, M, C, h;
|
|
1265
|
+
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 : "";
|
|
1266
1266
|
});
|
|
1267
1267
|
return () => {
|
|
1268
|
-
var y, M,
|
|
1269
|
-
let S = { open: s.comboboxState.value === 0 }, { displayValue: T, onChange: F, ...D } = e,
|
|
1270
|
-
return
|
|
1268
|
+
var y, M, C, h, k, d, f;
|
|
1269
|
+
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 : (k = V(s.buttonRef)) == null ? void 0 : k.id, "aria-autocomplete": "list", id: i, onCompositionstart: w, onCompositionend: b, onKeydown: P, onInput: I, onFocus: A, onBlur: x, role: "combobox", type: (f = t.type) != null ? f : "text", tabIndex: 0, ref: s.inputRef, defaultValue: R.value, disabled: s.disabled.value === !0 ? !0 : void 0 };
|
|
1270
|
+
return he({ ourProps: Y, theirProps: D, slot: S, attrs: t, slots: n, features: Oe.RenderStrategy | Oe.Static, name: "ComboboxInput" });
|
|
1271
1271
|
};
|
|
1272
1272
|
} }), N0 = 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 }) {
|
|
1273
|
-
let l =
|
|
1273
|
+
let l = me("ComboboxOptions"), a = `headlessui-combobox-options-${Le()}`;
|
|
1274
1274
|
n({ el: l.optionsRef, $el: l.optionsRef }), re(() => {
|
|
1275
1275
|
l.optionsPropsRef.value.static = e.static;
|
|
1276
1276
|
}), re(() => {
|
|
1277
1277
|
l.optionsPropsRef.value.hold = e.hold;
|
|
1278
1278
|
});
|
|
1279
|
-
let i =
|
|
1280
|
-
w0({ container: E(() =>
|
|
1279
|
+
let i = $0(), s = E(() => i !== null ? (i.value & $e.Open) === $e.Open : l.comboboxState.value === 0);
|
|
1280
|
+
w0({ container: E(() => V(l.optionsRef)), enabled: E(() => l.comboboxState.value === 0), accept(u) {
|
|
1281
1281
|
return u.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : u.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1282
1282
|
}, walk(u) {
|
|
1283
1283
|
u.setAttribute("role", "none");
|
|
@@ -1287,58 +1287,58 @@ let R0 = ue({ name: "ComboboxButton", props: { as: { type: [Object, String], def
|
|
|
1287
1287
|
}
|
|
1288
1288
|
return () => {
|
|
1289
1289
|
var u, c, p;
|
|
1290
|
-
let
|
|
1291
|
-
return
|
|
1290
|
+
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 = je(e, ["hold"]);
|
|
1291
|
+
return he({ ourProps: w, theirProps: b, slot: g, attrs: o, slots: l.virtual.value && l.comboboxState.value === 0 ? { ...t, default: () => [Ee(F0, {}, t.default)] } : t, features: Oe.RenderStrategy | Oe.Static, visible: s.value, name: "ComboboxOptions" });
|
|
1292
1292
|
};
|
|
1293
1293
|
} }), B0 = 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 }) {
|
|
1294
|
-
let l =
|
|
1294
|
+
let l = me("ComboboxOption"), a = `headlessui-combobox-option-${Le()}`, i = $(null), s = E(() => e.disabled);
|
|
1295
1295
|
n({ el: i, $el: i });
|
|
1296
1296
|
let r = E(() => {
|
|
1297
1297
|
var x;
|
|
1298
1298
|
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;
|
|
1299
1299
|
}), u = E(() => l.isSelected(e.value)), c = Te(Wt, null), p = E(() => ({ disabled: e.disabled, value: e.value, domRef: i, order: E(() => e.order) }));
|
|
1300
|
-
|
|
1301
|
-
let x =
|
|
1300
|
+
ve(() => l.registerOption(a, p)), nt(() => l.unregisterOption(a, r.value)), re(() => {
|
|
1301
|
+
let x = V(i);
|
|
1302
1302
|
x && (c == null || c.value.measureElement(x));
|
|
1303
1303
|
}), re(() => {
|
|
1304
|
-
l.comboboxState.value === 0 && r.value && (l.virtual.value || l.activationTrigger.value !== 0 &&
|
|
1305
|
-
var x,
|
|
1306
|
-
return (
|
|
1304
|
+
l.comboboxState.value === 0 && r.value && (l.virtual.value || l.activationTrigger.value !== 0 && oe(() => {
|
|
1305
|
+
var x, A;
|
|
1306
|
+
return (A = (x = V(i)) == null ? void 0 : x.scrollIntoView) == null ? void 0 : A.call(x, { block: "nearest" });
|
|
1307
1307
|
}));
|
|
1308
1308
|
});
|
|
1309
|
-
function
|
|
1309
|
+
function g(x) {
|
|
1310
1310
|
x.preventDefault(), x.button === jt.Left && (s.value || (l.selectOption(a), Pt() || requestAnimationFrame(() => {
|
|
1311
|
-
var
|
|
1312
|
-
return (
|
|
1311
|
+
var A;
|
|
1312
|
+
return (A = V(l.inputRef)) == null ? void 0 : A.focus({ preventScroll: !0 });
|
|
1313
1313
|
}), l.mode.value === 0 && l.closeCombobox()));
|
|
1314
1314
|
}
|
|
1315
1315
|
function w() {
|
|
1316
1316
|
var x;
|
|
1317
|
-
if (e.disabled || (x = l.virtual.value) != null && x.disabled(e.value)) return l.goToOption(
|
|
1318
|
-
let
|
|
1319
|
-
l.goToOption(
|
|
1317
|
+
if (e.disabled || (x = l.virtual.value) != null && x.disabled(e.value)) return l.goToOption(Z.Nothing);
|
|
1318
|
+
let A = l.calculateIndex(e.value);
|
|
1319
|
+
l.goToOption(Z.Specific, A);
|
|
1320
1320
|
}
|
|
1321
|
-
let
|
|
1321
|
+
let b = y0();
|
|
1322
1322
|
function _(x) {
|
|
1323
|
-
|
|
1323
|
+
b.update(x);
|
|
1324
1324
|
}
|
|
1325
1325
|
function P(x) {
|
|
1326
|
-
var
|
|
1327
|
-
if (!
|
|
1326
|
+
var A;
|
|
1327
|
+
if (!b.wasMoved(x) || e.disabled || (A = l.virtual.value) != null && A.disabled(e.value) || r.value) return;
|
|
1328
1328
|
let R = l.calculateIndex(e.value);
|
|
1329
|
-
l.goToOption(
|
|
1329
|
+
l.goToOption(Z.Specific, R, 0);
|
|
1330
1330
|
}
|
|
1331
1331
|
function I(x) {
|
|
1332
|
-
var
|
|
1333
|
-
|
|
1332
|
+
var A;
|
|
1333
|
+
b.wasMoved(x) && (e.disabled || (A = l.virtual.value) != null && A.disabled(e.value) || r.value && (l.optionsPropsRef.value.hold || l.goToOption(Z.Nothing)));
|
|
1334
1334
|
}
|
|
1335
1335
|
return () => {
|
|
1336
|
-
let { disabled: x } = e,
|
|
1337
|
-
return
|
|
1336
|
+
let { disabled: x } = e, A = { active: r.value, selected: u.value, disabled: x }, R = { 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: P, onMousemove: P, onPointerleave: I, onMouseleave: I }, y = je(e, ["order", "value"]);
|
|
1337
|
+
return he({ ourProps: R, theirProps: y, slot: A, attrs: t, slots: o, name: "ComboboxOption" });
|
|
1338
1338
|
};
|
|
1339
1339
|
} });
|
|
1340
1340
|
function j0(e, o) {
|
|
1341
|
-
return
|
|
1341
|
+
return m(), O("svg", {
|
|
1342
1342
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1343
1343
|
viewBox: "0 0 20 20",
|
|
1344
1344
|
fill: "currentColor",
|
|
@@ -1353,7 +1353,7 @@ function j0(e, o) {
|
|
|
1353
1353
|
]);
|
|
1354
1354
|
}
|
|
1355
1355
|
function H0(e, o) {
|
|
1356
|
-
return
|
|
1356
|
+
return m(), O("svg", {
|
|
1357
1357
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1358
1358
|
viewBox: "0 0 20 20",
|
|
1359
1359
|
fill: "currentColor",
|
|
@@ -1368,7 +1368,7 @@ function H0(e, o) {
|
|
|
1368
1368
|
]);
|
|
1369
1369
|
}
|
|
1370
1370
|
function z0(e, o) {
|
|
1371
|
-
return
|
|
1371
|
+
return m(), O("svg", {
|
|
1372
1372
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1373
1373
|
viewBox: "0 0 20 20",
|
|
1374
1374
|
fill: "currentColor",
|
|
@@ -1383,7 +1383,7 @@ function z0(e, o) {
|
|
|
1383
1383
|
]);
|
|
1384
1384
|
}
|
|
1385
1385
|
var Gt = !1;
|
|
1386
|
-
function
|
|
1386
|
+
function Ve(e, o, t) {
|
|
1387
1387
|
return Array.isArray(e) ? (e.length = Math.max(e.length, o), e.splice(o, 1, t), t) : (e[o] = t, t);
|
|
1388
1388
|
}
|
|
1389
1389
|
function Ke(e, o) {
|
|
@@ -1400,10 +1400,10 @@ function qt() {
|
|
|
1400
1400
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
1401
1401
|
}
|
|
1402
1402
|
const Z0 = typeof Proxy == "function", W0 = "devtools-plugin:setup", G0 = "plugin:settings:set";
|
|
1403
|
-
let
|
|
1403
|
+
let ge, Ye;
|
|
1404
1404
|
function q0() {
|
|
1405
1405
|
var e;
|
|
1406
|
-
return
|
|
1406
|
+
return ge !== void 0 || (typeof window < "u" && window.performance ? (ge = !0, Ye = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (ge = !0, Ye = globalThis.perf_hooks.performance) : ge = !1), ge;
|
|
1407
1407
|
}
|
|
1408
1408
|
function J0() {
|
|
1409
1409
|
return q0() ? Ye.now() : Date.now();
|
|
@@ -1489,7 +1489,7 @@ function Jt(e, o) {
|
|
|
1489
1489
|
* @license MIT
|
|
1490
1490
|
*/
|
|
1491
1491
|
let _e;
|
|
1492
|
-
const
|
|
1492
|
+
const Ie = (e) => _e = e, Kt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
1493
1493
|
/* istanbul ignore next */
|
|
1494
1494
|
Symbol()
|
|
1495
1495
|
);
|
|
@@ -1580,7 +1580,7 @@ function en(e, o, t, n) {
|
|
|
1580
1580
|
}, 4e4);
|
|
1581
1581
|
}
|
|
1582
1582
|
}
|
|
1583
|
-
function
|
|
1583
|
+
function U(e, o) {
|
|
1584
1584
|
const t = "🍍 " + e;
|
|
1585
1585
|
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(t, o) : o === "error" ? console.error(t) : o === "warn" ? console.warn(t) : console.log(t);
|
|
1586
1586
|
}
|
|
@@ -1589,29 +1589,29 @@ function rt(e) {
|
|
|
1589
1589
|
}
|
|
1590
1590
|
function e2() {
|
|
1591
1591
|
if (!("clipboard" in navigator))
|
|
1592
|
-
return
|
|
1592
|
+
return U("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
1593
1593
|
}
|
|
1594
1594
|
function t2(e) {
|
|
1595
|
-
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (
|
|
1595
|
+
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;
|
|
1596
1596
|
}
|
|
1597
1597
|
async function tn(e) {
|
|
1598
1598
|
if (!e2())
|
|
1599
1599
|
try {
|
|
1600
|
-
await navigator.clipboard.writeText(JSON.stringify(e.state.value)),
|
|
1600
|
+
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), U("Global state copied to clipboard.");
|
|
1601
1601
|
} catch (o) {
|
|
1602
1602
|
if (t2(o))
|
|
1603
1603
|
return;
|
|
1604
|
-
|
|
1604
|
+
U("Failed to serialize the state. Check the console for more details.", "error"), console.error(o);
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
1607
|
async function nn(e) {
|
|
1608
1608
|
if (!e2())
|
|
1609
1609
|
try {
|
|
1610
|
-
n2(e, JSON.parse(await navigator.clipboard.readText())),
|
|
1610
|
+
n2(e, JSON.parse(await navigator.clipboard.readText())), U("Global state pasted from clipboard.");
|
|
1611
1611
|
} catch (o) {
|
|
1612
1612
|
if (t2(o))
|
|
1613
1613
|
return;
|
|
1614
|
-
|
|
1614
|
+
U("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(o);
|
|
1615
1615
|
}
|
|
1616
1616
|
}
|
|
1617
1617
|
async function on(e) {
|
|
@@ -1620,7 +1620,7 @@ async function on(e) {
|
|
|
1620
1620
|
type: "text/plain;charset=utf-8"
|
|
1621
1621
|
}), "pinia-state.json");
|
|
1622
1622
|
} catch (o) {
|
|
1623
|
-
|
|
1623
|
+
U("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(o);
|
|
1624
1624
|
}
|
|
1625
1625
|
}
|
|
1626
1626
|
let se;
|
|
@@ -1645,9 +1645,9 @@ async function sn(e) {
|
|
|
1645
1645
|
if (!t)
|
|
1646
1646
|
return;
|
|
1647
1647
|
const { text: n, file: l } = t;
|
|
1648
|
-
n2(e, JSON.parse(n)),
|
|
1648
|
+
n2(e, JSON.parse(n)), U(`Global state imported from "${l.name}".`);
|
|
1649
1649
|
} catch (o) {
|
|
1650
|
-
|
|
1650
|
+
U("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(o);
|
|
1651
1651
|
}
|
|
1652
1652
|
}
|
|
1653
1653
|
function n2(e, o) {
|
|
@@ -1656,7 +1656,7 @@ function n2(e, o) {
|
|
|
1656
1656
|
n ? Object.assign(n, o[t]) : e.state.value[t] = o[t];
|
|
1657
1657
|
}
|
|
1658
1658
|
}
|
|
1659
|
-
function
|
|
1659
|
+
function ne(e) {
|
|
1660
1660
|
return {
|
|
1661
1661
|
_custom: {
|
|
1662
1662
|
display: e
|
|
@@ -1716,8 +1716,8 @@ function un(e) {
|
|
|
1716
1716
|
operations: [],
|
|
1717
1717
|
newValue: {}
|
|
1718
1718
|
}) : {
|
|
1719
|
-
operation:
|
|
1720
|
-
key:
|
|
1719
|
+
operation: ne(e.type),
|
|
1720
|
+
key: ne(e.key),
|
|
1721
1721
|
oldValue: e.oldValue,
|
|
1722
1722
|
newValue: e.newValue
|
|
1723
1723
|
} : {};
|
|
@@ -1734,7 +1734,7 @@ function cn(e) {
|
|
|
1734
1734
|
return "unknown";
|
|
1735
1735
|
}
|
|
1736
1736
|
}
|
|
1737
|
-
let
|
|
1737
|
+
let xe = !0;
|
|
1738
1738
|
const Re = [], ce = "pinia:mutations", W = "pinia", { assign: dn } = Object, Ne = (e) => "🍍 " + e;
|
|
1739
1739
|
function fn(e, o) {
|
|
1740
1740
|
Jt({
|
|
@@ -1746,7 +1746,7 @@ function fn(e, o) {
|
|
|
1746
1746
|
componentStateTypes: Re,
|
|
1747
1747
|
app: e
|
|
1748
1748
|
}, (t) => {
|
|
1749
|
-
typeof t.now != "function" &&
|
|
1749
|
+
typeof t.now != "function" && U("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), t.addTimelineLayer({
|
|
1750
1750
|
id: ce,
|
|
1751
1751
|
label: "Pinia 🍍",
|
|
1752
1752
|
color: 15064968
|
|
@@ -1791,7 +1791,7 @@ function fn(e, o) {
|
|
|
1791
1791
|
tooltip: 'Reset the state (with "$reset")',
|
|
1792
1792
|
action: (n) => {
|
|
1793
1793
|
const l = o._s.get(n);
|
|
1794
|
-
l ? typeof l.$reset != "function" ?
|
|
1794
|
+
l ? typeof l.$reset != "function" ? U(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (l.$reset(), U(`Store "${n}" reset.`)) : U(`Cannot reset "${n}" store because it wasn't found.`, "warn");
|
|
1795
1795
|
}
|
|
1796
1796
|
}
|
|
1797
1797
|
]
|
|
@@ -1806,7 +1806,7 @@ function fn(e, o) {
|
|
|
1806
1806
|
editable: !0,
|
|
1807
1807
|
value: s._isOptionsAPI ? {
|
|
1808
1808
|
_custom: {
|
|
1809
|
-
value:
|
|
1809
|
+
value: ee(s.$state),
|
|
1810
1810
|
actions: [
|
|
1811
1811
|
{
|
|
1812
1812
|
icon: "restore",
|
|
@@ -1850,21 +1850,21 @@ function fn(e, o) {
|
|
|
1850
1850
|
if (n.app === e && n.inspectorId === W) {
|
|
1851
1851
|
const a = n.nodeId === Qe ? o : o._s.get(n.nodeId);
|
|
1852
1852
|
if (!a)
|
|
1853
|
-
return
|
|
1853
|
+
return U(`store "${n.nodeId}" not found`, "error");
|
|
1854
1854
|
const { path: i } = n;
|
|
1855
|
-
rt(a) ? i.unshift("state") : (i.length !== 1 || !a._customProperties.has(i[0]) || i[0] in a.$state) && i.unshift("$state"),
|
|
1855
|
+
rt(a) ? i.unshift("state") : (i.length !== 1 || !a._customProperties.has(i[0]) || i[0] in a.$state) && i.unshift("$state"), xe = !1, n.set(a, i, n.state.value), xe = !0;
|
|
1856
1856
|
}
|
|
1857
1857
|
}), t.on.editComponentState((n) => {
|
|
1858
1858
|
if (n.type.startsWith("🍍")) {
|
|
1859
1859
|
const l = n.type.replace(/^🍍\s*/, ""), a = o._s.get(l);
|
|
1860
1860
|
if (!a)
|
|
1861
|
-
return
|
|
1861
|
+
return U(`store "${l}" not found`, "error");
|
|
1862
1862
|
const { path: i } = n;
|
|
1863
1863
|
if (i[0] !== "state")
|
|
1864
|
-
return
|
|
1864
|
+
return U(`Invalid path for store "${l}":
|
|
1865
1865
|
${i}
|
|
1866
1866
|
Only state can be modified.`);
|
|
1867
|
-
i[0] = "$state",
|
|
1867
|
+
i[0] = "$state", xe = !1, n.set(a, i, n.state.value), xe = !0;
|
|
1868
1868
|
}
|
|
1869
1869
|
});
|
|
1870
1870
|
});
|
|
@@ -1901,8 +1901,8 @@ function pn(e, o) {
|
|
|
1901
1901
|
title: "🛫 " + r,
|
|
1902
1902
|
subtitle: "start",
|
|
1903
1903
|
data: {
|
|
1904
|
-
store:
|
|
1905
|
-
action:
|
|
1904
|
+
store: ne(o.$id),
|
|
1905
|
+
action: ne(r),
|
|
1906
1906
|
args: u
|
|
1907
1907
|
},
|
|
1908
1908
|
groupId: c
|
|
@@ -1915,8 +1915,8 @@ function pn(e, o) {
|
|
|
1915
1915
|
title: "🛬 " + r,
|
|
1916
1916
|
subtitle: "end",
|
|
1917
1917
|
data: {
|
|
1918
|
-
store:
|
|
1919
|
-
action:
|
|
1918
|
+
store: ne(o.$id),
|
|
1919
|
+
action: ne(r),
|
|
1920
1920
|
args: u,
|
|
1921
1921
|
result: p
|
|
1922
1922
|
},
|
|
@@ -1932,8 +1932,8 @@ function pn(e, o) {
|
|
|
1932
1932
|
title: "💥 " + r,
|
|
1933
1933
|
subtitle: "end",
|
|
1934
1934
|
data: {
|
|
1935
|
-
store:
|
|
1936
|
-
action:
|
|
1935
|
+
store: ne(o.$id),
|
|
1936
|
+
action: ne(r),
|
|
1937
1937
|
args: u,
|
|
1938
1938
|
error: p
|
|
1939
1939
|
},
|
|
@@ -1942,8 +1942,8 @@ function pn(e, o) {
|
|
|
1942
1942
|
});
|
|
1943
1943
|
});
|
|
1944
1944
|
}, !0), o._customProperties.forEach((i) => {
|
|
1945
|
-
|
|
1946
|
-
t.notifyComponentUpdate(), t.sendInspectorState(W),
|
|
1945
|
+
N(() => L(o[i]), (s, r) => {
|
|
1946
|
+
t.notifyComponentUpdate(), t.sendInspectorState(W), xe && t.addTimelineEvent({
|
|
1947
1947
|
layerId: ce,
|
|
1948
1948
|
event: {
|
|
1949
1949
|
time: n(),
|
|
@@ -1958,12 +1958,12 @@ function pn(e, o) {
|
|
|
1958
1958
|
});
|
|
1959
1959
|
}, { deep: !0 });
|
|
1960
1960
|
}), o.$subscribe(({ events: i, type: s }, r) => {
|
|
1961
|
-
if (t.notifyComponentUpdate(), t.sendInspectorState(W), !
|
|
1961
|
+
if (t.notifyComponentUpdate(), t.sendInspectorState(W), !xe)
|
|
1962
1962
|
return;
|
|
1963
1963
|
const u = {
|
|
1964
1964
|
time: n(),
|
|
1965
1965
|
title: cn(s),
|
|
1966
|
-
data: dn({ store:
|
|
1966
|
+
data: dn({ store: ne(o.$id) }, un(i)),
|
|
1967
1967
|
groupId: ie
|
|
1968
1968
|
};
|
|
1969
1969
|
s === le.patchFunction ? u.subtitle = "⤵️" : s === le.patchObject ? u.subtitle = "🧩" : i && !Array.isArray(i) && (u.subtitle = i.type), i && (u.data["rawEvent(s)"] = {
|
|
@@ -1987,21 +1987,21 @@ function pn(e, o) {
|
|
|
1987
1987
|
title: "🔥 " + o.$id,
|
|
1988
1988
|
subtitle: "HMR update",
|
|
1989
1989
|
data: {
|
|
1990
|
-
store:
|
|
1991
|
-
info:
|
|
1990
|
+
store: ne(o.$id),
|
|
1991
|
+
info: ne("HMR update")
|
|
1992
1992
|
}
|
|
1993
1993
|
}
|
|
1994
1994
|
}), t.notifyComponentUpdate(), t.sendInspectorTree(W), t.sendInspectorState(W);
|
|
1995
1995
|
});
|
|
1996
1996
|
const { $dispose: a } = o;
|
|
1997
1997
|
o.$dispose = () => {
|
|
1998
|
-
a(), t.notifyComponentUpdate(), t.sendInspectorTree(W), t.sendInspectorState(W), t.getSettings().logStoreChanges &&
|
|
1999
|
-
}, t.notifyComponentUpdate(), t.sendInspectorTree(W), t.sendInspectorState(W), t.getSettings().logStoreChanges &&
|
|
1998
|
+
a(), t.notifyComponentUpdate(), t.sendInspectorTree(W), t.sendInspectorState(W), t.getSettings().logStoreChanges && U(`Disposed "${o.$id}" store 🗑`);
|
|
1999
|
+
}, t.notifyComponentUpdate(), t.sendInspectorTree(W), t.sendInspectorState(W), t.getSettings().logStoreChanges && U(`"${o.$id}" store installed 🆕`);
|
|
2000
2000
|
});
|
|
2001
2001
|
}
|
|
2002
2002
|
let l2 = 0, ie;
|
|
2003
2003
|
function Ct(e, o, t) {
|
|
2004
|
-
const n = o.reduce((l, a) => (l[a] =
|
|
2004
|
+
const n = o.reduce((l, a) => (l[a] = ee(e)[a], l), {});
|
|
2005
2005
|
for (const l in n)
|
|
2006
2006
|
e[l] = function() {
|
|
2007
2007
|
const a = l2, i = t ? new Proxy(e, {
|
|
@@ -2022,7 +2022,7 @@ function vn({ app: e, store: o, options: t }) {
|
|
|
2022
2022
|
return;
|
|
2023
2023
|
o._isOptionsAPI = !!t.state, Ct(o, Object.keys(t.actions), o._isOptionsAPI);
|
|
2024
2024
|
const n = o._hotUpdate;
|
|
2025
|
-
|
|
2025
|
+
ee(o)._hotUpdate = function(l) {
|
|
2026
2026
|
n.apply(this, arguments), Ct(o, Object.keys(l._hmrPayload.actions), !!o._isOptionsAPI);
|
|
2027
2027
|
}, pn(
|
|
2028
2028
|
e,
|
|
@@ -2035,7 +2035,7 @@ function hn() {
|
|
|
2035
2035
|
let t = [], n = [];
|
|
2036
2036
|
const l = fe({
|
|
2037
2037
|
install(a) {
|
|
2038
|
-
|
|
2038
|
+
Ie(l), l._a = a, a.provide(Kt, l), a.config.globalProperties.$pinia = l, Se && fn(a, l), n.forEach((i) => t.push(i)), n = [];
|
|
2039
2039
|
},
|
|
2040
2040
|
use(a) {
|
|
2041
2041
|
return !this._a && !Gt ? n.push(a) : t.push(a), this;
|
|
@@ -2056,7 +2056,7 @@ function s2(e, o) {
|
|
|
2056
2056
|
if (!(t in e))
|
|
2057
2057
|
continue;
|
|
2058
2058
|
const l = e[t];
|
|
2059
|
-
pe(l) && pe(n) && !
|
|
2059
|
+
pe(l) && pe(n) && !ye(n) && !lt(n) ? e[t] = s2(l, n) : e[t] = n;
|
|
2060
2060
|
}
|
|
2061
2061
|
return e;
|
|
2062
2062
|
}
|
|
@@ -2070,7 +2070,7 @@ function xt(e, o, t, n = a2) {
|
|
|
2070
2070
|
};
|
|
2071
2071
|
return !t && Mt() && tt(l), l;
|
|
2072
2072
|
}
|
|
2073
|
-
function
|
|
2073
|
+
function Ce(e, ...o) {
|
|
2074
2074
|
e.slice().forEach((t) => {
|
|
2075
2075
|
t(...o);
|
|
2076
2076
|
});
|
|
@@ -2082,7 +2082,7 @@ function Xe(e, o) {
|
|
|
2082
2082
|
if (!o.hasOwnProperty(t))
|
|
2083
2083
|
continue;
|
|
2084
2084
|
const n = o[t], l = e[t];
|
|
2085
|
-
pe(l) && pe(n) && e.hasOwnProperty(t) && !
|
|
2085
|
+
pe(l) && pe(n) && e.hasOwnProperty(t) && !ye(n) && !lt(n) ? e[t] = Xe(l, n) : e[t] = n;
|
|
2086
2086
|
}
|
|
2087
2087
|
return e;
|
|
2088
2088
|
}
|
|
@@ -2093,9 +2093,9 @@ const bn = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration")
|
|
|
2093
2093
|
function gn(e) {
|
|
2094
2094
|
return !pe(e) || !e.hasOwnProperty(bn);
|
|
2095
2095
|
}
|
|
2096
|
-
const { assign:
|
|
2096
|
+
const { assign: X } = Object;
|
|
2097
2097
|
function yt(e) {
|
|
2098
|
-
return !!(
|
|
2098
|
+
return !!(ye(e) && e.effect);
|
|
2099
2099
|
}
|
|
2100
2100
|
function wt(e, o, t, n) {
|
|
2101
2101
|
const { state: l, actions: a, getters: i } = o, s = t.state.value[e];
|
|
@@ -2106,17 +2106,17 @@ function wt(e, o, t, n) {
|
|
|
2106
2106
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
2107
2107
|
ct($(l ? l() : {}).value)
|
|
2108
2108
|
) : ct(t.state.value[e]);
|
|
2109
|
-
return
|
|
2110
|
-
|
|
2109
|
+
return X(c, a, Object.keys(i || {}).reduce((p, g) => (process.env.NODE_ENV !== "production" && g in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${g}" in store "${e}".`), p[g] = fe(E(() => {
|
|
2110
|
+
Ie(t);
|
|
2111
2111
|
const w = t._s.get(e);
|
|
2112
|
-
return i[
|
|
2112
|
+
return i[g].call(w, w);
|
|
2113
2113
|
})), p), {}));
|
|
2114
2114
|
}
|
|
2115
2115
|
return r = et(e, u, o, t, n, !0), r;
|
|
2116
2116
|
}
|
|
2117
2117
|
function et(e, o, t = {}, n, l, a) {
|
|
2118
2118
|
let i;
|
|
2119
|
-
const s =
|
|
2119
|
+
const s = X({ actions: {} }, t);
|
|
2120
2120
|
if (process.env.NODE_ENV !== "production" && !n._e.active)
|
|
2121
2121
|
throw new Error("Pinia destroyed");
|
|
2122
2122
|
const r = {
|
|
@@ -2124,11 +2124,11 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2124
2124
|
// flush: 'post',
|
|
2125
2125
|
};
|
|
2126
2126
|
process.env.NODE_ENV !== "production" && !Gt && (r.onTrigger = (d) => {
|
|
2127
|
-
u ? w = d : u == !1 && !
|
|
2127
|
+
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."));
|
|
2128
2128
|
});
|
|
2129
|
-
let u, c, p = [],
|
|
2130
|
-
const
|
|
2131
|
-
!a && !
|
|
2129
|
+
let u, c, p = [], g = [], w;
|
|
2130
|
+
const b = n.state.value[e];
|
|
2131
|
+
!a && !b && (process.env.NODE_ENV === "production" || !l) && (n.state.value[e] = {});
|
|
2132
2132
|
const _ = $({});
|
|
2133
2133
|
let P;
|
|
2134
2134
|
function I(d) {
|
|
@@ -2144,14 +2144,14 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2144
2144
|
events: w
|
|
2145
2145
|
});
|
|
2146
2146
|
const S = P = Symbol();
|
|
2147
|
-
|
|
2147
|
+
oe().then(() => {
|
|
2148
2148
|
P === S && (u = !0);
|
|
2149
|
-
}), c = !0,
|
|
2149
|
+
}), c = !0, Ce(p, f, n.state.value[e]);
|
|
2150
2150
|
}
|
|
2151
2151
|
const x = a ? function() {
|
|
2152
2152
|
const { state: f } = t, S = f ? f() : {};
|
|
2153
2153
|
this.$patch((T) => {
|
|
2154
|
-
|
|
2154
|
+
X(T, S);
|
|
2155
2155
|
});
|
|
2156
2156
|
} : (
|
|
2157
2157
|
/* istanbul ignore next */
|
|
@@ -2159,33 +2159,33 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2159
2159
|
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
2160
2160
|
} : a2
|
|
2161
2161
|
);
|
|
2162
|
-
function
|
|
2163
|
-
i.stop(), p = [],
|
|
2162
|
+
function A() {
|
|
2163
|
+
i.stop(), p = [], g = [], n._s.delete(e);
|
|
2164
2164
|
}
|
|
2165
2165
|
function R(d, f) {
|
|
2166
2166
|
return function() {
|
|
2167
|
-
|
|
2167
|
+
Ie(n);
|
|
2168
2168
|
const S = Array.from(arguments), T = [], F = [];
|
|
2169
|
-
function D(
|
|
2170
|
-
T.push(
|
|
2169
|
+
function D(z) {
|
|
2170
|
+
T.push(z);
|
|
2171
2171
|
}
|
|
2172
|
-
function
|
|
2173
|
-
F.push(
|
|
2172
|
+
function Y(z) {
|
|
2173
|
+
F.push(z);
|
|
2174
2174
|
}
|
|
2175
|
-
|
|
2175
|
+
Ce(g, {
|
|
2176
2176
|
args: S,
|
|
2177
2177
|
name: d,
|
|
2178
|
-
store:
|
|
2178
|
+
store: C,
|
|
2179
2179
|
after: D,
|
|
2180
|
-
onError:
|
|
2180
|
+
onError: Y
|
|
2181
2181
|
});
|
|
2182
|
-
let
|
|
2182
|
+
let Q;
|
|
2183
2183
|
try {
|
|
2184
|
-
|
|
2185
|
-
} catch (
|
|
2186
|
-
throw
|
|
2184
|
+
Q = f.apply(this && this.$id === e ? this : C, S);
|
|
2185
|
+
} catch (z) {
|
|
2186
|
+
throw Ce(F, z), z;
|
|
2187
2187
|
}
|
|
2188
|
-
return
|
|
2188
|
+
return Q instanceof Promise ? Q.then((z) => (Ce(T, z), z)).catch((z) => (Ce(F, z), Promise.reject(z))) : (Ce(T, Q), Q);
|
|
2189
2189
|
};
|
|
2190
2190
|
}
|
|
2191
2191
|
const y = /* @__PURE__ */ fe({
|
|
@@ -2197,21 +2197,21 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2197
2197
|
_p: n,
|
|
2198
2198
|
// _s: scope,
|
|
2199
2199
|
$id: e,
|
|
2200
|
-
$onAction: xt.bind(null,
|
|
2200
|
+
$onAction: xt.bind(null, g),
|
|
2201
2201
|
$patch: I,
|
|
2202
2202
|
$reset: x,
|
|
2203
2203
|
$subscribe(d, f = {}) {
|
|
2204
|
-
const S = xt(p, d, f.detached, () => T()), T = i.run(() =>
|
|
2204
|
+
const S = xt(p, d, f.detached, () => T()), T = i.run(() => N(() => n.state.value[e], (F) => {
|
|
2205
2205
|
(f.flush === "sync" ? c : u) && d({
|
|
2206
2206
|
storeId: e,
|
|
2207
2207
|
type: le.direct,
|
|
2208
2208
|
events: w
|
|
2209
2209
|
}, F);
|
|
2210
|
-
},
|
|
2210
|
+
}, X({}, r, f)));
|
|
2211
2211
|
return S;
|
|
2212
2212
|
},
|
|
2213
|
-
$dispose:
|
|
2214
|
-
},
|
|
2213
|
+
$dispose: A
|
|
2214
|
+
}, C = It(process.env.NODE_ENV !== "production" || Se ? X(
|
|
2215
2215
|
{
|
|
2216
2216
|
_hmrPayload: y,
|
|
2217
2217
|
_customProperties: fe(/* @__PURE__ */ new Set())
|
|
@@ -2221,58 +2221,58 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2221
2221
|
// must be added later
|
|
2222
2222
|
// setupStore
|
|
2223
2223
|
) : M);
|
|
2224
|
-
n._s.set(e,
|
|
2225
|
-
const
|
|
2226
|
-
for (const d in
|
|
2227
|
-
const f =
|
|
2228
|
-
if (
|
|
2229
|
-
process.env.NODE_ENV !== "production" && l ?
|
|
2224
|
+
n._s.set(e, C);
|
|
2225
|
+
const k = (n._a && n._a.runWithContext || mn)(() => n._e.run(() => (i = Tt()).run(o)));
|
|
2226
|
+
for (const d in k) {
|
|
2227
|
+
const f = k[d];
|
|
2228
|
+
if (ye(f) && !yt(f) || lt(f))
|
|
2229
|
+
process.env.NODE_ENV !== "production" && l ? Ve(_.value, d, Ge(k, d)) : a || (b && gn(f) && (ye(f) ? f.value = b[d] : Xe(f, b[d])), n.state.value[e][d] = f), process.env.NODE_ENV !== "production" && y.state.push(d);
|
|
2230
2230
|
else if (typeof f == "function") {
|
|
2231
2231
|
const S = process.env.NODE_ENV !== "production" && l ? f : R(d, f);
|
|
2232
|
-
|
|
2232
|
+
k[d] = S, process.env.NODE_ENV !== "production" && (y.actions[d] = f), s.actions[d] = f;
|
|
2233
2233
|
} else process.env.NODE_ENV !== "production" && yt(f) && (y.getters[d] = a ? (
|
|
2234
2234
|
// @ts-expect-error
|
|
2235
2235
|
t.getters[d]
|
|
2236
|
-
) : f, He && (
|
|
2237
|
-
(
|
|
2236
|
+
) : f, He && (k._getters || // @ts-expect-error: same
|
|
2237
|
+
(k._getters = fe([]))).push(d));
|
|
2238
2238
|
}
|
|
2239
|
-
if (
|
|
2239
|
+
if (X(C, k), X(ee(C), k), Object.defineProperty(C, "$state", {
|
|
2240
2240
|
get: () => process.env.NODE_ENV !== "production" && l ? _.value : n.state.value[e],
|
|
2241
2241
|
set: (d) => {
|
|
2242
2242
|
if (process.env.NODE_ENV !== "production" && l)
|
|
2243
2243
|
throw new Error("cannot set hotState");
|
|
2244
2244
|
I((f) => {
|
|
2245
|
-
|
|
2245
|
+
X(f, d);
|
|
2246
2246
|
});
|
|
2247
2247
|
}
|
|
2248
|
-
}), process.env.NODE_ENV !== "production" && (
|
|
2249
|
-
|
|
2250
|
-
if (f in
|
|
2251
|
-
const S = d.$state[f], T =
|
|
2248
|
+
}), process.env.NODE_ENV !== "production" && (C._hotUpdate = fe((d) => {
|
|
2249
|
+
C._hotUpdating = !0, d._hmrPayload.state.forEach((f) => {
|
|
2250
|
+
if (f in C.$state) {
|
|
2251
|
+
const S = d.$state[f], T = C.$state[f];
|
|
2252
2252
|
typeof S == "object" && pe(S) && pe(T) ? s2(S, T) : d.$state[f] = T;
|
|
2253
2253
|
}
|
|
2254
|
-
|
|
2255
|
-
}), Object.keys(
|
|
2256
|
-
f in d.$state || Ke(
|
|
2257
|
-
}), u = !1, c = !1, n.state.value[e] = Ge(d._hmrPayload, "hotState"), c = !0,
|
|
2254
|
+
Ve(C, f, Ge(d.$state, f));
|
|
2255
|
+
}), Object.keys(C.$state).forEach((f) => {
|
|
2256
|
+
f in d.$state || Ke(C, f);
|
|
2257
|
+
}), u = !1, c = !1, n.state.value[e] = Ge(d._hmrPayload, "hotState"), c = !0, oe().then(() => {
|
|
2258
2258
|
u = !0;
|
|
2259
2259
|
});
|
|
2260
2260
|
for (const f in d._hmrPayload.actions) {
|
|
2261
2261
|
const S = d[f];
|
|
2262
|
-
|
|
2262
|
+
Ve(C, f, R(f, S));
|
|
2263
2263
|
}
|
|
2264
2264
|
for (const f in d._hmrPayload.getters) {
|
|
2265
2265
|
const S = d._hmrPayload.getters[f], T = a ? (
|
|
2266
2266
|
// special handling of options api
|
|
2267
|
-
E(() => (
|
|
2267
|
+
E(() => (Ie(n), S.call(C, C)))
|
|
2268
2268
|
) : S;
|
|
2269
|
-
|
|
2269
|
+
Ve(C, f, T);
|
|
2270
2270
|
}
|
|
2271
|
-
Object.keys(
|
|
2272
|
-
f in d._hmrPayload.getters || Ke(
|
|
2273
|
-
}), Object.keys(
|
|
2274
|
-
f in d._hmrPayload.actions || Ke(
|
|
2275
|
-
}),
|
|
2271
|
+
Object.keys(C._hmrPayload.getters).forEach((f) => {
|
|
2272
|
+
f in d._hmrPayload.getters || Ke(C, f);
|
|
2273
|
+
}), Object.keys(C._hmrPayload.actions).forEach((f) => {
|
|
2274
|
+
f in d._hmrPayload.actions || Ke(C, f);
|
|
2275
|
+
}), C._hmrPayload = d._hmrPayload, C._getters = d._getters, C._hotUpdating = !1;
|
|
2276
2276
|
})), Se) {
|
|
2277
2277
|
const d = {
|
|
2278
2278
|
writable: !0,
|
|
@@ -2281,28 +2281,28 @@ function et(e, o, t = {}, n, l, a) {
|
|
|
2281
2281
|
enumerable: !1
|
|
2282
2282
|
};
|
|
2283
2283
|
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((f) => {
|
|
2284
|
-
Object.defineProperty(
|
|
2284
|
+
Object.defineProperty(C, f, X({ value: C[f] }, d));
|
|
2285
2285
|
});
|
|
2286
2286
|
}
|
|
2287
2287
|
return n._p.forEach((d) => {
|
|
2288
2288
|
if (Se) {
|
|
2289
2289
|
const f = i.run(() => d({
|
|
2290
|
-
store:
|
|
2290
|
+
store: C,
|
|
2291
2291
|
app: n._a,
|
|
2292
2292
|
pinia: n,
|
|
2293
2293
|
options: s
|
|
2294
2294
|
}));
|
|
2295
|
-
Object.keys(f || {}).forEach((S) =>
|
|
2295
|
+
Object.keys(f || {}).forEach((S) => C._customProperties.add(S)), X(C, f);
|
|
2296
2296
|
} else
|
|
2297
|
-
|
|
2298
|
-
store:
|
|
2297
|
+
X(C, i.run(() => d({
|
|
2298
|
+
store: C,
|
|
2299
2299
|
app: n._a,
|
|
2300
2300
|
pinia: n,
|
|
2301
2301
|
options: s
|
|
2302
2302
|
})));
|
|
2303
|
-
}), process.env.NODE_ENV !== "production" &&
|
|
2303
|
+
}), process.env.NODE_ENV !== "production" && C.$state && typeof C.$state == "object" && typeof C.$state.constructor == "function" && !C.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
2304
2304
|
state: () => new MyClass()
|
|
2305
|
-
Found in store "${
|
|
2305
|
+
Found in store "${C.$id}".`), b && a && t.hydrate && t.hydrate(C.$state, b), u = !0, c = !0, C;
|
|
2306
2306
|
}
|
|
2307
2307
|
function ze(e, o, t) {
|
|
2308
2308
|
let n, l;
|
|
@@ -2315,21 +2315,21 @@ function ze(e, o, t) {
|
|
|
2315
2315
|
const u = h2();
|
|
2316
2316
|
if (s = // in test mode, ignore the argument provided as we can always retrieve a
|
|
2317
2317
|
// pinia instance with getActivePinia()
|
|
2318
|
-
(process.env.NODE_ENV === "test" && _e && _e._testing ? null : s) || (u ? Te(Kt, null) : null), s &&
|
|
2318
|
+
(process.env.NODE_ENV === "test" && _e && _e._testing ? null : s) || (u ? Te(Kt, null) : null), s && Ie(s), process.env.NODE_ENV !== "production" && !_e)
|
|
2319
2319
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
2320
2320
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
2321
2321
|
This will fail in production.`);
|
|
2322
2322
|
s = _e, s._s.has(n) || (a ? et(n, o, l, s) : wt(n, l, s), process.env.NODE_ENV !== "production" && (i._pinia = s));
|
|
2323
2323
|
const c = s._s.get(n);
|
|
2324
2324
|
if (process.env.NODE_ENV !== "production" && r) {
|
|
2325
|
-
const p = "__hot:" + n,
|
|
2326
|
-
r._hotUpdate(
|
|
2325
|
+
const p = "__hot:" + n, g = a ? et(p, o, l, s, !0) : wt(p, X({}, l), s, !0);
|
|
2326
|
+
r._hotUpdate(g), delete s.state.value[p], s._s.delete(p);
|
|
2327
2327
|
}
|
|
2328
2328
|
if (process.env.NODE_ENV !== "production" && He) {
|
|
2329
2329
|
const p = Lt();
|
|
2330
2330
|
if (p && p.proxy && // avoid adding stores that are just built for hot module replacement
|
|
2331
2331
|
!r) {
|
|
2332
|
-
const
|
|
2332
|
+
const g = p.proxy, w = "_pStores" in g ? g._pStores : g._pStores = {};
|
|
2333
2333
|
w[n] = c;
|
|
2334
2334
|
}
|
|
2335
2335
|
}
|
|
@@ -2363,27 +2363,27 @@ const Me = ze("loader", () => {
|
|
|
2363
2363
|
)), s = (r) => {
|
|
2364
2364
|
r.target.value = "", l.value = "", a.value && a.value.$el.click();
|
|
2365
2365
|
};
|
|
2366
|
-
return (r, u) => (
|
|
2366
|
+
return (r, u) => (m(), q(L(P0), {
|
|
2367
2367
|
modelValue: n.value,
|
|
2368
2368
|
"onUpdate:modelValue": u[3] || (u[3] = (c) => n.value = c),
|
|
2369
2369
|
disabled: L(o).loading,
|
|
2370
2370
|
as: "div",
|
|
2371
2371
|
class: "relative mt-1"
|
|
2372
2372
|
}, {
|
|
2373
|
-
default:
|
|
2374
|
-
|
|
2373
|
+
default: ke(() => [
|
|
2374
|
+
B(L(D0), {
|
|
2375
2375
|
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",
|
|
2376
2376
|
onChange: u[0] || (u[0] = (c) => l.value = c.target.value),
|
|
2377
2377
|
displayValue: (c) => e.languages[c],
|
|
2378
2378
|
onFocus: u[1] || (u[1] = (c) => s(c))
|
|
2379
2379
|
}, null, 8, ["displayValue"]),
|
|
2380
|
-
|
|
2380
|
+
B(L(R0), {
|
|
2381
2381
|
ref_key: "btnSelect",
|
|
2382
2382
|
ref: a,
|
|
2383
2383
|
class: "absolute inset-y-0 right-0 flex items-center pr-2"
|
|
2384
2384
|
}, {
|
|
2385
|
-
default:
|
|
2386
|
-
|
|
2385
|
+
default: ke(() => [
|
|
2386
|
+
B(L(H0), {
|
|
2387
2387
|
class: "h-5 w-5 text-gray-400",
|
|
2388
2388
|
"aria-hidden": "true",
|
|
2389
2389
|
onClick: u[2] || (u[2] = (c) => s(c))
|
|
@@ -2391,22 +2391,22 @@ const Me = ze("loader", () => {
|
|
|
2391
2391
|
]),
|
|
2392
2392
|
_: 1
|
|
2393
2393
|
}, 512),
|
|
2394
|
-
|
|
2395
|
-
default:
|
|
2396
|
-
(
|
|
2394
|
+
B(L(N0), { 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" }, {
|
|
2395
|
+
default: ke(() => [
|
|
2396
|
+
(m(!0), O(G, null, te(i.value, ([c, p]) => (m(), q(L(B0), {
|
|
2397
2397
|
key: c,
|
|
2398
2398
|
value: c
|
|
2399
2399
|
}, {
|
|
2400
|
-
default:
|
|
2400
|
+
default: ke(({ active: g, selected: w }) => [
|
|
2401
2401
|
v("li", {
|
|
2402
|
-
class:
|
|
2402
|
+
class: j([
|
|
2403
2403
|
"relative cursor-default select-none py-2 pl-3 pr-9",
|
|
2404
|
-
|
|
2404
|
+
g ? "bg-[#3B5695] text-white" : "text-textCustom"
|
|
2405
2405
|
])
|
|
2406
2406
|
}, [
|
|
2407
2407
|
v("span", {
|
|
2408
|
-
class:
|
|
2409
|
-
},
|
|
2408
|
+
class: j(["block truncate", w && "font-semibold"])
|
|
2409
|
+
}, K(p), 3)
|
|
2410
2410
|
], 2)
|
|
2411
2411
|
]),
|
|
2412
2412
|
_: 2
|
|
@@ -2441,11 +2441,11 @@ const Me = ze("loader", () => {
|
|
|
2441
2441
|
emits: ["swap"],
|
|
2442
2442
|
setup(e, { emit: o }) {
|
|
2443
2443
|
const t = Me(), n = E(() => t.isLoading("translation")), l = o;
|
|
2444
|
-
return (a, i) => e.isBidirect ? (
|
|
2444
|
+
return (a, i) => e.isBidirect ? (m(), O("button", {
|
|
2445
2445
|
key: 1,
|
|
2446
2446
|
onClick: i[0] || (i[0] = (s) => l("swap")),
|
|
2447
2447
|
disabled: n.value
|
|
2448
|
-
}, Sn, 8, wn)) : (
|
|
2448
|
+
}, Sn, 8, wn)) : (m(), O("button", {
|
|
2449
2449
|
key: 0,
|
|
2450
2450
|
disabled: n.value
|
|
2451
2451
|
}, yn, 8, Cn));
|
|
@@ -2469,35 +2469,73 @@ const Me = ze("loader", () => {
|
|
|
2469
2469
|
return { languages: t, src: e, target: o, srcLabel: n, targetLabel: l, init: a, swap: i, getLabel: s };
|
|
2470
2470
|
}), On = {
|
|
2471
2471
|
key: 0,
|
|
2472
|
-
class: "flex"
|
|
2473
|
-
}, In = {
|
|
2472
|
+
class: "flex flex-col"
|
|
2473
|
+
}, $n = { class: "flex" }, In = { class: "grow flex flex-col" }, Tn = {
|
|
2474
|
+
key: 0,
|
|
2475
|
+
class: "flex mt-1 space-x-1"
|
|
2476
|
+
}, Ln = ["onClick"], Mn = { class: "grow flex flex-col" }, kn = {
|
|
2477
|
+
key: 0,
|
|
2478
|
+
class: "flex mt-1 space-x-1"
|
|
2479
|
+
}, An = ["onClick"], Vn = {
|
|
2474
2480
|
__name: "Selects",
|
|
2475
2481
|
setup(e) {
|
|
2476
|
-
const o = Ue();
|
|
2477
|
-
function
|
|
2482
|
+
const o = Ue(), t = $([]), n = $([]);
|
|
2483
|
+
function l() {
|
|
2478
2484
|
o.swap();
|
|
2479
2485
|
}
|
|
2480
|
-
return (
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
}
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
}
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
"
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
},
|
|
2486
|
+
return ve(() => {
|
|
2487
|
+
console.log("recentTarget", n.value);
|
|
2488
|
+
}), N(
|
|
2489
|
+
() => o.src,
|
|
2490
|
+
(a) => {
|
|
2491
|
+
t.value.includes(a) || (t.value.unshift(a), t.value = t.value.slice(0, 3));
|
|
2492
|
+
}
|
|
2493
|
+
), N(
|
|
2494
|
+
() => o.target,
|
|
2495
|
+
(a) => {
|
|
2496
|
+
n.value.includes(a) || (n.value.unshift(a), n.value = n.value.slice(0, 3));
|
|
2497
|
+
}
|
|
2498
|
+
), (a, i) => L(o).languages ? (m(), O("div", On, [
|
|
2499
|
+
v("div", $n, [
|
|
2500
|
+
v("div", In, [
|
|
2501
|
+
B(_t, {
|
|
2502
|
+
modelValue: L(o).src,
|
|
2503
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => L(o).src = s),
|
|
2504
|
+
languages: L(o).languages.src,
|
|
2505
|
+
class: "grow"
|
|
2506
|
+
}, null, 8, ["modelValue", "languages"]),
|
|
2507
|
+
t.value.length > 0 ? (m(), O("div", Tn, [
|
|
2508
|
+
(m(!0), O(G, null, te(t.value, (s) => (m(), O("button", {
|
|
2509
|
+
key: s,
|
|
2510
|
+
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",
|
|
2511
|
+
onClick: (r) => L(o).src = s
|
|
2512
|
+
}, K(L(o).languages.src[s]), 9, Ln))), 128))
|
|
2513
|
+
])) : H("", !0)
|
|
2514
|
+
]),
|
|
2515
|
+
B(En, {
|
|
2516
|
+
isBidirect: L(o).src !== "auto",
|
|
2517
|
+
class: "grow-0 mx-3 mt-4 self-start",
|
|
2518
|
+
onSwap: l
|
|
2519
|
+
}, null, 8, ["isBidirect"]),
|
|
2520
|
+
v("div", Mn, [
|
|
2521
|
+
B(_t, {
|
|
2522
|
+
modelValue: L(o).target,
|
|
2523
|
+
"onUpdate:modelValue": i[1] || (i[1] = (s) => L(o).target = s),
|
|
2524
|
+
languages: L(o).languages.target,
|
|
2525
|
+
class: "grow"
|
|
2526
|
+
}, null, 8, ["modelValue", "languages"]),
|
|
2527
|
+
n.value.length > 0 ? (m(), O("div", kn, [
|
|
2528
|
+
(m(!0), O(G, null, te(n.value, (s) => (m(), O("button", {
|
|
2529
|
+
key: s,
|
|
2530
|
+
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",
|
|
2531
|
+
onClick: (r) => L(o).target = s
|
|
2532
|
+
}, K(L(o).languages.target[s]), 9, An))), 128))
|
|
2533
|
+
])) : H("", !0)
|
|
2534
|
+
])
|
|
2535
|
+
])
|
|
2536
|
+
])) : H("", !0);
|
|
2537
|
+
}
|
|
2538
|
+
}, Fn = {
|
|
2501
2539
|
INPUT_MAX_LENGTH: 5e3,
|
|
2502
2540
|
INPUT_DEBOUNCE: 500
|
|
2503
2541
|
}, Ze = (e, o) => {
|
|
@@ -2505,11 +2543,11 @@ const Me = ze("loader", () => {
|
|
|
2505
2543
|
for (const [n, l] of o)
|
|
2506
2544
|
t[n] = l;
|
|
2507
2545
|
return t;
|
|
2508
|
-
},
|
|
2509
|
-
function
|
|
2510
|
-
return
|
|
2546
|
+
}, Pn = {}, Rn = { class: "mr-2 loading loading-dots loading-xs" };
|
|
2547
|
+
function Dn(e, o) {
|
|
2548
|
+
return m(), O("span", Rn);
|
|
2511
2549
|
}
|
|
2512
|
-
const r2 = /* @__PURE__ */ Ze(
|
|
2550
|
+
const r2 = /* @__PURE__ */ Ze(Pn, [["render", Dn]]), u2 = ze("tts", () => {
|
|
2513
2551
|
const e = $({
|
|
2514
2552
|
src: null,
|
|
2515
2553
|
target: null
|
|
@@ -2533,7 +2571,7 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2533
2571
|
get: t,
|
|
2534
2572
|
reset: n
|
|
2535
2573
|
};
|
|
2536
|
-
}),
|
|
2574
|
+
}), Nn = "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", Bn = "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"], Hn = ["src"], zn = ["src"], Un = {
|
|
2537
2575
|
__name: "SpeakBtn",
|
|
2538
2576
|
props: {
|
|
2539
2577
|
type: {
|
|
@@ -2545,7 +2583,7 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2545
2583
|
emits: ["loadTTS"],
|
|
2546
2584
|
setup(e, { emit: o }) {
|
|
2547
2585
|
const t = u2(), n = e, l = o, a = E(() => t.tts[n.type]), i = $(!1), s = new Audio();
|
|
2548
|
-
|
|
2586
|
+
N(
|
|
2549
2587
|
a,
|
|
2550
2588
|
() => {
|
|
2551
2589
|
if (!a.value) {
|
|
@@ -2575,19 +2613,19 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2575
2613
|
}
|
|
2576
2614
|
return s.onended = () => {
|
|
2577
2615
|
i.value = !1;
|
|
2578
|
-
}, (p,
|
|
2616
|
+
}, (p, g) => i.value ? (m(), O("button", {
|
|
2579
2617
|
key: 1,
|
|
2580
2618
|
class: "btn btn-xs btn-circle",
|
|
2581
2619
|
onClick: dt(c, ["prevent"])
|
|
2582
2620
|
}, [
|
|
2583
2621
|
v("img", {
|
|
2584
|
-
src: L(
|
|
2622
|
+
src: L(Bn),
|
|
2585
2623
|
alt: "Stop",
|
|
2586
2624
|
class: "w-4 transition-all duration-200"
|
|
2587
|
-
}, null, 8,
|
|
2588
|
-
])) : (
|
|
2625
|
+
}, null, 8, zn)
|
|
2626
|
+
])) : (m(), O("button", {
|
|
2589
2627
|
key: 0,
|
|
2590
|
-
class:
|
|
2628
|
+
class: j(["btn btn-xs btn-circle", [
|
|
2591
2629
|
{ "btn-ghost": !e.disabled },
|
|
2592
2630
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2593
2631
|
]]),
|
|
@@ -2595,90 +2633,90 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2595
2633
|
onClick: dt(r, ["prevent"])
|
|
2596
2634
|
}, [
|
|
2597
2635
|
v("img", {
|
|
2598
|
-
src: L(
|
|
2636
|
+
src: L(Nn),
|
|
2599
2637
|
alt: "Play",
|
|
2600
|
-
class:
|
|
2601
|
-
}, null, 10,
|
|
2602
|
-
], 10,
|
|
2638
|
+
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2639
|
+
}, null, 10, Hn)
|
|
2640
|
+
], 10, jn));
|
|
2603
2641
|
}
|
|
2604
|
-
},
|
|
2642
|
+
}, Zn = "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", Wn = {
|
|
2605
2643
|
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",
|
|
2606
2644
|
"data-tip": "Clear"
|
|
2607
|
-
},
|
|
2645
|
+
}, Gn = ["disabled"], qn = ["src"], Jn = {
|
|
2608
2646
|
__name: "ClearBtn",
|
|
2609
2647
|
props: {
|
|
2610
2648
|
disabled: Boolean
|
|
2611
2649
|
},
|
|
2612
2650
|
setup(e) {
|
|
2613
|
-
return (o, t) => (
|
|
2651
|
+
return (o, t) => (m(), O("div", Wn, [
|
|
2614
2652
|
v("button", {
|
|
2615
|
-
class:
|
|
2653
|
+
class: j(["btn btn-xs btn-circle", [
|
|
2616
2654
|
{ "btn-ghost": !e.disabled },
|
|
2617
2655
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2618
2656
|
]]),
|
|
2619
2657
|
disabled: e.disabled
|
|
2620
2658
|
}, [
|
|
2621
2659
|
v("img", {
|
|
2622
|
-
src: L(
|
|
2660
|
+
src: L(Zn),
|
|
2623
2661
|
alt: "Clear",
|
|
2624
|
-
class:
|
|
2625
|
-
}, null, 10,
|
|
2626
|
-
], 10,
|
|
2662
|
+
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2663
|
+
}, null, 10, qn)
|
|
2664
|
+
], 10, Gn)
|
|
2627
2665
|
]));
|
|
2628
2666
|
}
|
|
2629
|
-
},
|
|
2667
|
+
}, Kn = "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", Yn = "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", Qn = {
|
|
2630
2668
|
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",
|
|
2631
2669
|
"data-tip": "Favorite"
|
|
2632
|
-
},
|
|
2670
|
+
}, Xn = ["disabled"], eo = ["src"], to = {
|
|
2633
2671
|
__name: "FavoriteBtn",
|
|
2634
2672
|
props: {
|
|
2635
2673
|
disabled: Boolean,
|
|
2636
2674
|
isFilled: Boolean
|
|
2637
2675
|
},
|
|
2638
2676
|
setup(e) {
|
|
2639
|
-
return (o, t) => (
|
|
2677
|
+
return (o, t) => (m(), O("div", Qn, [
|
|
2640
2678
|
v("button", {
|
|
2641
|
-
class:
|
|
2679
|
+
class: j(["btn btn-xs btn-circle", [
|
|
2642
2680
|
{ "btn-ghost": !e.disabled },
|
|
2643
2681
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2644
2682
|
]]),
|
|
2645
2683
|
disabled: e.disabled
|
|
2646
2684
|
}, [
|
|
2647
2685
|
v("img", {
|
|
2648
|
-
src: e.isFilled ? L(
|
|
2686
|
+
src: e.isFilled ? L(Kn) : L(Yn),
|
|
2649
2687
|
alt: "Favorite",
|
|
2650
|
-
class:
|
|
2651
|
-
}, null, 10,
|
|
2652
|
-
], 10,
|
|
2688
|
+
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2689
|
+
}, null, 10, eo)
|
|
2690
|
+
], 10, Xn)
|
|
2653
2691
|
]));
|
|
2654
2692
|
}
|
|
2655
|
-
},
|
|
2693
|
+
}, no = "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", oo = "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", lo = {
|
|
2656
2694
|
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
2695
|
"data-tip": "AI Translate"
|
|
2658
|
-
},
|
|
2696
|
+
}, so = ["disabled"], ao = ["src"], c2 = {
|
|
2659
2697
|
__name: "AIBtn",
|
|
2660
2698
|
props: {
|
|
2661
2699
|
disabled: Boolean,
|
|
2662
2700
|
isFilled: Boolean
|
|
2663
2701
|
},
|
|
2664
2702
|
setup(e) {
|
|
2665
|
-
return (o, t) => (
|
|
2703
|
+
return (o, t) => (m(), O("div", lo, [
|
|
2666
2704
|
v("button", {
|
|
2667
|
-
class:
|
|
2705
|
+
class: j(["btn btn-xs btn-circle", [
|
|
2668
2706
|
{ "btn-ghost": !e.disabled },
|
|
2669
2707
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2670
2708
|
]]),
|
|
2671
2709
|
disabled: e.disabled
|
|
2672
2710
|
}, [
|
|
2673
2711
|
v("img", {
|
|
2674
|
-
src: e.isFilled ? L(
|
|
2712
|
+
src: e.isFilled ? L(no) : L(oo),
|
|
2675
2713
|
alt: "AI",
|
|
2676
|
-
class:
|
|
2677
|
-
}, null, 10,
|
|
2678
|
-
], 10,
|
|
2714
|
+
class: j(["w-4 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2715
|
+
}, null, 10, ao)
|
|
2716
|
+
], 10, so)
|
|
2679
2717
|
]));
|
|
2680
2718
|
}
|
|
2681
|
-
},
|
|
2719
|
+
}, io = "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", ro = ["data-tip"], uo = ["disabled"], co = ["src"], fo = {
|
|
2682
2720
|
__name: "CopyBtn",
|
|
2683
2721
|
props: {
|
|
2684
2722
|
disabled: Boolean
|
|
@@ -2689,12 +2727,12 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2689
2727
|
o.value = "Copy";
|
|
2690
2728
|
}, 1e3);
|
|
2691
2729
|
};
|
|
2692
|
-
return (n, l) => (
|
|
2730
|
+
return (n, l) => (m(), O("div", {
|
|
2693
2731
|
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",
|
|
2694
2732
|
"data-tip": o.value
|
|
2695
2733
|
}, [
|
|
2696
2734
|
v("button", {
|
|
2697
|
-
class:
|
|
2735
|
+
class: j(["btn btn-xs btn-circle", [
|
|
2698
2736
|
{ "btn-ghost": !e.disabled },
|
|
2699
2737
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
2700
2738
|
]]),
|
|
@@ -2702,17 +2740,17 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2702
2740
|
onClick: t
|
|
2703
2741
|
}, [
|
|
2704
2742
|
v("img", {
|
|
2705
|
-
src: L(
|
|
2743
|
+
src: L(io),
|
|
2706
2744
|
alt: "Copy",
|
|
2707
|
-
class:
|
|
2708
|
-
}, null, 10,
|
|
2709
|
-
], 10,
|
|
2710
|
-
], 8,
|
|
2745
|
+
class: j(["w-3 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
2746
|
+
}, null, 10, co)
|
|
2747
|
+
], 10, uo)
|
|
2748
|
+
], 8, ro));
|
|
2711
2749
|
}
|
|
2712
|
-
},
|
|
2750
|
+
}, po = { class: "flex flex-row px-2 pr-10 pt-1 items-center bg-transparent relative" }, vo = { class: "ml-1 text-sm text-gray-600" }, ho = {
|
|
2713
2751
|
key: 0,
|
|
2714
2752
|
class: "italic"
|
|
2715
|
-
},
|
|
2753
|
+
}, mo = { class: "absolute right-1 top-1 flex flex-col items-center gap-0" }, bo = {
|
|
2716
2754
|
__name: "TranslationBtnGroup",
|
|
2717
2755
|
props: {
|
|
2718
2756
|
loading: {
|
|
@@ -2772,58 +2810,58 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2772
2810
|
emits: ["clear", "favorite", "loadTTS", "aiTranslate", "copy"],
|
|
2773
2811
|
setup(e, { emit: o }) {
|
|
2774
2812
|
const t = e, n = o;
|
|
2775
|
-
return (l, a) => (
|
|
2776
|
-
t.src ? (
|
|
2813
|
+
return (l, a) => (m(), O("div", po, [
|
|
2814
|
+
t.src ? (m(), q(Un, {
|
|
2777
2815
|
key: 0,
|
|
2778
2816
|
type: t.type,
|
|
2779
2817
|
onLoadTTS: a[0] || (a[0] = (i) => n("loadTTS"))
|
|
2780
|
-
}, null, 8, ["type"])) :
|
|
2781
|
-
v("div",
|
|
2782
|
-
g2(
|
|
2783
|
-
e.phonetic ? (
|
|
2818
|
+
}, null, 8, ["type"])) : H("", !0),
|
|
2819
|
+
v("div", vo, [
|
|
2820
|
+
g2(K(e.srcLabel) + " ", 1),
|
|
2821
|
+
e.phonetic ? (m(), O("span", ho, "- [" + K(t.phonetic) + "]", 1)) : H("", !0)
|
|
2784
2822
|
]),
|
|
2785
|
-
t.loading ? (
|
|
2823
|
+
t.loading ? (m(), q(r2, {
|
|
2786
2824
|
key: 1,
|
|
2787
2825
|
class: "absolute right-6 top-2"
|
|
2788
|
-
})) :
|
|
2789
|
-
v("div",
|
|
2790
|
-
e.hasClearBtn && e.src ? (
|
|
2826
|
+
})) : H("", !0),
|
|
2827
|
+
v("div", mo, [
|
|
2828
|
+
e.hasClearBtn && e.src ? (m(), q(Jn, {
|
|
2791
2829
|
key: 0,
|
|
2792
2830
|
onClick: a[1] || (a[1] = (i) => n("clear")),
|
|
2793
2831
|
disabled: e.loading
|
|
2794
|
-
}, null, 8, ["disabled"])) :
|
|
2795
|
-
e.src && !e.hasDictionary && e.hasAIBtn ? (
|
|
2832
|
+
}, null, 8, ["disabled"])) : H("", !0),
|
|
2833
|
+
e.src && !e.hasDictionary && e.hasAIBtn ? (m(), q(c2, {
|
|
2796
2834
|
key: 1,
|
|
2797
2835
|
isFilled: e.isAITranslate,
|
|
2798
2836
|
onClick: a[2] || (a[2] = (i) => n("aiTranslate")),
|
|
2799
2837
|
disabled: e.loading
|
|
2800
|
-
}, null, 8, ["isFilled", "disabled"])) :
|
|
2801
|
-
e.src && e.hasFavoriteBtn ? (
|
|
2838
|
+
}, null, 8, ["isFilled", "disabled"])) : H("", !0),
|
|
2839
|
+
e.src && e.hasFavoriteBtn ? (m(), q(to, {
|
|
2802
2840
|
key: 2,
|
|
2803
2841
|
isFilled: e.isFavorite,
|
|
2804
2842
|
onClick: a[3] || (a[3] = (i) => n("favorite")),
|
|
2805
2843
|
disabled: e.loading
|
|
2806
|
-
}, null, 8, ["isFilled", "disabled"])) :
|
|
2807
|
-
e.src && e.hasCopyBtn ? (
|
|
2844
|
+
}, null, 8, ["isFilled", "disabled"])) : H("", !0),
|
|
2845
|
+
e.src && e.hasCopyBtn ? (m(), q(fo, {
|
|
2808
2846
|
key: 3,
|
|
2809
2847
|
onClick: a[4] || (a[4] = (i) => n("copy")),
|
|
2810
2848
|
disabled: e.loading
|
|
2811
|
-
}, null, 8, ["disabled"])) :
|
|
2849
|
+
}, null, 8, ["disabled"])) : H("", !0)
|
|
2812
2850
|
])
|
|
2813
2851
|
]));
|
|
2814
2852
|
}
|
|
2815
|
-
}, d2 = /* @__PURE__ */ Ze(
|
|
2853
|
+
}, d2 = /* @__PURE__ */ Ze(bo, [["__scopeId", "data-v-c9ef8858"]]), be = ze("translation", () => {
|
|
2816
2854
|
const e = $(null), o = $(null), t = $(null), n = $({
|
|
2817
2855
|
src: null,
|
|
2818
2856
|
target: null
|
|
2819
2857
|
}), l = $(null), a = $([]), i = $([]), s = $([]), r = $([]), u = $({
|
|
2820
2858
|
src: null,
|
|
2821
2859
|
target: null
|
|
2822
|
-
}), c = Ue(), p = E(() => c.getLabel(e.value)),
|
|
2860
|
+
}), c = Ue(), p = E(() => c.getLabel(e.value)), g = E(() => c.getLabel(o.value));
|
|
2823
2861
|
function w(_) {
|
|
2824
2862
|
e.value = _.src, o.value = _.target, t.value = _.text, n.value = _.phonetic, l.value = _.result, a.value = _.dictionary, i.value = _.definitions, s.value = _.synonyms, r.value = _.examples, u.value = _.tts;
|
|
2825
2863
|
}
|
|
2826
|
-
function
|
|
2864
|
+
function b() {
|
|
2827
2865
|
e.value = null, o.value = null, t.value = null, n.value = {
|
|
2828
2866
|
src: null,
|
|
2829
2867
|
target: null
|
|
@@ -2836,7 +2874,7 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2836
2874
|
src: e,
|
|
2837
2875
|
srcLabel: p,
|
|
2838
2876
|
target: o,
|
|
2839
|
-
targetLabel:
|
|
2877
|
+
targetLabel: g,
|
|
2840
2878
|
phonetic: n,
|
|
2841
2879
|
text: t,
|
|
2842
2880
|
result: l,
|
|
@@ -2846,20 +2884,20 @@ const r2 = /* @__PURE__ */ Ze(Tn, [["render", Mn]]), u2 = ze("tts", () => {
|
|
|
2846
2884
|
examples: r,
|
|
2847
2885
|
tts: u,
|
|
2848
2886
|
init: w,
|
|
2849
|
-
reset:
|
|
2887
|
+
reset: b
|
|
2850
2888
|
};
|
|
2851
2889
|
});
|
|
2852
|
-
function
|
|
2890
|
+
function go(e) {
|
|
2853
2891
|
return Mt() ? (tt(e), !0) : !1;
|
|
2854
2892
|
}
|
|
2855
2893
|
function Be(e) {
|
|
2856
2894
|
return typeof e == "function" ? e() : L(e);
|
|
2857
2895
|
}
|
|
2858
|
-
const
|
|
2896
|
+
const Co = typeof window < "u" && typeof document < "u";
|
|
2859
2897
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
2860
2898
|
const St = () => {
|
|
2861
2899
|
};
|
|
2862
|
-
function
|
|
2900
|
+
function xo(e, o) {
|
|
2863
2901
|
function t(...n) {
|
|
2864
2902
|
return new Promise((l, a) => {
|
|
2865
2903
|
Promise.resolve(e(() => o.apply(this, n), { fn: o, thisArg: this, args: n })).then(l).catch(a);
|
|
@@ -2867,7 +2905,7 @@ function po(e, o) {
|
|
|
2867
2905
|
}
|
|
2868
2906
|
return t;
|
|
2869
2907
|
}
|
|
2870
|
-
function
|
|
2908
|
+
function yo(e, o = {}) {
|
|
2871
2909
|
let t, n, l = St;
|
|
2872
2910
|
const a = (s) => {
|
|
2873
2911
|
clearTimeout(s), l(), l = St;
|
|
@@ -2883,9 +2921,9 @@ function vo(e, o = {}) {
|
|
|
2883
2921
|
});
|
|
2884
2922
|
};
|
|
2885
2923
|
}
|
|
2886
|
-
function
|
|
2887
|
-
return
|
|
2888
|
-
|
|
2924
|
+
function wo(e, o = 200, t = {}) {
|
|
2925
|
+
return xo(
|
|
2926
|
+
yo(o, t),
|
|
2889
2927
|
e
|
|
2890
2928
|
);
|
|
2891
2929
|
}
|
|
@@ -2894,36 +2932,36 @@ function Et(e) {
|
|
|
2894
2932
|
const t = Be(e);
|
|
2895
2933
|
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
2896
2934
|
}
|
|
2897
|
-
const
|
|
2898
|
-
function
|
|
2935
|
+
const _o = Co ? window : void 0;
|
|
2936
|
+
function So() {
|
|
2899
2937
|
const e = $(!1), o = Lt();
|
|
2900
|
-
return o &&
|
|
2938
|
+
return o && ve(() => {
|
|
2901
2939
|
e.value = !0;
|
|
2902
2940
|
}, o), e;
|
|
2903
2941
|
}
|
|
2904
|
-
function
|
|
2905
|
-
const o =
|
|
2942
|
+
function Eo(e) {
|
|
2943
|
+
const o = So();
|
|
2906
2944
|
return E(() => (o.value, !!e()));
|
|
2907
2945
|
}
|
|
2908
|
-
function
|
|
2909
|
-
const { window: n =
|
|
2946
|
+
function Oo(e, o, t = {}) {
|
|
2947
|
+
const { window: n = _o, ...l } = t;
|
|
2910
2948
|
let a;
|
|
2911
|
-
const i =
|
|
2949
|
+
const i = Eo(() => n && "ResizeObserver" in n), s = () => {
|
|
2912
2950
|
a && (a.disconnect(), a = void 0);
|
|
2913
|
-
}, r = E(() => Array.isArray(e) ? e.map((p) => Et(p)) : [Et(e)]), u =
|
|
2951
|
+
}, r = E(() => Array.isArray(e) ? e.map((p) => Et(p)) : [Et(e)]), u = N(
|
|
2914
2952
|
r,
|
|
2915
2953
|
(p) => {
|
|
2916
2954
|
if (s(), i.value && n) {
|
|
2917
2955
|
a = new ResizeObserver(o);
|
|
2918
|
-
for (const
|
|
2919
|
-
|
|
2956
|
+
for (const g of p)
|
|
2957
|
+
g && a.observe(g, l);
|
|
2920
2958
|
}
|
|
2921
2959
|
},
|
|
2922
2960
|
{ immediate: !0, flush: "post" }
|
|
2923
2961
|
), c = () => {
|
|
2924
2962
|
s(), u();
|
|
2925
2963
|
};
|
|
2926
|
-
return
|
|
2964
|
+
return go(c), {
|
|
2927
2965
|
isSupported: i,
|
|
2928
2966
|
stop: c
|
|
2929
2967
|
};
|
|
@@ -2938,16 +2976,16 @@ function f2(e) {
|
|
|
2938
2976
|
let r = "";
|
|
2939
2977
|
t.value.style[l] = "1px", a.value = (s = t.value) == null ? void 0 : s.scrollHeight, e != null && e.styleTarget ? Be(e.styleTarget).style[l] = `${a.value}px` : r = `${a.value}px`, t.value.style[l] = r;
|
|
2940
2978
|
}
|
|
2941
|
-
return
|
|
2979
|
+
return N([n, t], () => oe(i), { immediate: !0 }), N(a, () => {
|
|
2942
2980
|
var s;
|
|
2943
2981
|
return (s = e == null ? void 0 : e.onResize) == null ? void 0 : s.call(e);
|
|
2944
|
-
}),
|
|
2982
|
+
}), Oo(t, () => i()), e != null && e.watch && N(e.watch, i, { immediate: !0, deep: !0 }), {
|
|
2945
2983
|
textarea: t,
|
|
2946
2984
|
input: n,
|
|
2947
2985
|
triggerResize: i
|
|
2948
2986
|
};
|
|
2949
2987
|
}
|
|
2950
|
-
const
|
|
2988
|
+
const $o = { class: "bg-white relative z-10 border rounded-md" }, Io = {
|
|
2951
2989
|
__name: "TranslationInput",
|
|
2952
2990
|
props: {
|
|
2953
2991
|
text: {
|
|
@@ -2957,42 +2995,42 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
2957
2995
|
},
|
|
2958
2996
|
emits: ["change", "clear", "loadTTS"],
|
|
2959
2997
|
setup(e, { emit: o }) {
|
|
2960
|
-
const t =
|
|
2961
|
-
var
|
|
2962
|
-
return (
|
|
2963
|
-
}), { textarea: r } = f2({ input: l, styleProp: "minHeight" }), u = o, c =
|
|
2998
|
+
const t = be(), n = e, l = $(""), a = E(() => t.src), i = E(() => t.srcLabel), s = E(() => {
|
|
2999
|
+
var b;
|
|
3000
|
+
return (b = t.phonetic) == null ? void 0 : b.src;
|
|
3001
|
+
}), { textarea: r } = f2({ input: l, styleProp: "minHeight" }), u = o, c = wo(() => {
|
|
2964
3002
|
u("change", l.value);
|
|
2965
|
-
},
|
|
3003
|
+
}, Fn.INPUT_DEBOUNCE);
|
|
2966
3004
|
function p() {
|
|
2967
3005
|
if (!l.value) {
|
|
2968
|
-
|
|
3006
|
+
g();
|
|
2969
3007
|
return;
|
|
2970
3008
|
}
|
|
2971
3009
|
c();
|
|
2972
3010
|
}
|
|
2973
|
-
function
|
|
3011
|
+
function g() {
|
|
2974
3012
|
u("clear"), l.value = "", r.value.focus();
|
|
2975
3013
|
}
|
|
2976
3014
|
async function w() {
|
|
2977
|
-
await
|
|
3015
|
+
await oe(), r.value.select();
|
|
2978
3016
|
}
|
|
2979
|
-
return
|
|
3017
|
+
return N(
|
|
2980
3018
|
() => n.text,
|
|
2981
|
-
(
|
|
2982
|
-
l.value !==
|
|
3019
|
+
(b) => {
|
|
3020
|
+
l.value !== b && w(), l.value = b;
|
|
2983
3021
|
}
|
|
2984
|
-
), (
|
|
2985
|
-
|
|
3022
|
+
), (b, _) => (m(), O("div", $o, [
|
|
3023
|
+
B(d2, {
|
|
2986
3024
|
src: a.value,
|
|
2987
3025
|
srcLabel: i.value,
|
|
2988
3026
|
type: "src",
|
|
2989
3027
|
phonetic: s.value,
|
|
2990
3028
|
hasClearBtn: !0,
|
|
2991
|
-
onClear:
|
|
3029
|
+
onClear: g,
|
|
2992
3030
|
onLoadTTS: _[0] || (_[0] = (P) => u("loadTTS")),
|
|
2993
3031
|
class: "mb-2"
|
|
2994
3032
|
}, null, 8, ["src", "srcLabel", "phonetic"]),
|
|
2995
|
-
|
|
3033
|
+
kt(v("textarea", {
|
|
2996
3034
|
ref_key: "textarea",
|
|
2997
3035
|
ref: r,
|
|
2998
3036
|
"onUpdate:modelValue": _[1] || (_[1] = (P) => l.value = P),
|
|
@@ -3003,7 +3041,7 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3003
3041
|
onFocus: w
|
|
3004
3042
|
}, null, 544), [
|
|
3005
3043
|
[
|
|
3006
|
-
|
|
3044
|
+
At,
|
|
3007
3045
|
l.value,
|
|
3008
3046
|
void 0,
|
|
3009
3047
|
{ trim: !0 }
|
|
@@ -3011,10 +3049,10 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3011
3049
|
])
|
|
3012
3050
|
]));
|
|
3013
3051
|
}
|
|
3014
|
-
},
|
|
3052
|
+
}, To = /* @__PURE__ */ Ze(Io, [["__scopeId", "data-v-3d7638d0"]]), Lo = (e) => (C2("data-v-7edf5093"), e = e(), x2(), e), Mo = { class: "bg-white relative z-10 rounded-md h-full" }, ko = { class: "bg-transparent" }, Ao = {
|
|
3015
3053
|
key: 0,
|
|
3016
3054
|
class: "w-full flex items-center justify-end absolute -bottom-6 left-2 right-0 px-2 z-20"
|
|
3017
|
-
},
|
|
3055
|
+
}, Vo = /* @__PURE__ */ Lo(() => /* @__PURE__ */ v("span", { class: "text-sm text-gray-600" }, " Powered by Ddict AI ", -1)), Fo = {
|
|
3018
3056
|
__name: "TranslationResult",
|
|
3019
3057
|
props: {
|
|
3020
3058
|
isFavoriteFeatureEnabled: Boolean,
|
|
@@ -3024,23 +3062,23 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3024
3062
|
},
|
|
3025
3063
|
emits: ["loadTTS", "favorite", "aiTranslate", "copy"],
|
|
3026
3064
|
setup(e, { emit: o }) {
|
|
3027
|
-
const t =
|
|
3065
|
+
const t = be(), n = E(() => t.result), l = E(() => t.target), a = E(() => t.targetLabel), i = E(() => {
|
|
3028
3066
|
var w;
|
|
3029
3067
|
return (w = t.phonetic) == null ? void 0 : w.target;
|
|
3030
3068
|
}), s = E(() => {
|
|
3031
3069
|
var w;
|
|
3032
3070
|
return !!((w = t.dictionary) != null && w.length);
|
|
3033
|
-
}), r = Me(), u = E(() => r.isLoading("translation")), { textarea: c, input: p } = f2({ input: n, styleProp: "minHeight" }),
|
|
3034
|
-
return (w,
|
|
3035
|
-
class:
|
|
3071
|
+
}), r = Me(), u = E(() => r.isLoading("translation")), { textarea: c, input: p } = f2({ input: n, styleProp: "minHeight" }), g = o;
|
|
3072
|
+
return (w, b) => (m(), O("div", {
|
|
3073
|
+
class: j([
|
|
3036
3074
|
"relative p-0.5 transition-all duration-300 ease-in-out bg-[length:300%_300%] bg-[position:0%_50%] border rounded-lg",
|
|
3037
3075
|
{
|
|
3038
3076
|
"bg-gradient-to-br from-[#8556f0] via-[#d6b379] via-[#6bedd1] to-[#439beb] animate-moveGradient border border-white": e.isAITranslate && !u.value
|
|
3039
3077
|
}
|
|
3040
3078
|
])
|
|
3041
3079
|
}, [
|
|
3042
|
-
v("div",
|
|
3043
|
-
|
|
3080
|
+
v("div", Mo, [
|
|
3081
|
+
B(d2, {
|
|
3044
3082
|
loading: u.value,
|
|
3045
3083
|
src: l.value,
|
|
3046
3084
|
srcLabel: a.value,
|
|
@@ -3052,85 +3090,85 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3052
3090
|
isAITranslate: e.isAITranslate,
|
|
3053
3091
|
hasDictionary: s.value,
|
|
3054
3092
|
phonetic: i.value,
|
|
3055
|
-
onFavorite:
|
|
3056
|
-
onLoadTTS:
|
|
3057
|
-
onAiTranslate:
|
|
3058
|
-
onCopy:
|
|
3093
|
+
onFavorite: b[0] || (b[0] = (_) => g("favorite")),
|
|
3094
|
+
onLoadTTS: b[1] || (b[1] = (_) => g("loadTTS")),
|
|
3095
|
+
onAiTranslate: b[2] || (b[2] = (_) => g("aiTranslate")),
|
|
3096
|
+
onCopy: b[3] || (b[3] = (_) => g("copy")),
|
|
3059
3097
|
class: "mb-2"
|
|
3060
3098
|
}, null, 8, ["loading", "src", "srcLabel", "hasFavoriteBtn", "hasAIBtn", "isFavorite", "isAITranslate", "hasDictionary", "phonetic"]),
|
|
3061
|
-
v("div",
|
|
3062
|
-
|
|
3099
|
+
v("div", ko, [
|
|
3100
|
+
kt(v("textarea", {
|
|
3063
3101
|
ref_key: "textarea",
|
|
3064
3102
|
ref: c,
|
|
3065
|
-
"onUpdate:modelValue":
|
|
3103
|
+
"onUpdate:modelValue": b[4] || (b[4] = (_) => ye(p) ? p.value = _ : null),
|
|
3066
3104
|
class: "w-full outline-none px-5 pr-8 bg-transparent text-gray-800 resize-none pb-3 overflow-x-hidden overflow-y-hidden",
|
|
3067
3105
|
readonly: "",
|
|
3068
3106
|
rows: "2",
|
|
3069
3107
|
spellcheck: "false"
|
|
3070
3108
|
}, null, 512), [
|
|
3071
|
-
[
|
|
3109
|
+
[At, L(p)]
|
|
3072
3110
|
])
|
|
3073
3111
|
])
|
|
3074
3112
|
]),
|
|
3075
|
-
e.isAITranslate ? (
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
])) :
|
|
3113
|
+
e.isAITranslate ? (m(), O("div", Ao, [
|
|
3114
|
+
Vo,
|
|
3115
|
+
B(c2, { disabled: "" })
|
|
3116
|
+
])) : H("", !0)
|
|
3079
3117
|
], 2));
|
|
3080
3118
|
}
|
|
3081
|
-
},
|
|
3119
|
+
}, Po = /* @__PURE__ */ Ze(Fo, [["__scopeId", "data-v-7edf5093"]]), Ro = { class: "btn btn-sm btn-circle btn-ghost" }, We = {
|
|
3082
3120
|
__name: "ToggleBtn",
|
|
3083
3121
|
props: {
|
|
3084
3122
|
isExpanded: Boolean
|
|
3085
3123
|
},
|
|
3086
3124
|
setup(e) {
|
|
3087
3125
|
const o = e;
|
|
3088
|
-
return (t, n) => (
|
|
3089
|
-
o.isExpanded ? (
|
|
3126
|
+
return (t, n) => (m(), O("button", Ro, [
|
|
3127
|
+
o.isExpanded ? (m(), q(L(z0), {
|
|
3090
3128
|
key: 0,
|
|
3091
3129
|
class: "w-7 text-gray-400"
|
|
3092
|
-
})) : (
|
|
3130
|
+
})) : (m(), q(L(j0), {
|
|
3093
3131
|
key: 1,
|
|
3094
3132
|
class: "w-7 text-gray-400"
|
|
3095
3133
|
}))
|
|
3096
3134
|
]));
|
|
3097
3135
|
}
|
|
3098
|
-
},
|
|
3136
|
+
}, Do = { class: "card border bg-white rounded-lg" }, No = { class: "card-body px-4 py-2 gap-0" }, Bo = { class: "flex justify-between items-center" }, jo = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Translations", -1), Ho = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, zo = { class: "list-none list-inside" }, Uo = ["onClick"], Zo = { class: "text-base font-normal text-gray-800 leading-4" }, Wo = {
|
|
3099
3137
|
__name: "Dictionary",
|
|
3100
3138
|
emits: ["translate"],
|
|
3101
3139
|
setup(e, { emit: o }) {
|
|
3102
|
-
const t = $(!0), n =
|
|
3140
|
+
const t = $(!0), n = be(), l = Ue(), a = E(() => n.dictionary), i = o, s = () => {
|
|
3103
3141
|
t.value = !t.value;
|
|
3104
3142
|
}, r = (u) => {
|
|
3105
3143
|
i("translate", u, n.target, n.src), l.src = n.target, l.target = n.src, window.scrollTo(0, 0);
|
|
3106
3144
|
};
|
|
3107
|
-
return (u, c) => (
|
|
3108
|
-
v("div",
|
|
3109
|
-
v("div",
|
|
3110
|
-
|
|
3111
|
-
|
|
3145
|
+
return (u, c) => (m(), O("div", Do, [
|
|
3146
|
+
v("div", No, [
|
|
3147
|
+
v("div", Bo, [
|
|
3148
|
+
jo,
|
|
3149
|
+
B(We, {
|
|
3112
3150
|
isExpanded: t.value,
|
|
3113
3151
|
onClick: s
|
|
3114
3152
|
}, null, 8, ["isExpanded"])
|
|
3115
3153
|
]),
|
|
3116
3154
|
v("div", {
|
|
3117
|
-
class:
|
|
3155
|
+
class: j(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3118
3156
|
}, [
|
|
3119
3157
|
v("ul", null, [
|
|
3120
|
-
(
|
|
3121
|
-
key: `${p.pos}-${
|
|
3158
|
+
(m(!0), O(G, null, te(a.value, (p, g) => (m(), O("li", {
|
|
3159
|
+
key: `${p.pos}-${g}`,
|
|
3122
3160
|
class: "mb-2"
|
|
3123
3161
|
}, [
|
|
3124
|
-
v("h5",
|
|
3125
|
-
v("ul",
|
|
3126
|
-
(
|
|
3127
|
-
key: `${w.word}-${
|
|
3162
|
+
v("h5", Ho, K(p.pos), 1),
|
|
3163
|
+
v("ul", zo, [
|
|
3164
|
+
(m(!0), O(G, null, te(p.items, (w, b) => (m(), O("li", {
|
|
3165
|
+
key: `${w.word}-${b}`
|
|
3128
3166
|
}, [
|
|
3129
3167
|
v("span", {
|
|
3130
3168
|
class: "p-3 m-0.5 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3131
3169
|
onClick: (_) => r(w.word)
|
|
3132
|
-
},
|
|
3133
|
-
v("small",
|
|
3170
|
+
}, K(w.word), 9, Uo),
|
|
3171
|
+
v("small", Zo, " - " + K(w.reverse_translation.join(", ")), 1)
|
|
3134
3172
|
]))), 128))
|
|
3135
3173
|
])
|
|
3136
3174
|
]))), 128))
|
|
@@ -3139,41 +3177,41 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3139
3177
|
])
|
|
3140
3178
|
]));
|
|
3141
3179
|
}
|
|
3142
|
-
},
|
|
3180
|
+
}, Go = { class: "card border bg-white rounded-lg" }, qo = { class: "card-body px-4 py-2 gap-0" }, Jo = { class: "flex justify-between items-center" }, Ko = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Definitions", -1), Yo = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, Qo = { class: "text-base text-textCustom list-decimal list-outside ml-5" }, Xo = /* @__PURE__ */ v("br", null, null, -1), el = {
|
|
3143
3181
|
key: 0,
|
|
3144
3182
|
class: "italic"
|
|
3145
|
-
},
|
|
3183
|
+
}, tl = {
|
|
3146
3184
|
__name: "Definition",
|
|
3147
3185
|
setup(e) {
|
|
3148
|
-
const o = $(!0), t =
|
|
3186
|
+
const o = $(!0), t = be(), n = E(() => t.definitions), l = () => {
|
|
3149
3187
|
o.value = !o.value;
|
|
3150
3188
|
};
|
|
3151
|
-
return (a, i) => (
|
|
3152
|
-
v("div",
|
|
3153
|
-
v("div",
|
|
3154
|
-
|
|
3155
|
-
|
|
3189
|
+
return (a, i) => (m(), O("div", Go, [
|
|
3190
|
+
v("div", qo, [
|
|
3191
|
+
v("div", Jo, [
|
|
3192
|
+
Ko,
|
|
3193
|
+
B(We, {
|
|
3156
3194
|
isExpanded: o.value,
|
|
3157
3195
|
onClick: l
|
|
3158
3196
|
}, null, 8, ["isExpanded"])
|
|
3159
3197
|
]),
|
|
3160
3198
|
v("div", {
|
|
3161
|
-
class:
|
|
3199
|
+
class: j(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3162
3200
|
}, [
|
|
3163
3201
|
v("ul", null, [
|
|
3164
|
-
(
|
|
3202
|
+
(m(!0), O(G, null, te(n.value, (s, r) => (m(), O("li", {
|
|
3165
3203
|
key: `${s.pos}-${r}`,
|
|
3166
3204
|
class: "mb-2"
|
|
3167
3205
|
}, [
|
|
3168
|
-
v("h5",
|
|
3169
|
-
v("ul",
|
|
3170
|
-
(
|
|
3206
|
+
v("h5", Yo, K(s.pos), 1),
|
|
3207
|
+
v("ul", Qo, [
|
|
3208
|
+
(m(!0), O(G, null, te(s.items, (u, c) => (m(), O("li", {
|
|
3171
3209
|
key: `${u.gloss}-${c}`,
|
|
3172
3210
|
class: "mb-1"
|
|
3173
3211
|
}, [
|
|
3174
|
-
v("span", null,
|
|
3175
|
-
|
|
3176
|
-
u.example ? (
|
|
3212
|
+
v("span", null, K(u.gloss), 1),
|
|
3213
|
+
Xo,
|
|
3214
|
+
u.example ? (m(), O("small", el, '"' + K(u.example) + '"', 1)) : H("", !0)
|
|
3177
3215
|
]))), 128))
|
|
3178
3216
|
])
|
|
3179
3217
|
]))), 128))
|
|
@@ -3182,72 +3220,72 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3182
3220
|
])
|
|
3183
3221
|
]));
|
|
3184
3222
|
}
|
|
3185
|
-
},
|
|
3223
|
+
}, nl = { class: "card border bg-white rounded-lg" }, ol = { class: "card-body px-4 py-2 gap-0" }, ll = { class: "flex justify-between items-center" }, sl = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Examples", -1), al = { class: "text-textCustom list-decimal list-outside ml-7 my-2" }, il = ["innerHTML"], rl = {
|
|
3186
3224
|
__name: "Example",
|
|
3187
3225
|
setup(e) {
|
|
3188
|
-
const o = $(!0), t =
|
|
3226
|
+
const o = $(!0), t = be(), n = E(() => t.examples), l = () => {
|
|
3189
3227
|
o.value = !o.value;
|
|
3190
3228
|
};
|
|
3191
|
-
return (a, i) => (
|
|
3192
|
-
v("div",
|
|
3193
|
-
v("div",
|
|
3194
|
-
|
|
3195
|
-
|
|
3229
|
+
return (a, i) => (m(), O("div", nl, [
|
|
3230
|
+
v("div", ol, [
|
|
3231
|
+
v("div", ll, [
|
|
3232
|
+
sl,
|
|
3233
|
+
B(We, {
|
|
3196
3234
|
isExpanded: o.value,
|
|
3197
3235
|
onClick: l
|
|
3198
3236
|
}, null, 8, ["isExpanded"])
|
|
3199
3237
|
]),
|
|
3200
3238
|
v("div", {
|
|
3201
|
-
class:
|
|
3239
|
+
class: j(["overflow-hidden transition-all duration-300 ease-in-out", o.value ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3202
3240
|
}, [
|
|
3203
|
-
v("ul",
|
|
3204
|
-
(
|
|
3241
|
+
v("ul", al, [
|
|
3242
|
+
(m(!0), O(G, null, te(n.value, (s, r) => (m(), O("li", {
|
|
3205
3243
|
key: `${s.definition_id}-${r}`,
|
|
3206
3244
|
innerHTML: s
|
|
3207
|
-
}, null, 8,
|
|
3245
|
+
}, null, 8, il))), 128))
|
|
3208
3246
|
])
|
|
3209
3247
|
], 2)
|
|
3210
3248
|
])
|
|
3211
3249
|
]));
|
|
3212
3250
|
}
|
|
3213
|
-
},
|
|
3251
|
+
}, ul = { class: "card border bg-white rounded-lg" }, cl = { class: "card-body px-4 py-2 gap-0" }, dl = { class: "flex justify-between items-center" }, fl = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "Synonyms", -1), pl = { class: "capitalize text-base font-normal text-textSecondary mb-1" }, vl = { class: "list-none list-inside" }, hl = { class: "flex flex-wrap" }, ml = ["onClick"], bl = {
|
|
3214
3252
|
__name: "Synonyms",
|
|
3215
3253
|
emits: ["translate"],
|
|
3216
3254
|
setup(e, { emit: o }) {
|
|
3217
|
-
const t = $(!0), n =
|
|
3255
|
+
const t = $(!0), n = be(), l = E(() => n.synonyms), a = o, i = () => {
|
|
3218
3256
|
t.value = !t.value;
|
|
3219
3257
|
}, s = (r) => {
|
|
3220
3258
|
a("translate", r), window.scrollTo(0, 0);
|
|
3221
3259
|
};
|
|
3222
|
-
return (r, u) => (
|
|
3223
|
-
v("div",
|
|
3224
|
-
v("div",
|
|
3225
|
-
|
|
3226
|
-
|
|
3260
|
+
return (r, u) => (m(), O("div", ul, [
|
|
3261
|
+
v("div", cl, [
|
|
3262
|
+
v("div", dl, [
|
|
3263
|
+
fl,
|
|
3264
|
+
B(We, {
|
|
3227
3265
|
isExpanded: t.value,
|
|
3228
3266
|
onClick: i
|
|
3229
3267
|
}, null, 8, ["isExpanded"])
|
|
3230
3268
|
]),
|
|
3231
3269
|
v("div", {
|
|
3232
|
-
class:
|
|
3270
|
+
class: j(["overflow-hidden transition-all duration-300 ease-in-out", t.value ? "max-h-[2000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3233
3271
|
}, [
|
|
3234
3272
|
v("ul", null, [
|
|
3235
|
-
(
|
|
3273
|
+
(m(!0), O(G, null, te(l.value, (c, p) => (m(), O("li", {
|
|
3236
3274
|
key: `${c.pos}-${p}`,
|
|
3237
3275
|
class: "mb-2"
|
|
3238
3276
|
}, [
|
|
3239
|
-
v("h5",
|
|
3240
|
-
v("ul",
|
|
3241
|
-
(
|
|
3242
|
-
key: `${
|
|
3277
|
+
v("h5", pl, K(c.pos), 1),
|
|
3278
|
+
v("ul", vl, [
|
|
3279
|
+
(m(!0), O(G, null, te(c.items, (g, w) => (m(), O("li", {
|
|
3280
|
+
key: `${g.word}-${w}`,
|
|
3243
3281
|
class: "mb-2"
|
|
3244
3282
|
}, [
|
|
3245
|
-
v("div",
|
|
3246
|
-
(
|
|
3247
|
-
key: `${
|
|
3283
|
+
v("div", hl, [
|
|
3284
|
+
(m(!0), O(G, null, te(g.synonym, (b, _) => (m(), O("span", {
|
|
3285
|
+
key: `${b}-${_}`,
|
|
3248
3286
|
class: "p-3 m-0.5 ml-0 font-normal badge badge-ghost bg-primaryColor text-white cursor-pointer border-0 rounded-lg",
|
|
3249
|
-
onClick: (P) => s(
|
|
3250
|
-
},
|
|
3287
|
+
onClick: (P) => s(b)
|
|
3288
|
+
}, K(b), 9, ml))), 128))
|
|
3251
3289
|
])
|
|
3252
3290
|
]))), 128))
|
|
3253
3291
|
])
|
|
@@ -3257,34 +3295,34 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3257
3295
|
])
|
|
3258
3296
|
]));
|
|
3259
3297
|
}
|
|
3260
|
-
},
|
|
3298
|
+
}, gl = "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", Cl = "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", xl = ["disabled"], yl = ["src"], wl = {
|
|
3261
3299
|
__name: "ChevronAIBtn",
|
|
3262
3300
|
props: {
|
|
3263
3301
|
disabled: Boolean,
|
|
3264
3302
|
isExpanded: Boolean
|
|
3265
3303
|
},
|
|
3266
3304
|
setup(e) {
|
|
3267
|
-
return (o, t) => (
|
|
3268
|
-
class:
|
|
3305
|
+
return (o, t) => (m(), O("button", {
|
|
3306
|
+
class: j(["btn btn-sm btn-circle", [
|
|
3269
3307
|
{ "btn-ghost": !e.disabled },
|
|
3270
3308
|
{ "!bg-transparent !border-none !shadow-none !ring-0": e.disabled }
|
|
3271
3309
|
]]),
|
|
3272
3310
|
disabled: e.disabled
|
|
3273
3311
|
}, [
|
|
3274
3312
|
v("img", {
|
|
3275
|
-
src: e.isExpanded ? L(
|
|
3313
|
+
src: e.isExpanded ? L(gl) : L(Cl),
|
|
3276
3314
|
alt: "AI",
|
|
3277
|
-
class:
|
|
3278
|
-
}, null, 10,
|
|
3279
|
-
], 10,
|
|
3315
|
+
class: j(["w-6 transition-all duration-200", [{ "opacity-100": !e.disabled }, { "opacity-50 transform ": e.disabled }]])
|
|
3316
|
+
}, null, 10, yl)
|
|
3317
|
+
], 10, xl));
|
|
3280
3318
|
}
|
|
3281
|
-
},
|
|
3319
|
+
}, _l = { class: "card-body bg-white px-4 py-2 gap-0 relative z-10 rounded-md" }, Sl = { class: "flex justify-between items-center" }, El = /* @__PURE__ */ v("h2", { class: "card-title text-base font-bold leading-6 text-textCustom" }, "AI Summary", -1), Ol = { class: "flex items-center" }, $l = {
|
|
3282
3320
|
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",
|
|
3283
3321
|
"data-tip": "AI Summarize"
|
|
3284
|
-
},
|
|
3322
|
+
}, Il = {
|
|
3285
3323
|
key: 0,
|
|
3286
3324
|
class: "text-textCustom list-none list-outside my-2"
|
|
3287
|
-
},
|
|
3325
|
+
}, Tl = ["innerHTML"], Ll = {
|
|
3288
3326
|
__name: "AIExplanation",
|
|
3289
3327
|
props: {
|
|
3290
3328
|
isAIExplain: {
|
|
@@ -3304,21 +3342,21 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3304
3342
|
};
|
|
3305
3343
|
return (i, s) => {
|
|
3306
3344
|
var r, u;
|
|
3307
|
-
return
|
|
3308
|
-
class:
|
|
3345
|
+
return m(), O("div", {
|
|
3346
|
+
class: j(["card border bg-white rounded-lg mb-8", [
|
|
3309
3347
|
"relative p-0.5 transition-all duration-300 ease-in-out bg-[length:300%_300%] bg-[position:0%_50%] border rounded-lg",
|
|
3310
3348
|
{
|
|
3311
3349
|
"bg-gradient-to-br from-[#8556f0] via-[#d6b379] via-[#6bedd1] to-[#439beb] animate-moveGradient border border-white": e.isAIExplain
|
|
3312
3350
|
}
|
|
3313
3351
|
]])
|
|
3314
3352
|
}, [
|
|
3315
|
-
v("div",
|
|
3316
|
-
v("div",
|
|
3317
|
-
|
|
3318
|
-
v("div",
|
|
3319
|
-
n.value ? (
|
|
3320
|
-
v("div",
|
|
3321
|
-
|
|
3353
|
+
v("div", _l, [
|
|
3354
|
+
v("div", Sl, [
|
|
3355
|
+
El,
|
|
3356
|
+
v("div", Ol, [
|
|
3357
|
+
n.value ? (m(), q(r2, { key: 0 })) : H("", !0),
|
|
3358
|
+
v("div", $l, [
|
|
3359
|
+
B(wl, {
|
|
3322
3360
|
isExpanded: e.isAIExplain,
|
|
3323
3361
|
disabled: n.value,
|
|
3324
3362
|
onClick: a
|
|
@@ -3327,40 +3365,40 @@ const xo = { class: "bg-white relative z-10 border rounded-md" }, yo = {
|
|
|
3327
3365
|
])
|
|
3328
3366
|
]),
|
|
3329
3367
|
v("div", {
|
|
3330
|
-
class:
|
|
3368
|
+
class: j(["overflow-hidden transition-all duration-300 ease-in-out", e.isAIExplain ? "max-h-[1000px] opacity-100" : "max-h-0 opacity-0"])
|
|
3331
3369
|
}, [
|
|
3332
|
-
(r = e.explanation) != null && r.result ? (
|
|
3333
|
-
(
|
|
3334
|
-
`)) || [], (c, p) => (
|
|
3370
|
+
(r = e.explanation) != null && r.result ? (m(), O("ul", Il, [
|
|
3371
|
+
(m(!0), O(G, null, te(((u = e.explanation) == null ? void 0 : u.result.split(`
|
|
3372
|
+
`)) || [], (c, p) => (m(), O("li", {
|
|
3335
3373
|
key: `${c}-${p}`,
|
|
3336
3374
|
innerHTML: c
|
|
3337
|
-
}, null, 8,
|
|
3338
|
-
])) :
|
|
3375
|
+
}, null, 8, Tl))), 128))
|
|
3376
|
+
])) : H("", !0)
|
|
3339
3377
|
], 2)
|
|
3340
3378
|
])
|
|
3341
3379
|
], 2);
|
|
3342
3380
|
};
|
|
3343
3381
|
}
|
|
3344
3382
|
};
|
|
3345
|
-
function
|
|
3383
|
+
function Ml() {
|
|
3346
3384
|
document.documentElement.setAttribute("dir", "rtl");
|
|
3347
3385
|
}
|
|
3348
|
-
function
|
|
3386
|
+
function kl() {
|
|
3349
3387
|
document.documentElement.removeAttribute("dir");
|
|
3350
3388
|
}
|
|
3351
3389
|
const Ot = {
|
|
3352
|
-
supportRTL:
|
|
3353
|
-
removeRTL:
|
|
3354
|
-
},
|
|
3390
|
+
supportRTL: Ml,
|
|
3391
|
+
removeRTL: kl
|
|
3392
|
+
}, Al = ["ar", "fa", "iw", "yi", "ur", "pa"], Vl = { class: "bg-white min-h-screen flex flex-col" }, Fl = { class: "py-2 px-5 shadow-lg" }, Pl = { class: "px-5 flex-grow" }, Rl = { class: "flex flex-col lg:flex-row lg:gap-2 mb-6" }, Dl = { class: "w-full lg:w-[calc(50%-1rem)] my-2 flex" }, Nl = /* @__PURE__ */ v("div", { class: "w-6 h-4 mx-auto hidden lg:block" }, null, -1), Bl = { class: "w-full lg:w-[calc(50%-1rem)] my-2 flex" }, jl = {
|
|
3355
3393
|
key: 0,
|
|
3356
3394
|
class: "w-full my-4"
|
|
3357
|
-
},
|
|
3395
|
+
}, Hl = { class: "grid grid-cols-1 lg:grid-cols-3 gap-4" }, zl = {
|
|
3358
3396
|
key: 1,
|
|
3359
3397
|
class: "w-full my-4"
|
|
3360
|
-
},
|
|
3398
|
+
}, Ul = {
|
|
3361
3399
|
key: 1,
|
|
3362
3400
|
class: "text-textCustom italic font-medium"
|
|
3363
|
-
},
|
|
3401
|
+
}, Gl = {
|
|
3364
3402
|
__name: "Popup",
|
|
3365
3403
|
props: {
|
|
3366
3404
|
opt: {
|
|
@@ -3422,23 +3460,23 @@ const Ot = {
|
|
|
3422
3460
|
"copy"
|
|
3423
3461
|
],
|
|
3424
3462
|
setup(e, { emit: o }) {
|
|
3425
|
-
const t = hn(), n =
|
|
3463
|
+
const t = hn(), n = be(t), l = u2(t), a = Ue(t), i = Me(t), s = e, r = o, u = $(""), c = () => {
|
|
3426
3464
|
const I = s.opt.target;
|
|
3427
|
-
|
|
3465
|
+
Al.includes(I) ? Ot.supportRTL() : Ot.removeRTL();
|
|
3428
3466
|
};
|
|
3429
|
-
|
|
3467
|
+
N(
|
|
3430
3468
|
() => s.translation,
|
|
3431
3469
|
(I) => {
|
|
3432
3470
|
i.setLoading("translation", !1), I && (u.value = I.text, n.init(I), l.reset());
|
|
3433
3471
|
},
|
|
3434
3472
|
{ immediate: !0 }
|
|
3435
|
-
),
|
|
3473
|
+
), N(
|
|
3436
3474
|
[() => s.explanation, () => s.isAIExplain],
|
|
3437
3475
|
([I]) => {
|
|
3438
3476
|
I != null && I.result && i.setLoading("aiExplanation", !1);
|
|
3439
3477
|
},
|
|
3440
3478
|
{ immediate: !0, deep: !0 }
|
|
3441
|
-
),
|
|
3479
|
+
), N(
|
|
3442
3480
|
() => s.tts,
|
|
3443
3481
|
(I) => {
|
|
3444
3482
|
if (!I) {
|
|
@@ -3448,27 +3486,27 @@ const Ot = {
|
|
|
3448
3486
|
l.set(I);
|
|
3449
3487
|
},
|
|
3450
3488
|
{ immediate: !0 }
|
|
3451
|
-
),
|
|
3489
|
+
), N([() => s.opt, () => s.languages], ([I, x]) => {
|
|
3452
3490
|
a.init(I, x), c();
|
|
3453
|
-
}),
|
|
3454
|
-
r("opt", { src: I, target: x }),
|
|
3455
|
-
}),
|
|
3491
|
+
}), N([() => a.src, () => a.target], ([I, x]) => {
|
|
3492
|
+
r("opt", { src: I, target: x }), b(u.value);
|
|
3493
|
+
}), ve(() => {
|
|
3456
3494
|
a.init(s.opt, s.languages), c();
|
|
3457
3495
|
});
|
|
3458
3496
|
function p() {
|
|
3459
3497
|
u.value = "", s.isAITranslate && _(), n.reset();
|
|
3460
3498
|
}
|
|
3461
|
-
function
|
|
3462
|
-
|
|
3499
|
+
function g(I) {
|
|
3500
|
+
b(I);
|
|
3463
3501
|
}
|
|
3464
3502
|
function w(I) {
|
|
3465
3503
|
const x = I === "src" ? n.text : n.result;
|
|
3466
3504
|
r("loadTTS", { type: I, data: x });
|
|
3467
3505
|
}
|
|
3468
|
-
function
|
|
3506
|
+
function b(I, x = a.src, A = a.target) {
|
|
3469
3507
|
I && (u.value = I, i.setLoading("translation", !0), r("translate", {
|
|
3470
3508
|
src: x,
|
|
3471
|
-
target:
|
|
3509
|
+
target: A,
|
|
3472
3510
|
text: I
|
|
3473
3511
|
}));
|
|
3474
3512
|
}
|
|
@@ -3479,31 +3517,31 @@ const Ot = {
|
|
|
3479
3517
|
s.isAIExplain || i.setLoading("aiExplanation", !0), r("aiExplain");
|
|
3480
3518
|
}
|
|
3481
3519
|
return (I, x) => {
|
|
3482
|
-
var
|
|
3483
|
-
return
|
|
3484
|
-
v("div",
|
|
3485
|
-
|
|
3520
|
+
var A, R, y, M, C;
|
|
3521
|
+
return m(), O("div", Vl, [
|
|
3522
|
+
v("div", Fl, [
|
|
3523
|
+
B(j2, {
|
|
3486
3524
|
onReader: x[0] || (x[0] = (h) => r("reader")),
|
|
3487
3525
|
onSettings: x[1] || (x[1] = (h) => r("settings")),
|
|
3488
3526
|
onFullScreen: x[2] || (x[2] = (h) => r("fullscreen")),
|
|
3489
3527
|
onStarList: x[3] || (x[3] = (h) => r("starList"))
|
|
3490
3528
|
})
|
|
3491
3529
|
]),
|
|
3492
|
-
v("div",
|
|
3493
|
-
|
|
3494
|
-
v("div",
|
|
3495
|
-
v("div",
|
|
3496
|
-
|
|
3530
|
+
v("div", Pl, [
|
|
3531
|
+
B(Vn, { class: "my-4" }),
|
|
3532
|
+
v("div", Rl, [
|
|
3533
|
+
v("div", Dl, [
|
|
3534
|
+
B(To, {
|
|
3497
3535
|
text: u.value,
|
|
3498
|
-
onChange:
|
|
3536
|
+
onChange: g,
|
|
3499
3537
|
onClear: p,
|
|
3500
3538
|
onLoadTTS: x[4] || (x[4] = (h) => w("src")),
|
|
3501
3539
|
class: "flex-grow flex flex-col"
|
|
3502
3540
|
}, null, 8, ["text"])
|
|
3503
3541
|
]),
|
|
3504
|
-
|
|
3505
|
-
v("div",
|
|
3506
|
-
|
|
3542
|
+
Nl,
|
|
3543
|
+
v("div", Bl, [
|
|
3544
|
+
B(Po, {
|
|
3507
3545
|
isFavoriteFeatureEnabled: e.isFavoriteFeatureEnabled,
|
|
3508
3546
|
isAITranslateFeatureEnabled: e.isAITranslateFeatureEnabled,
|
|
3509
3547
|
isAITranslate: e.isAITranslate,
|
|
@@ -3516,34 +3554,34 @@ const Ot = {
|
|
|
3516
3554
|
}, null, 8, ["isFavoriteFeatureEnabled", "isAITranslateFeatureEnabled", "isAITranslate", "isFavorite"])
|
|
3517
3555
|
])
|
|
3518
3556
|
]),
|
|
3519
|
-
s.translation ? (
|
|
3520
|
-
((
|
|
3521
|
-
|
|
3557
|
+
s.translation ? (m(), O(G, { key: 0 }, [
|
|
3558
|
+
((A = L(n).result) == null ? void 0 : A.length) > e.aiExplainMinLength ? (m(), O("div", jl, [
|
|
3559
|
+
B(Ll, {
|
|
3522
3560
|
isAIExplain: e.isAIExplain,
|
|
3523
3561
|
explanation: e.explanation,
|
|
3524
3562
|
onAiExplain: P
|
|
3525
3563
|
}, null, 8, ["isAIExplain", "explanation"])
|
|
3526
|
-
])) :
|
|
3527
|
-
v("div",
|
|
3528
|
-
(R = L(n).dictionary) != null && R.length ? (
|
|
3564
|
+
])) : H("", !0),
|
|
3565
|
+
v("div", Hl, [
|
|
3566
|
+
(R = L(n).dictionary) != null && R.length ? (m(), q(Wo, {
|
|
3529
3567
|
key: 0,
|
|
3530
|
-
onTranslate:
|
|
3531
|
-
})) :
|
|
3532
|
-
(y = L(n).definitions) != null && y.length ? (
|
|
3533
|
-
(M = L(n).synonyms) != null && M.length ? (
|
|
3568
|
+
onTranslate: b
|
|
3569
|
+
})) : H("", !0),
|
|
3570
|
+
(y = L(n).definitions) != null && y.length ? (m(), q(tl, { key: 1 })) : H("", !0),
|
|
3571
|
+
(M = L(n).synonyms) != null && M.length ? (m(), q(bl, {
|
|
3534
3572
|
key: 2,
|
|
3535
|
-
onTranslate:
|
|
3536
|
-
})) :
|
|
3573
|
+
onTranslate: b
|
|
3574
|
+
})) : H("", !0)
|
|
3537
3575
|
]),
|
|
3538
|
-
(
|
|
3539
|
-
|
|
3540
|
-
])) :
|
|
3541
|
-
], 64)) : (
|
|
3576
|
+
(C = L(n).examples) != null && C.length ? (m(), O("div", zl, [
|
|
3577
|
+
B(rl)
|
|
3578
|
+
])) : H("", !0)
|
|
3579
|
+
], 64)) : (m(), O("span", Ul, "Service unavailable"))
|
|
3542
3580
|
])
|
|
3543
3581
|
]);
|
|
3544
3582
|
};
|
|
3545
3583
|
}
|
|
3546
3584
|
};
|
|
3547
3585
|
export {
|
|
3548
|
-
|
|
3586
|
+
Gl as default
|
|
3549
3587
|
};
|