@nanoporetech-digital/components 8.0.0-alpha.5 → 8.0.0-alpha.7
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/cjs/{algolia-data-CSD3I9WJ.js → algolia-data-Ck3OvAaS.js} +1 -1
- package/dist/cjs/app-globals-BRy5S0cS.js +10 -0
- package/dist/cjs/{component-store-DS6c_IIg.js → component-store-Cpxjkhrv.js} +1 -1
- package/dist/cjs/{dom-3kyE_RMm.js → dom-B0-coRX2.js} +1 -1
- package/dist/cjs/{fade-B3XUTiE5.js → fade-BQI-VEQG.js} +3 -3
- package/dist/cjs/{form-control-BVH0tPGy.js → form-control-OWJOOoxA.js} +1 -1
- package/dist/cjs/{fullscreen-BQdjQr7K.js → fullscreen-C3ErAoTH.js} +3 -3
- package/dist/cjs/{index-IR1lkhwT.js → index-BlC8UV0T.js} +19 -15
- package/dist/cjs/{index-yq5hsIxW.js → index-ZOnWVzxx.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{lazyload-B8HnSPAU.js → lazyload-zGvFFCJx.js} +3 -3
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/{modal-DZVjwBg8.js → modal-DTqHsNdW.js} +1 -1
- package/dist/cjs/nano-accordion.cjs.entry.js +3 -3
- package/dist/cjs/nano-alert.cjs.entry.js +8 -8
- package/dist/cjs/nano-algolia-filter.cjs.entry.js +4 -4
- package/dist/cjs/nano-algolia-pagination.cjs.entry.js +2 -2
- package/dist/cjs/nano-algolia-results.cjs.entry.js +3 -3
- package/dist/cjs/nano-algolia.cjs.entry.js +5 -5
- package/dist/cjs/nano-animation.cjs.entry.js +2 -2
- package/dist/cjs/nano-avatar_5.cjs.entry.js +9 -9
- package/dist/cjs/nano-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/nano-card-carousel.cjs.entry.js +2 -2
- package/dist/cjs/nano-card.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/nano-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/nano-collapsible-comparison.cjs.entry.js +2 -2
- package/dist/cjs/nano-components.cjs.js +4 -3
- package/dist/cjs/nano-content-links.cjs.entry.js +1 -1
- package/dist/cjs/nano-cta.cjs.entry.js +1 -1
- package/dist/cjs/{nano-data-table-BiTzaPlZ.js → nano-data-table-ed7Lg_CN.js} +5 -5
- package/dist/cjs/nano-data-table.cjs.entry.js +6 -6
- package/dist/cjs/nano-datalist_3.cjs.entry.js +3 -3
- package/dist/cjs/nano-date-input.cjs.entry.js +2 -2
- package/dist/cjs/nano-date-picker_2.cjs.entry.js +10 -10
- package/dist/cjs/nano-details.cjs.entry.js +3 -3
- package/dist/cjs/nano-dialog.cjs.entry.js +8 -8
- package/dist/cjs/nano-dropdown_2.cjs.entry.js +5 -5
- package/dist/cjs/nano-field-validator.cjs.entry.js +3 -3
- package/dist/cjs/nano-file-upload.cjs.entry.js +2 -2
- package/dist/cjs/nano-footer.cjs.entry.js +1 -1
- package/dist/cjs/nano-global-nav.cjs.entry.js +2 -2
- package/dist/cjs/nano-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/nano-grid_2.cjs.entry.js +2 -2
- package/dist/cjs/nano-hero.cjs.entry.js +2 -2
- package/dist/cjs/nano-icon-item.cjs.entry.js +1 -1
- package/dist/cjs/nano-icon_3.cjs.entry.js +2 -2
- package/dist/cjs/nano-in-page-nav.cjs.entry.js +3 -3
- package/dist/cjs/nano-intersection-observe.cjs.entry.js +4 -4
- package/dist/cjs/nano-masked-overflow.cjs.entry.js +4 -4
- package/dist/cjs/nano-menu-drawer.cjs.entry.js +3 -3
- package/dist/cjs/nano-more-less.cjs.entry.js +2 -2
- package/dist/cjs/nano-nav-item.cjs.entry.js +5 -5
- package/dist/cjs/nano-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/nano-range.cjs.entry.js +2 -2
- package/dist/cjs/nano-rating.cjs.entry.js +2 -2
- package/dist/cjs/nano-resize-observe.cjs.entry.js +2 -2
- package/dist/cjs/nano-slide.cjs.entry.js +2 -2
- package/dist/cjs/{nano-slides-BHsOLxRZ.js → nano-slides-Aq8Qr76Y.js} +11 -57
- package/dist/cjs/nano-slides.cjs.entry.js +3 -3
- package/dist/cjs/nano-sortable.cjs.entry.js +2 -2
- package/dist/cjs/nano-spinner.cjs.entry.js +1 -1
- package/dist/cjs/nano-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/nano-sticker.cjs.entry.js +4 -4
- package/dist/cjs/nano-tab-content.cjs.entry.js +2 -2
- package/dist/cjs/nano-tab-group.cjs.entry.js +4 -4
- package/dist/cjs/nano-tab.cjs.entry.js +2 -2
- package/dist/cjs/nano-table.cjs.entry.js +2 -2
- package/dist/cjs/{page-dots-DJrv0V9e.js → page-dots-BCL1Ou_V.js} +3 -3
- package/dist/cjs/{renderer-h0yo23iy.js → renderer-BjTjwe8d.js} +1 -1
- package/dist/cjs/{scroll-_aiH0KkA.js → scroll-CtgMHKrt.js} +1 -1
- package/dist/cjs/{slot-Hlplqf1Z.js → slot-CoMwYflw.js} +6 -6
- package/dist/cjs/{tabbable-CkzmpQhq.js → tabbable-D33Xh_1b.js} +1 -1
- package/dist/cjs/{table.worker-DjOtTDwg.js → table.worker-L6KfPMgT.js} +6 -6
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/alert/alert.css +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.css +132 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +6 -6
- package/dist/collection/components/slides/lib/js/prev-next-button.js +4 -50
- package/dist/collection/components/slides/slides.css +39 -8
- package/dist/collection/utils/slot.js +5 -5
- package/dist/components/date-picker.js +6 -6
- package/dist/components/nano-alert.js +1 -1
- package/dist/components/nano-breadcrumb.js +2 -2
- package/dist/components/slides.js +5 -51
- package/dist/components/slot.js +5 -5
- package/dist/esm/{algolia-data-D6wnbV__.js → algolia-data-B1lm-wYl.js} +1 -1
- package/dist/esm/app-globals-CWIH620u.js +8 -0
- package/dist/esm/{component-store-CH5BI3Tg.js → component-store-DMqr8_D3.js} +1 -1
- package/dist/esm/{dom-Cb7FUtXp.js → dom-COiksOVZ.js} +1 -1
- package/dist/esm/{fade-C74M8NQp.js → fade-TBJBUY-M.js} +3 -3
- package/dist/esm/{form-control-BOVGZF9R.js → form-control-dh9YtDPa.js} +1 -1
- package/dist/esm/{fullscreen-CmJdWdrB.js → fullscreen-7z4Hd9oU.js} +3 -3
- package/dist/esm/{index-DXvE-U_j.js → index-CX_Hk6ss.js} +20 -15
- package/dist/esm/{index-Dw3NZx59.js → index-VZJF9v1K.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{lazyload-BPqjfQB3.js → lazyload-CMsexkIp.js} +3 -3
- package/dist/esm/loader.js +3 -2
- package/dist/esm/{modal-B_AxJQQp.js → modal-CH7Vma1I.js} +1 -1
- package/dist/esm/nano-accordion.entry.js +3 -3
- package/dist/esm/nano-alert.entry.js +8 -8
- package/dist/esm/nano-algolia-filter.entry.js +4 -4
- package/dist/esm/nano-algolia-pagination.entry.js +2 -2
- package/dist/esm/nano-algolia-results.entry.js +3 -3
- package/dist/esm/nano-algolia.entry.js +5 -5
- package/dist/esm/nano-animation.entry.js +2 -2
- package/dist/esm/nano-avatar_5.entry.js +9 -9
- package/dist/esm/nano-breadcrumb.entry.js +3 -3
- package/dist/esm/nano-card-carousel.entry.js +2 -2
- package/dist/esm/nano-card.entry.js +1 -1
- package/dist/esm/nano-checkbox-group.entry.js +2 -2
- package/dist/esm/nano-checkbox.entry.js +2 -2
- package/dist/esm/nano-collapsible-comparison.entry.js +2 -2
- package/dist/esm/nano-components.js +4 -3
- package/dist/esm/nano-content-links.entry.js +1 -1
- package/dist/esm/nano-cta.entry.js +1 -1
- package/dist/esm/{nano-data-table-BPQhfLyq.js → nano-data-table-CraXN1D7.js} +5 -5
- package/dist/esm/nano-data-table.entry.js +6 -6
- package/dist/esm/nano-datalist_3.entry.js +3 -3
- package/dist/esm/nano-date-input.entry.js +2 -2
- package/dist/esm/nano-date-picker_2.entry.js +10 -10
- package/dist/esm/nano-details.entry.js +3 -3
- package/dist/esm/nano-dialog.entry.js +8 -8
- package/dist/esm/nano-dropdown_2.entry.js +5 -5
- package/dist/esm/nano-field-validator.entry.js +3 -3
- package/dist/esm/nano-file-upload.entry.js +2 -2
- package/dist/esm/nano-footer.entry.js +1 -1
- package/dist/esm/nano-global-nav.entry.js +2 -2
- package/dist/esm/nano-grid-item.entry.js +1 -1
- package/dist/esm/nano-grid_2.entry.js +2 -2
- package/dist/esm/nano-hero.entry.js +2 -2
- package/dist/esm/nano-icon-item.entry.js +1 -1
- package/dist/esm/nano-icon_3.entry.js +2 -2
- package/dist/esm/nano-in-page-nav.entry.js +3 -3
- package/dist/esm/nano-intersection-observe.entry.js +4 -4
- package/dist/esm/nano-masked-overflow.entry.js +4 -4
- package/dist/esm/nano-menu-drawer.entry.js +3 -3
- package/dist/esm/nano-more-less.entry.js +2 -2
- package/dist/esm/nano-nav-item.entry.js +5 -5
- package/dist/esm/nano-progress-bar.entry.js +1 -1
- package/dist/esm/nano-range.entry.js +2 -2
- package/dist/esm/nano-rating.entry.js +2 -2
- package/dist/esm/nano-resize-observe.entry.js +2 -2
- package/dist/esm/nano-slide.entry.js +2 -2
- package/dist/esm/{nano-slides-Bv0u7kg0.js → nano-slides-CuheM3tf.js} +11 -57
- package/dist/esm/nano-slides.entry.js +3 -3
- package/dist/esm/nano-sortable.entry.js +2 -2
- package/dist/esm/nano-spinner.entry.js +1 -1
- package/dist/esm/nano-split-pane.entry.js +2 -2
- package/dist/esm/nano-sticker.entry.js +4 -4
- package/dist/esm/nano-tab-content.entry.js +2 -2
- package/dist/esm/nano-tab-group.entry.js +4 -4
- package/dist/esm/nano-tab.entry.js +2 -2
- package/dist/esm/nano-table.entry.js +2 -2
- package/dist/esm/{page-dots-e1Gyk8V7.js → page-dots-Dlng6mCY.js} +3 -3
- package/dist/esm/{renderer-BUaAsDso.js → renderer-ZmozgREV.js} +1 -1
- package/dist/esm/{scroll-iCYjzh9N.js → scroll-D4n69pGx.js} +1 -1
- package/dist/esm/{slot-DYFgWo5f.js → slot-CjAtXEOo.js} +6 -6
- package/dist/esm/{tabbable-C4l-rYq9.js → tabbable-CZtanbA9.js} +1 -1
- package/dist/esm/{table.worker-DlLhvqK5.js → table.worker-D6BwHdpG.js} +6 -6
- package/dist/nano-components/{algolia-data-D6wnbV__.js → algolia-data-B1lm-wYl.js} +1 -1
- package/dist/nano-components/app-globals-CWIH620u.js +4 -0
- package/dist/nano-components/{component-store-CH5BI3Tg.js → component-store-DMqr8_D3.js} +1 -1
- package/dist/nano-components/{dom-Cb7FUtXp.js → dom-COiksOVZ.js} +1 -1
- package/dist/nano-components/{fade-C74M8NQp.js → fade-TBJBUY-M.js} +1 -1
- package/dist/nano-components/{form-control-BOVGZF9R.js → form-control-dh9YtDPa.js} +1 -1
- package/dist/nano-components/{fullscreen-CmJdWdrB.js → fullscreen-7z4Hd9oU.js} +1 -1
- package/dist/nano-components/index-CX_Hk6ss.js +5 -0
- package/dist/nano-components/{index-Dw3NZx59.js → index-VZJF9v1K.js} +1 -1
- package/dist/nano-components/index.esm.js +1 -1
- package/dist/nano-components/{lazyload-BPqjfQB3.js → lazyload-CMsexkIp.js} +1 -1
- package/dist/nano-components/{modal-B_AxJQQp.js → modal-CH7Vma1I.js} +1 -1
- package/dist/nano-components/nano-accordion.entry.js +1 -1
- package/dist/nano-components/nano-alert.entry.js +1 -1
- package/dist/nano-components/nano-algolia-filter.entry.js +1 -1
- package/dist/nano-components/nano-algolia-pagination.entry.js +1 -1
- package/dist/nano-components/nano-algolia-results.entry.js +1 -1
- package/dist/nano-components/nano-algolia.entry.js +1 -1
- package/dist/nano-components/nano-animation.entry.js +1 -1
- package/dist/nano-components/nano-avatar_5.entry.js +1 -1
- package/dist/nano-components/nano-breadcrumb.entry.js +1 -1
- package/dist/nano-components/nano-card-carousel.entry.js +1 -1
- package/dist/nano-components/nano-card.entry.js +1 -1
- package/dist/nano-components/nano-checkbox-group.entry.js +1 -1
- package/dist/nano-components/nano-checkbox.entry.js +1 -1
- package/dist/nano-components/nano-collapsible-comparison.entry.js +1 -1
- package/dist/nano-components/nano-components.css +3 -125
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-content-links.entry.js +1 -1
- package/dist/nano-components/nano-cta.entry.js +1 -1
- package/dist/nano-components/nano-data-table-CraXN1D7.js +4 -0
- package/dist/nano-components/nano-data-table.entry.js +1 -1
- package/dist/nano-components/nano-datalist_3.entry.js +1 -1
- package/dist/nano-components/nano-date-input.entry.js +1 -1
- package/dist/nano-components/nano-date-picker_2.entry.js +1 -1
- package/dist/nano-components/nano-details.entry.js +1 -1
- package/dist/nano-components/nano-dialog.entry.js +1 -1
- package/dist/nano-components/nano-dropdown_2.entry.js +1 -1
- package/dist/nano-components/nano-field-validator.entry.js +1 -1
- package/dist/nano-components/nano-file-upload.entry.js +1 -1
- package/dist/nano-components/nano-footer.entry.js +1 -1
- package/dist/nano-components/nano-global-nav.entry.js +1 -1
- package/dist/nano-components/nano-grid-item.entry.js +1 -1
- package/dist/nano-components/nano-grid_2.entry.js +1 -1
- package/dist/nano-components/nano-hero.entry.js +1 -1
- package/dist/nano-components/nano-icon-item.entry.js +1 -1
- package/dist/nano-components/nano-icon_3.entry.js +1 -1
- package/dist/nano-components/nano-in-page-nav.entry.js +1 -1
- package/dist/nano-components/nano-intersection-observe.entry.js +1 -1
- package/dist/nano-components/nano-masked-overflow.entry.js +1 -1
- package/dist/nano-components/nano-menu-drawer.entry.js +1 -1
- package/dist/nano-components/nano-more-less.entry.js +1 -1
- package/dist/nano-components/nano-nav-item.entry.js +1 -1
- package/dist/nano-components/nano-progress-bar.entry.js +1 -1
- package/dist/nano-components/nano-range.entry.js +1 -1
- package/dist/nano-components/nano-rating.entry.js +1 -1
- package/dist/nano-components/nano-resize-observe.entry.js +1 -1
- package/dist/nano-components/nano-slide.entry.js +1 -1
- package/dist/nano-components/nano-slides-CuheM3tf.js +22 -0
- package/dist/nano-components/nano-slides.entry.js +1 -1
- package/dist/nano-components/nano-sortable.entry.js +1 -1
- package/dist/nano-components/nano-spinner.entry.js +1 -1
- package/dist/nano-components/nano-split-pane.entry.js +1 -1
- package/dist/nano-components/nano-sticker.entry.js +1 -1
- package/dist/nano-components/nano-tab-content.entry.js +1 -1
- package/dist/nano-components/nano-tab-group.entry.js +1 -1
- package/dist/nano-components/nano-tab.entry.js +1 -1
- package/dist/nano-components/nano-table.entry.js +1 -1
- package/dist/nano-components/{page-dots-e1Gyk8V7.js → page-dots-Dlng6mCY.js} +1 -1
- package/dist/nano-components/{renderer-BUaAsDso.js → renderer-ZmozgREV.js} +1 -1
- package/dist/nano-components/{scroll-iCYjzh9N.js → scroll-D4n69pGx.js} +1 -1
- package/dist/nano-components/slot-CjAtXEOo.js +4 -0
- package/dist/nano-components/{tabbable-C4l-rYq9.js → tabbable-CZtanbA9.js} +1 -1
- package/dist/nano-components/{table.worker-DlLhvqK5.js → table.worker-D6BwHdpG.js} +1 -1
- package/dist/style/components.css +1 -1
- package/dist/style/components.css.map +1 -1
- package/dist/style/nano.css +1 -1
- package/dist/style/nano.css.map +1 -1
- package/docs-json.json +12 -2
- package/hydrate/index.js +72 -73
- package/hydrate/index.mjs +72 -73
- package/package.json +2 -2
- package/dist/nano-components/index-DXvE-U_j.js +0 -5
- package/dist/nano-components/nano-data-table-BPQhfLyq.js +0 -4
- package/dist/nano-components/nano-slides-Bv0u7kg0.js +0 -22
- package/dist/nano-components/slot-DYFgWo5f.js +0 -4
@@ -0,0 +1,5 @@
|
|
1
|
+
/*!
|
2
|
+
* Custom elements for Nanopore-Digital Web applications
|
3
|
+
*/
|
4
|
+
const t="nano-components";var e=Object.defineProperty,n={isServer:!1},o=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(o||{}),s=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(s||{}),l="type",i="value",r="serialized:",c=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[o]])=>{if(31&o||32&o){const o=t[n],s=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),n);Object.defineProperty(t,n,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.l.has(n)?e.l.get(n):o}}))},u=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},f=(t,e)=>{t.__stencil__getHostRef=()=>e,e.i=t,c(t,e)},a=(t,e)=>e in t,d=(t,e)=>(0,console.error)(t,e),h=new Map,p=new Map,v="s-id",b="sty-id",$="c-id",m="slot-fb{display:contents}slot-fb[hidden]{display:none}",y="http://www.w3.org/1999/xlink",g="undefined"!=typeof window?window:{},w=g.HTMLElement||class{},S={u:0,h:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},j=t=>Promise.resolve(t),O=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),N=!1,x=[],k=[],E=(t,e)=>n=>{t.push(n),N||(N=!0,e&&4&S.u?M(I):S.raf(I))},C=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){d(t)}t.length=0},I=()=>{C(x),C(k),(N=x.length>0)&&S.raf(I)},M=t=>j().then(t),L=E(x,!1),R=E(k,!0),A=t=>{const e=new URL(t,S.h);return e.origin!==g.location.origin?e.href:e.pathname},T=t=>"object"==(t=typeof t)||"function"===t;function B(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var P=class t{static fromLocalValue(e){const n=e[l],o=i in e?e[i]:void 0;switch(n){case"string":case"boolean":return o;case"bigint":return BigInt(o);case"undefined":return;case"null":return null;case"number":return"NaN"===o?NaN:"-0"===o?-0:"Infinity"===o?1/0:"-Infinity"===o?-1/0:o;case"array":return o.map((e=>t.fromLocalValue(e)));case"date":return new Date(o);case"map":const e=new Map;for(const[n,s]of o){const o="object"==typeof n&&null!==n?t.fromLocalValue(n):n,l=t.fromLocalValue(s);e.set(o,l)}return e;case"object":const s={};for(const[e,n]of o)s[e]=t.fromLocalValue(n);return s;case"regexp":const{pattern:l,flags:i}=o;return RegExp(l,i);case"set":const r=new Set;for(const e of o)r.add(t.fromLocalValue(e));return r;case"symbol":return Symbol(o);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(e){return e.map((e=>t.fromLocalValue(e)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(l))return!1;const e=t[l];return!!Object.values({...o,...s}).includes(e)&&("null"===e||"undefined"===e||t.hasOwnProperty(i))}};((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})({},{err:()=>U,map:()=>_,ok:()=>F,unwrap:()=>W,unwrapErr:()=>V});var F=t=>({isOk:!0,isErr:!1,value:t}),U=t=>({isOk:!1,isErr:!0,value:t});function _(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>F(t))):F(n)}if(t.isErr)return U(t.value);throw"should never get here"}var D,W=t=>{if(t.isOk)return t.value;throw t.value},V=t=>{if(t.isErr)return t.value;throw t.value};function z(){const t=this.attachShadow({mode:"open"});void 0===D&&(D=null),D&&t.adoptedStyleSheets.push(D)}var H=t=>{const e=wt(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&Y(e,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!q(t,Q(t),!1).length)}));let n=0;for(n=0;n<e.length;n++){const t=e[n];1===t.nodeType&&wt(t,"childNodes").length&&H(t)}},J=t=>{const e=[];for(let n=0;n<t.length;n++){const o=t[n]["s-nr"]||void 0;o&&o.isConnected&&e.push(o)}return e};function Y(t,e,n){let o,s=0,l=[];for(;s<t.length;s++){if(o=t[s],o["s-sr"]&&(!e||o["s-hn"]===e)&&(void 0===n||Q(o)===n)&&(l.push(o),void 0!==n))return l;l=[...l,...Y(o.childNodes,e,n)]}return l}var q=(t,e,n=!0)=>{const o=[];(n&&t["s-sr"]||!t["s-sr"])&&o.push(t);let s=t;for(;s=s.nextSibling;)Q(s)!==e||!n&&s["s-sr"]||o.push(s);return o},G=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,K=(t,e,n,o)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const s=document.createTextNode("");if(s["s-nr"]=t,!e["s-cr"]||!e["s-cr"].parentNode)return;const l=e["s-cr"].parentNode,i=wt(l,n?"prepend":"appendChild");if(void 0!==o){s["s-oo"]=o;const t=wt(l,"childNodes"),e=[s];t.forEach((t=>{t["s-nr"]&&e.push(t)})),e.sort(((t,e)=>!t["s-oo"]||t["s-oo"]<(e["s-oo"]||0)?-1:!e["s-oo"]||e["s-oo"]<t["s-oo"]?1:0)),e.forEach((t=>i.call(l,t)))}else i.call(l,s);t["s-ol"]=s,t["s-sh"]=e["s-hn"]},Q=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function X(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const s=this["s-cr"].parentElement;return(s.__childNodes?s.childNodes:J(s.childNodes)).forEach((t=>{o===Q(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}function Z(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}function tt(t,e){var n;if(!(e=e||(null==(n=t["s-ol"])?void 0:n.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=Q(t)||"";return{slotNode:Y(wt(e,"childNodes"),e.tagName,o)[0],slotName:o}}var et=t=>{const e=t.cloneNode;t.cloneNode=function(t){const n=this.shadowRoot&&true,o=e.call(this,!!n&&t);if(!n&&t){let t,e,n=0;const s=["s-id","s-cr","s-lr","s-rc","s-sc","s-p","s-cn","s-sr","s-sn","s-hn","s-ol","s-nr","s-si","s-rf","s-scs"],l=this.__childNodes||this.childNodes;for(;n<l.length;n++)t=l[n]["s-nr"],e=s.every((t=>!l[n][t])),t&&(o.__appendChild?o.__appendChild(t.cloneNode(!0)):o.appendChild(t.cloneNode(!0))),e&&o.appendChild(l[n].cloneNode(!0))}return o}},nt=t=>{t.__appendChild=t.appendChild,t.appendChild=function(t){const{slotName:e,slotNode:n}=tt(t,this);if(n){K(t,n);const o=q(n,e),s=o[o.length-1],l=wt(s,"parentNode"),i=wt(l,"insertBefore")(t,s.nextSibling);return Z(n),H(this),i}return this.__appendChild(t)}},ot=t=>{t.__removeChild=t.removeChild,t.removeChild=function(t){return t&&void 0!==t["s-sn"]&&Y(this.__childNodes||this.childNodes,this.tagName,t["s-sn"])&&t.isConnected?(t.remove(),void H(this)):this.__removeChild(t)}},st=t=>{t.__prepend=t.prepend,t.prepend=function(...e){e.forEach((e=>{"string"==typeof e&&(e=this.ownerDocument.createTextNode(e));const n=(e["s-sn"]=Q(e))||"",o=Y(wt(this,"childNodes"),this.tagName,n)[0];if(o){K(e,o,!0);const t=q(o,n)[0],s=wt(t,"parentNode"),l=wt(s,"insertBefore")(e,wt(t,"nextSibling"));return Z(o),l}return 1===e.nodeType&&e.getAttribute("slot")&&(e.hidden=!0),t.__prepend(e)}))}},lt=t=>{t.__append=t.append,t.append=function(...t){t.forEach((t=>{"string"==typeof t&&(t=this.ownerDocument.createTextNode(t)),this.appendChild(t)}))}},it=t=>{const e=t.insertAdjacentHTML;t.insertAdjacentHTML=function(t,n){if("afterbegin"!==t&&"beforeend"!==t)return e.call(this,t,n);const o=this.ownerDocument.createElement("_");let s;if(o.innerHTML=n,"afterbegin"===t)for(;s=o.firstChild;)this.prepend(s);else if("beforeend"===t)for(;s=o.firstChild;)this.append(s)}},rt=t=>{t.insertAdjacentText=function(t,e){this.insertAdjacentHTML(t,e)}},ct=t=>{t.__insertBefore||(t.__insertBefore=t.insertBefore,t.insertBefore=function(t,e){const{slotName:n,slotNode:o}=tt(t,this),s=this.__childNodes?this.childNodes:J(this.childNodes);if(o){let l=!1;if(s.forEach((s=>{if(s!==e&&null!==e);else{if(l=!0,null===e||n!==e["s-sn"])return void this.appendChild(t);if(n===e["s-sn"]){K(t,o);const n=wt(e,"parentNode");wt(n,"insertBefore")(t,e),Z(o)}}})),l)return t}const l=null==e?void 0:e.__parentNode;return l&&!this.isSameNode(l)?this.appendChild(t):this.__insertBefore(t,e)})},ut=t=>{const e=t.insertAdjacentElement;t.insertAdjacentElement=function(t,n){return"afterbegin"!==t&&"beforeend"!==t?e.call(this,t,n):"afterbegin"===t?(this.prepend(n),n):"beforeend"===t?(this.append(n),n):n}},ft=t=>{gt("textContent",t),Object.defineProperty(t,"textContent",{get:function(){let t="";return(this.__childNodes?this.childNodes:J(this.childNodes)).forEach((e=>t+=e.textContent||"")),t},set:function(t){(this.__childNodes?this.childNodes:J(this.childNodes)).forEach((t=>{t["s-ol"]&&t["s-ol"].remove(),t.remove()})),this.insertAdjacentHTML("beforeend",t)}})},at=t=>{class e extends Array{item(t){return this[t]}}gt("children",t),Object.defineProperty(t,"children",{get(){return this.childNodes.filter((t=>1===t.nodeType))}}),Object.defineProperty(t,"childElementCount",{get(){return this.children.length}}),gt("firstChild",t),Object.defineProperty(t,"firstChild",{get(){return this.childNodes[0]}}),gt("lastChild",t),Object.defineProperty(t,"lastChild",{get(){return this.childNodes[this.childNodes.length-1]}}),gt("childNodes",t),Object.defineProperty(t,"childNodes",{get(){const t=new e;return t.push(...J(this.__childNodes)),t}})},dt=t=>{t&&void 0===t.__nextSibling&&globalThis.Node&&(ht(t),vt(t),$t(t),t.nodeType===Node.ELEMENT_NODE&&(pt(t),bt(t)))},ht=t=>{t&&!t.__nextSibling&&(gt("nextSibling",t),Object.defineProperty(t,"nextSibling",{get:function(){var t;const e=null==(t=this["s-ol"])?void 0:t.parentNode.childNodes,n=null==e?void 0:e.indexOf(this);return e&&n>-1?e[n+1]:this.__nextSibling}}))},pt=t=>{t&&!t.__nextElementSibling&&(gt("nextElementSibling",t),Object.defineProperty(t,"nextElementSibling",{get:function(){var t;const e=null==(t=this["s-ol"])?void 0:t.parentNode.children,n=null==e?void 0:e.indexOf(this);return e&&n>-1?e[n+1]:this.__nextElementSibling}}))},vt=t=>{t&&!t.__previousSibling&&(gt("previousSibling",t),Object.defineProperty(t,"previousSibling",{get:function(){var t;const e=null==(t=this["s-ol"])?void 0:t.parentNode.childNodes,n=null==e?void 0:e.indexOf(this);return e&&n>-1?e[n-1]:this.__previousSibling}}))},bt=t=>{t&&!t.__previousElementSibling&&(gt("previousElementSibling",t),Object.defineProperty(t,"previousElementSibling",{get:function(){var t;const e=null==(t=this["s-ol"])?void 0:t.parentNode.children,n=null==e?void 0:e.indexOf(this);return e&&n>-1?e[n-1]:this.__previousElementSibling}}))},$t=t=>{t&&!t.__parentNode&&(gt("parentNode",t),Object.defineProperty(t,"parentNode",{get:function(){var t;return(null==(t=this["s-ol"])?void 0:t.parentNode)||this.__parentNode},set:function(t){this.__parentNode=t}}))},mt=["children","nextElementSibling","previousElementSibling"],yt=["childNodes","firstChild","lastChild","nextSibling","previousSibling","textContent","parentNode"];function gt(t,e){let n;mt.includes(t)?n=Object.getOwnPropertyDescriptor(Element.prototype,t):yt.includes(t)&&(n=Object.getOwnPropertyDescriptor(Node.prototype,t)),n||(n=Object.getOwnPropertyDescriptor(e,t)),n&&Object.defineProperty(e,"__"+t,n)}function wt(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var St=new WeakMap,jt=(t,e,n)=>{let o=p.get(t);O&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,p.set(t,o)},Ot=(t,e)=>{var n;const o=Nt(e),s=p.get(o);if(!g.document)return o;if(t=11===t.nodeType?t:g.document,s)if("string"==typeof s){let l,i=St.get(t=t.head||t);if(i||St.set(t,i=new Set),!i.has(o)){if(t.host&&(l=t.querySelector(`[${b}="${o}"]`)))l.innerHTML=s;else{l=g.document.createElement("style"),l.innerHTML=s;const o=null!=(n=S.p)?n:B(g.document);if(null!=o&&l.setAttribute("nonce",o),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(O){const e=new CSSStyleSheet;e.replaceSync(s),t.adoptedStyleSheets.unshift(e)}else{const e=t.querySelector("style");e?e.innerHTML=s+e.innerHTML:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null)}4&e.u&&(l.innerHTML+=m),i&&i.add(o)}}else t.adoptedStyleSheets.includes(s)||t.adoptedStyleSheets.push(s);return o},Nt=t=>"sc-"+t.v,xt=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),kt=(t,e,...n)=>{let o=null,s=null,l=null,i=!1,r=!1;const c=[],u=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?u(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!T(o))&&(o+=""),i&&r?c[c.length-1].$+=o:c.push(i?Et(null,o):o),r=i)};if(u(n),e){e.key&&(s=e.key),e.name&&(l=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,c,It);const f=Et(t,null);return f.m=e,c.length>0&&(f.S=c),f.j=s,f.O=l,f},Et=(t,e)=>({u:0,N:t,$:e,k:null,S:null,m:null,j:null,O:null}),Ct={},It={forEach:(t,e)=>t.map(Mt).forEach(e),map:(t,e)=>t.map(Mt).map(e).map(Lt)},Mt=t=>({vattrs:t.m,vchildren:t.S,vkey:t.j,vname:t.O,vtag:t.N,vtext:t.$}),Lt=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),kt(t.vtag,e,...t.vchildren||[])}const e=Et(t.vtag,t.vtext);return e.m=t.vattrs,e.S=t.vchildren,e.j=t.vkey,e.O=t.vname,e},Rt=(t,e,n,o,s,l,i,r=[])=>{let c,u,f,a;const d=s["s-sc"];if(1===l.nodeType){if(c=l.getAttribute($),c&&(u=c.split("."),u[0]===i||"0"===u[0])){f=Tt({u:0,C:u[0],I:u[1],M:u[2],L:u[3],N:l.tagName.toLowerCase(),k:l,m:{class:l.className||""}}),e.push(f),l.removeAttribute($),t.S||(t.S=[]),d&&u[0]===i&&(l["s-si"]=d,f.m.class+=" "+d);const s=f.k.getAttribute("s-sn");"string"==typeof s&&("slot-fb"===f.N&&(Bt(s,u[2],f,l,t,e,n,o,r),d&&l.classList.add(d)),f.k["s-sn"]=s,f.k.removeAttribute("s-sn")),void 0!==f.L&&(t.S[f.L]=f),t=f,o&&"0"===f.M&&(o[f.L]=f.k)}if(l.shadowRoot)for(a=l.shadowRoot.childNodes.length-1;a>=0;a--)Rt(t,e,n,o,s,l.shadowRoot.childNodes[a],i,r);const h=l.__childNodes||l.childNodes;for(a=h.length-1;a>=0;a--)Rt(t,e,n,o,s,h[a],i,r)}else if(8===l.nodeType)u=l.nodeValue.split("."),(u[1]===i||"0"===u[1])&&(c=u[0],f=Tt({C:u[1],I:u[2],M:u[3],L:u[4]||"0",k:l,m:null,S:null,j:null,O:null,N:null,$:null}),"t"===c?(f.k=Ft(l,3),f.k&&3===f.k.nodeType&&(f.$=f.k.textContent,e.push(f),l.remove(),i===f.C&&(t.S||(t.S=[]),t.S[f.L]=f),o&&"0"===f.M&&(o[f.L]=f.k))):"c"===c?(f.k=Ft(l,8),f.k&&8===f.k.nodeType&&(e.push(f),l.remove())):f.C===i&&("s"===c?Bt(l["s-sn"]=u[5]||"",u[2],f,l,t,e,n,o,r):"r"===c&&(o?l.remove():(s["s-cr"]=l,l["s-cn"]=!0))));else if(t&&"style"===t.N){const e=Et(null,l.textContent);e.k=l,e.L="0",t.S=[e]}else 3!==l.nodeType||l.wholeText.trim()||l["s-nr"]||l.remove();return t},At=(t,e)=>{if(1===t.nodeType){const n=t[v]||t.getAttribute(v);n&&e.set(n,t);let o=0;if(t.shadowRoot)for(;o<t.shadowRoot.childNodes.length;o++)At(t.shadowRoot.childNodes[o],e);const s=t.__childNodes||t.childNodes;for(o=0;o<s.length;o++)At(s[o],e)}else if(8===t.nodeType){const n=t.nodeValue.split(".");"o"===n[0]&&(e.set(n[1]+"."+n[2],t),t.nodeValue="",t["s-en"]=n[3])}},Tt=t=>({u:0,C:null,I:null,M:null,L:"0",k:null,m:null,S:null,j:null,O:null,N:null,$:null,...t});function Bt(t,e,n,o,s,l,i,r,c){o["s-sr"]=!0,n.O=t||null,n.N="slot";const u=(null==s?void 0:s.k)?s.k["s-id"]||s.k.getAttribute("s-id"):"";if(r&&g.document){const l=n.k=g.document.createElement(n.N);n.O&&n.k.setAttribute("name",t),s.k.shadowRoot&&u&&u!==n.C?wt(s.k,"insertBefore")(l,wt(s.k,"children")[0]):wt(wt(o,"parentNode"),"insertBefore")(l,o),Pt(c,e,t,o,n.C),o.remove(),"0"===n.M&&(r[n.L]=n.k)}else{const l=n.k,i=u&&u!==n.C&&s.k.shadowRoot;Pt(c,e,t,o,i?u:n.C),X(o),i&&s.k.insertBefore(l,s.k.children[0])}l.push(n),i.push(n),s.S||(s.S=[]),s.S[n.L]=n}var Pt=(t,e,n,o,s)=>{let l=o.nextSibling;for(t[e]=t[e]||[];l&&((l.getAttribute&&l.getAttribute("slot")||l["s-sn"])===n||""===n&&!l["s-sn"]&&(8===l.nodeType||3===l.nodeType||"SLOT"===l.tagName));)l["s-sn"]=n,t[e].push({slot:o,node:l,hostId:s}),l=l.nextSibling},Ft=(t,e)=>{let n=t;do{n=n.nextSibling}while(n&&(n.nodeType!==e||!n.nodeValue));return n},Ut=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};Ut("::slotted"),Ut(":host"),Ut(":host-context");var _t,Dt,Wt,Vt=(t,e)=>{if("string"==typeof t&&(t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")))try{return JSON.parse(t)}catch(t){}return"string"==typeof t&&t.startsWith(r)?t=function(t){return"string"==typeof t&&t.startsWith(r)?P.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||T(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t},zt=t=>u(t).$hostElement$,Ht=(t,e,n)=>{const o=zt(t);return{emit:t=>Jt(o,e,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:t})}},Jt=(t,e,n)=>{const o=S.ce(e,n);return t.dispatchEvent(o),o},Yt=(t,e,n,o,s,l,i)=>{if(n===o)return;let r=a(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,s=Gt(n);let l=Gt(o);if((t["s-si"]||t["s-sc"])&&i){const n=t["s-sc"]||t["s-si"];l.push(n),s.forEach((t=>{t.startsWith(n)&&l.push(t)})),l=[...new Set(l)].filter((t=>t)),e.add(...l)}else e.remove(...s.filter((t=>t&&!l.includes(t)))),e.add(...l.filter((t=>t&&!s.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("key"===e);else if("ref"===e)o&&o(t);else if(r||"o"!==e[0]||"n"!==e[1]){const i=T(o);if(r||i&&null!==o)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const s=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]==s||("function"==typeof t.__lookupSetter__(e)?t[e]=s:t.setAttribute(e,s))}}catch(t){}let u=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(e=c,u=!0),null==o||!1===o?!1===o&&""!==t.getAttribute(e)||(u?t.removeAttributeNS(y,e):t.removeAttribute(e)):(!r||4&l||s)&&!i&&1===t.nodeType&&(o=!0===o?"":o,u?t.setAttributeNS(y,e,o):t.setAttribute(e,o))}else if(e="-"===e[2]?e.slice(3):a(g,c)?c.slice(2):c[2]+e.slice(3),n||o){const s=e.endsWith(Kt);e=e.replace(Qt,""),n&&S.rel(t,e,n,s),o&&S.ael(t,e,o,s)}},qt=/\s/,Gt=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(qt):[]),Kt="Capture",Qt=RegExp(Kt+"$"),Xt=(t,e,n,o)=>{const s=11===e.k.nodeType&&e.k.host?e.k.host:e.k,l=t&&t.m||{},i=e.m||{};for(const t of Zt(Object.keys(l)))t in i||Yt(s,t,l[t],void 0,n,e.u,o);for(const t of Zt(Object.keys(i)))Yt(s,t,l[t],i[t],n,e.u,o)};function Zt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var te=!1,ee=!1,ne=!1,oe=!1,se=(t,e,n)=>{var o;const s=e.S[n];let l,i,r,c=0;if(te||(ne=!0,"slot"===s.N&&(s.u|=s.S?2:1)),null!==s.$)l=s.k=g.document.createTextNode(s.$);else if(1&s.u)l=s.k=g.document.createTextNode(""),Xt(null,s,oe);else{if(!g.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(l=s.k=g.document.createElement(!te&&2&s.u?"slot-fb":s.N),Xt(null,s,oe),null!=_t&&void 0!==_t&&l["s-si"]!==_t&&l.classList.add(l["s-si"]=_t),s.S)for(c=0;c<s.S.length;++c)i=se(t,s,c),i&&l.appendChild(i)}return l["s-hn"]=Wt,3&s.u&&(l["s-sr"]=!0,l["s-cr"]=Dt,l["s-sn"]=s.O||"",l["s-rf"]=null==(o=s.m)?void 0:o.ref,X(l),r=t&&t.S&&t.S[n],r&&r.N===s.N&&t.k&&le(t.k),be(Dt,l,e.k,null==t?void 0:t.k)),l},le=t=>{S.u|=1;const e=t.closest(Wt.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(ve(e,t,null!=n?n:null),t["s-sh"]=void 0,ne=!0)}S.u&=-2},ie=(t,e)=>{S.u|=1;const n=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let e=t;for(;e=e.nextSibling;)e&&e["s-sn"]===t["s-sn"]&&e["s-sh"]===Wt&&n.push(e)}for(let t=n.length-1;t>=0;t--){const o=n[t];o["s-hn"]!==Wt&&o["s-ol"]&&(ve(fe(o).parentNode,o,fe(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,ne=!0),e&&ie(o,e)}S.u&=-2},re=(t,e,n,o,s,l)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(r.shadowRoot&&r.tagName===Wt&&(r=r.shadowRoot);s<=l;++s)o[s]&&(i=se(null,n,s),i&&(o[s].k=i,ve(r,i,fe(e))))},ce=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.k;pe(e),t&&(ee=!0,t["s-ol"]?t["s-ol"].remove():ie(t,!0),t.remove())}}},ue=(t,e,n=!1)=>t.N===e.N&&("slot"===t.N?t.O===e.O:n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),fe=t=>t&&t["s-ol"]||t,ae=(t,e,n=!1)=>{const o=e.k=t.k,s=t.S,l=e.S,i=e.$;let r;null===i?("slot"!==e.N||te||t.O!==e.O&&(e.k["s-sn"]=e.O||"",le(e.k.parentElement)),Xt(t,e,oe,n),null!==s&&null!==l?((t,e,n,o,s=!1)=>{let l,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],h=e[a],p=o.length-1,v=o[0],b=o[p];for(;r<=a&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==v)v=o[++c];else if(null==b)b=o[--p];else if(ue(d,v,s))ae(d,v,s),d=e[++r],v=o[++c];else if(ue(h,b,s))ae(h,b,s),h=e[--a],b=o[--p];else if(ue(d,b,s))"slot"!==d.N&&"slot"!==b.N||ie(d.k.parentNode,!1),ae(d,b,s),ve(t,d.k,h.k.nextSibling),d=e[++r],b=o[--p];else if(ue(h,v,s))"slot"!==d.N&&"slot"!==b.N||ie(h.k.parentNode,!1),ae(h,v,s),ve(t,h.k,d.k),h=e[--a],v=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].j&&e[f].j===v.j){u=f;break}u>=0?(i=e[u],i.N!==v.N?l=se(e&&e[c],n,u):(ae(i,v,s),e[u]=void 0,l=i.k),v=o[++c]):(l=se(e&&e[c],n,c),v=o[++c]),l&&ve(fe(d.k).parentNode,l,fe(d.k))}r>a?re(t,null==o[p+1]?null:o[p+1].k,n,o,c,p):c>p&&ce(e,r,a)})(o,s,e,l,n):null!==l?(null!==t.$&&(o.textContent=""),re(o,null,e,l,0,l.length-1)):n||null===s?n&&null!==s&&null===l&&(e.S=s):ce(s,0,s.length-1)):(r=o["s-cr"])?r.parentNode.textContent=i:t.$!==i&&(o.data=i)},de=[],he=t=>{let e,n,o;const s=t.__childNodes||t.childNodes;for(const t of s){if(t["s-sr"]&&(e=t["s-cr"])&&e.parentNode){n=e.parentNode.__childNodes||e.parentNode.childNodes;const s=t["s-sn"];for(o=n.length-1;o>=0;o--)if(e=n[o],!(e["s-cn"]||e["s-nr"]||e["s-hn"]===t["s-hn"]||e["s-sh"]&&e["s-sh"]===t["s-hn"]))if(G(e,s)){let n=de.find((t=>t.R===e));ee=!0,e["s-sn"]=e["s-sn"]||s,n?(n.R["s-sh"]=t["s-hn"],n.A=t):(e["s-sh"]=t["s-hn"],de.push({A:t,R:e})),e["s-sr"]&&de.map((t=>{G(t.R,e["s-sn"])&&(n=de.find((t=>t.R===e)),n&&!t.A&&(t.A=n.A))}))}else de.some((t=>t.R===e))||de.push({R:e})}1===t.nodeType&&he(t)}},pe=t=>{t.m&&t.m.ref&&t.m.ref(null),t.S&&t.S.map(pe)},ve=(t,e,n)=>{if("string"==typeof e["s-sn"]&&e["s-sr"]&&e["s-cr"])be(e["s-cr"],e,t,e.parentElement);else if("string"==typeof e["s-sn"]){11!==t.getRootNode().nodeType&&$t(e),t.insertBefore(e,n);const{slotNode:o}=tt(e);return o&&Z(o),e}return t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n)};function be(t,e,n,o){var s,l;let i;if(t&&"string"==typeof e["s-sn"]&&e["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(i=e["s-si"]||t.parentNode["s-sc"])){const t=e["s-sn"],r=e["s-hn"];if(null==(s=n.classList)||s.add(i+"-s"),o&&(null==(l=o.classList)?void 0:l.contains(i+"-s"))){let e=(o.__childNodes||o.childNodes)[0],n=!1;for(;e;){if(e["s-sn"]!==t&&e["s-hn"]===r&&e["s-sr"]){n=!0;break}e=e.nextSibling}n||o.classList.remove(i+"-s")}}}var $e=(t,e)=>{if(e&&!t.T&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.T=()=>{e["s-p"].splice(n-1,1),o()})))}},me=(t,e)=>{if(t.u|=16,!(4&t.u))return $e(t,t.B),R((()=>ye(t,e)));t.u|=512},ye=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let s;return e?(t.u|=256,t.P&&(t.P.map((([t,e])=>Ce(o,t,e,n))),t.P=void 0),s=Ce(o,"componentWillLoad",void 0,n)):s=Ce(o,"componentWillUpdate",void 0,n),s=ge(s,(()=>Ce(o,"componentWillRender",void 0,n))),ge(s,(()=>Se(t,o,e)))},ge=(t,e)=>we(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),we=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Se=async(t,e,n)=>{var o;const s=t.$hostElement$,l=s["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,s=Ot(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(t);Oe(t,e,s,n),l&&(l.map((t=>t())),s["s-rc"]=void 0);{const e=null!=(o=s["s-p"])?o:[],n=()=>xe(t);0===e.length?n():(Promise.all(e).then(n),t.u|=4,e.length=0)}},je=null,Oe=(t,e,n,o)=>{try{je=e,e=e.render&&e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{var o,s,l,i,r;const c=t.$hostElement$,u=t.o,f=t.F||Et(null,null),a=(t=>t&&t.N===Ct)(e)?e:kt(null,null,e);if(Wt=c.tagName,u.U&&(a.m=a.m||{},u.U.map((([t,e])=>a.m[e]=c[t]))),n&&a.m)for(const t of Object.keys(a.m))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(a.m[t]=c[t]);if(a.N=null,a.u|=4,t.F=a,a.k=f.k=c.shadowRoot||c,_t=c["s-sc"],te=!(!(1&u.u)||128&u.u),Dt=c["s-cr"],ee=!1,ae(f,a,n),S.u|=1,ne){he(a.k);for(const t of de){const e=t.R;if(!e["s-ol"]&&g.document){const t=g.document.createTextNode("");t["s-nr"]=e,ve(e.parentNode,e["s-ol"]=t,e)}}for(const t of de){const e=t.R,r=t.A;if(r){const t=r.parentNode;let n=r.nextSibling;if(n&&1===n.nodeType){let l=null==(o=e["s-ol"])?void 0:o.previousSibling;for(;l;){let o=null!=(s=l["s-nr"])?s:null;if(o&&o["s-sn"]===e["s-sn"]&&t===(o.__parentNode||o.parentNode)){for(o=o.nextSibling;o===e||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){n=o;break}}l=l.previousSibling}}(!n&&t!==(e.__parentNode||e.parentNode)||(e.__nextSibling||e.nextSibling)!==n)&&e!==n&&(ve(t,e,n),1===e.nodeType&&"SLOT-FB"!==e.tagName&&(e.hidden=null!=(l=e["s-ih"])&&l)),e&&"function"==typeof r["s-rf"]&&r["s-rf"](r)}else 1===e.nodeType&&(n&&(e["s-ih"]=null!=(i=e.hidden)&&i),e.hidden=!0)}}if(ee&&H(a.k),S.u&=-2,de.length=0,2&u.u){const t=a.k.__childNodes||a.k.childNodes;for(const e of t)e["s-hn"]===Wt||e["s-sh"]||(n&&null==e["s-ih"]&&(e["s-ih"]=null!=(r=e.hidden)&&r),e.hidden=!0)}Dt=void 0})(t,e,o)}catch(e){d(e,t.$hostElement$)}return je=null,null},Ne=()=>je,xe=t=>{const e=t.$hostElement$,n=t.i,o=t.B;Ce(n,"componentDidRender",void 0,e),64&t.u?Ce(n,"componentDidUpdate",void 0,e):(t.u|=64,Ie(e),Ce(n,"componentDidLoad",void 0,e),t._(e),o||Ee()),t.D(e),t.T&&(t.T(),t.T=void 0),512&t.u&&M((()=>me(t,!1))),t.u&=-517},ke=t=>{{const e=u(t),n=e.$hostElement$.isConnected;return n&&2==(18&e.u)&&me(e,!1),n}},Ee=()=>{var e;M((()=>Jt(g,"appload",{detail:{namespace:t}}))),(null==(e=S.W)?void 0:e.size)&&S.W.clear()},Ce=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){d(t,o)}},Ie=t=>t.classList.add("hydrated"),Me=(t,e,n,o)=>{const s=u(t);if(!s)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const l=s.$hostElement$,i=s.l.get(e),r=s.u,c=s.i;if(n=Vt(n,o.t[e][0]),(!(8&r)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(s.l.set(e,n),c)){if(o.V&&128&r){const t=o.V[e];t&&t.map((t=>{try{c[t](n,i,e)}catch(t){d(t,l)}}))}if(2==(18&r)){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(n,i,e))return;me(s,!1)}}},Le=(t,e,n)=>{var o,s;const l=t.prototype;if(e.t||e.V||t.watchers){t.watchers&&!e.V&&(e.V=t.watchers);const i=Object.entries(null!=(o=e.t)?o:{});if(i.map((([t,[o]])=>{if(31&o||2&n&&32&o){const{get:s,set:i}=Object.getOwnPropertyDescriptor(l,t)||{};s&&(e.t[t][0]|=2048),i&&(e.t[t][0]|=4096),(1&n||!s)&&Object.defineProperty(l,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>u(this).l.get(e))(0,t);const n=u(this),o=n?n.i:l;if(!o)return;return o[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(l,t,{set(s){const l=u(this);if(i){const n=32&o?this[t]:l.$hostElement$[t];return void 0===n&&l.l.get(t)?s=l.l.get(t):!l.l.get(t)&&n&&l.l.set(t,n),i.call(this,Vt(s,o)),void Me(this,t,s=32&o?this[t]:l.$hostElement$[t],e)}{if(!(1&n&&4096&e.t[t][0]))return Me(this,t,s,e),void(1&n&&!l.i&&l.H.then((()=>{4096&e.t[t][0]&&l.i[t]!==l.l.get(t)&&(l.i[t]=s)})));const i=()=>{const n=l.i[t];!l.l.get(t)&&n&&l.l.set(t,n),l.i[t]=Vt(s,o),Me(this,t,l.i[t],e)};l.i?i():l.H.then((()=>i()))}}})}else 1&n&&64&o&&Object.defineProperty(l,t,{value(...e){var n;const o=u(this);return null==(n=null==o?void 0:o.J)?void 0:n.then((()=>{var n;return null==(n=o.i)?void 0:n[t](...e)}))}})})),1&n){const n=new Map;l.attributeChangedCallback=function(t,o,s){S.jmp((()=>{var i;const r=n.get(t);if(this.hasOwnProperty(r))s=this[r],delete this[r];else{if(l.hasOwnProperty(r)&&"number"==typeof this[r]&&this[r]==s)return;if(null==r){const n=u(this),l=null==n?void 0:n.u;if(l&&!(8&l)&&128&l&&s!==o){const l=n.i,r=null==(i=e.V)?void 0:i[t];null==r||r.forEach((e=>{null!=l[e]&&l[e].call(l,s,o,t)}))}return}}const c=Object.getOwnPropertyDescriptor(l,r);(s=(null!==s||"boolean"!=typeof this[r])&&s)===this[r]||c.get&&!c.set||(this[r]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.V)?s:{}),...i.filter((([t,e])=>15&e[0])).map((([t,o])=>{var s;const l=o[1]||t;return n.set(l,t),512&o[0]&&(null==(s=e.U)||s.push([t,l])),l}))]))}}return t},Re=(t,e)=>{Ce(t,"connectedCallback",void 0,e)},Ae=t=>{if(!(1&S.u)){const e=u(t),n=e.o,o=()=>{};if(1&e.u)Ue(t,e,n.Y),(null==e?void 0:e.i)?Re(e.i,t):(null==e?void 0:e.H)&&e.H.then((()=>Re(e.i,t)));else{let o;if(e.u|=1,o=t.getAttribute(v),o){if(1&n.u){const e=Ot(t.shadowRoot,n);t.classList.remove(e+"-h",e+"-s")}else if(2&n.u){const e=Nt(n);t["s-sc"]=e}((t,e,n,o)=>{var s,l;const i=t.shadowRoot,r=[],c=[],f=[],a=i?[]:null,d=Et(e,null);let h;d.k=t,Object.entries((null==(s=o.o)?void 0:s.t)||{}).forEach((([e,[n,s]])=>{var l;if(!(31&n))return;const i=t.getAttribute(s||e);if(null!==i){const t=Vt(i,n);null==(l=null==o?void 0:o.l)||l.set(e,t)}}));{const e=o.o;e&&10&e.u&&t["s-sc"]?(h=t["s-sc"],t.classList.add(h+"-h")):t["s-sc"]&&delete t["s-sc"]}!g.document||S.W&&S.W.size||At(g.document.body,S.W=new Map),t[v]=n,t.removeAttribute(v),o.F=Rt(d,r,c,a,t,t,n,f);let p=0;const b=r.length;let $;for(;p<b;p++){$=r[p];const n=$.C+"."+$.I,o=S.W.get(n),s=$.k;if(i){if((null==(l=$.N)?void 0:(""+l).includes("-"))&&!$.k.shadowRoot){const e=Nt(u($.k).o),n=g.document.querySelector(`style[sty-id="${e}"]`);n&&t.shadowRoot.append(n.cloneNode(!0))}}else s["s-hn"]=e.toUpperCase(),"slot"===$.N&&(s["s-cr"]=t["s-cr"]);"slot"===$.N&&($.O=$.k["s-sn"]||$.k.name||null,$.S?($.u|=2,$.k.childNodes.length||$.S.forEach((t=>{$.k.appendChild(t.k)}))):$.u|=1),o&&o.isConnected&&(o.parentElement.shadowRoot&&""===o["s-en"]&&o.parentNode.insertBefore(s,o.nextSibling),o.parentNode.removeChild(o),i||(s["s-oo"]=parseInt($.I))),o&&!o["s-id"]&&S.W.delete(n)}const m=[],y=f.length;let w,j,O,N,x=0;for(;x<y;x++)if(w=f[x],w&&w.length)for(O=w.length,j=0;j<O;j++){if(N=w[j],m[N.hostId]||(m[N.hostId]=S.W.get(N.hostId)),!m[N.hostId])continue;const t=m[N.hostId];t.shadowRoot&&i||(N.slot["s-cr"]||(N.slot["s-cr"]=t["s-cr"],N.slot["s-cr"]=!N.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),K(N.node,N.slot,!1,N.node["s-oo"]),dt(N.node)),t.shadowRoot&&N.node.parentElement!==t&&t.appendChild(N.node)}if(h&&c.length&&c.forEach((t=>{t.k.parentElement.classList.add(h+"-s")})),i){let e=0;const n=a.length;if(n){for(;e<n;e++)i.appendChild(a[e]);Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):(8===t.nodeType&&!t.nodeValue||3===t.nodeType&&!t.wholeText.trim())&&t.parentNode.removeChild(t))}))}}o.$hostElement$=t})(t,n.v,o,e)}if(!o)if(12&n.u)Te(t);else if(!(4&n.u)){const e=t.firstChild;8!==(null==e?void 0:e.nodeType)||e["s-cn"]||e.nodeValue||t.removeChild(e)}{let n=t;for(;n=n.parentNode||n.host;)if(1===n.nodeType&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){$e(e,e.B=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.u)){if(e.u|=32,n.q){const s=((t,e)=>{const n=t.v.replace(/-/g,"_"),o=t.q;if(!o)return;const s=h.get(o);return s?s[n]:import(`./${o}.entry.js`).then((t=>(h.set(o,t),t[n])),(t=>{d(t,e.$hostElement$)}))
|
5
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(s&&"then"in s){const t=()=>{};o=await s,t()}else o=s;if(!o)throw Error(`Constructor for "${n.v}#${e.G}" was not found`);o.isProxied||(n.V=o.watchers,Le(o,n,2),o.isProxied=!0);const l=()=>{};e.u|=8;try{new o(e)}catch(e){d(e,t)}e.u&=-9,e.u|=128,l(),Re(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=Nt(n);if(!p.has(e)){const o=()=>{};jt(e,t,!!(1&n.u)),o()}}}const s=e.B,l=()=>me(e,!0);s&&s["s-rc"]?s["s-rc"].push(l):l()})(t,e,n)}o()}},Te=t=>{if(!g.document)return;const e=t["s-cr"]=g.document.createComment("");e["s-cn"]=!0,ve(t,e,t.firstChild)},Be=(t,e)=>{Ce(t,"disconnectedCallback",void 0,e||t)},Pe=(t,e={})=>{var n;if(!g.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const o=[],s=e.exclude||[],l=g.customElements,i=g.document.head,r=i.querySelector("meta[charset]"),c=g.document.createElement("style"),f=[];let a,d=!0;Object.assign(S,e),S.h=new URL(e.resourcesUrl||"./",g.document.baseURI).href,S.u|=2,(()=>{if(!g.document)return;const t=g.document.querySelectorAll(`[${b}]`);let e=0;for(;e<t.length;e++)jt(t[e].getAttribute(b),xt(t[e].innerHTML),!0)})();let h=!1;if(t.map((t=>{t[1].map((n=>{var i;const r={u:n[0],v:n[1],t:n[2],Y:n[3]};4&r.u&&(h=!0),r.t=n[2],r.Y=n[3],r.U=[],r.V=null!=(i=n[4])?i:{};const c=e.transformTagName?e.transformTagName(r.v):r.v,p=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map};n.J=new Promise((t=>n.D=t)),n.H=new Promise((t=>n._=t)),t["s-p"]=[],t["s-rc"]=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,r),1&r.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${r.v}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else z.call(t,r)}connectedCallback(){const t=u(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,Ue(this,t,r.Y)),a&&(clearTimeout(a),a=null),d?f.push(this):S.jmp((()=>Ae(this)))}disconnectedCallback(){S.jmp((()=>(async t=>{if(!(1&S.u)){const e=u(t);e.K&&(e.K.map((t=>t())),e.K=void 0),(null==e?void 0:e.i)?Be(e.i,t):(null==e?void 0:e.H)&&e.H.then((()=>Be(e.i,t)))}St.has(t)&&St.delete(t),t.shadowRoot&&St.has(t.shadowRoot)&&St.delete(t.shadowRoot)})(this))),S.raf((()=>{var t;const e=u(this),n=f.findIndex((t=>t===this));n>-1&&f.splice(n,1),(null==(t=null==e?void 0:e.F)?void 0:t.k)instanceof Node&&!e.F.k.isConnected&&delete e.F.k}))}componentOnReady(){return u(this).H}};2&r.u&&(t=>{et(t),nt(t),lt(t),st(t),ut(t),it(t),rt(t),ct(t),ft(t),at(t),ot(t)})(p.prototype),r.q=t[0],s.includes(c)||l.get(c)||(o.push(c),l.define(c,Le(p,r,1)))}))})),o.length>0&&(h&&(c.textContent+=m),c.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",c.innerHTML.length)){c.setAttribute("data-styles","");const t=null!=(n=S.p)?n:B(g.document);null!=t&&c.setAttribute("nonce",t),i.insertBefore(c,r?r.nextSibling:i.firstChild)}d=!1,f.length?f.map((t=>t.connectedCallback())):S.jmp((()=>a=setTimeout(Ee,30)))},Fe=(t,e)=>e,Ue=(t,e,n)=>{n&&g.document&&n.map((([n,o,s])=>{const l=De(g.document,t,n),i=_e(e,s),r=We(n);S.ael(l,o,i,r),(e.K=e.K||[]).push((()=>S.rel(l,o,i,r)))}))},_e=(t,e)=>n=>{var o;try{256&t.u?null==(o=t.i)||o[e](n):(t.P=t.P||[]).push([e,n])}catch(e){d(e,t.$hostElement$)}},De=(t,e,n)=>8&n?g:16&n?t.body:e,We=t=>({passive:!!(1&t),capture:!!(2&t)}),Ve=t=>S.p=t;export{n as B,Fe as F,w as H,t as N,Ct as a,Pe as b,Ht as c,R as d,L as e,d as f,zt as g,kt as h,Ne as i,ke as j,A as k,j as p,f as r,Ve as s,g as w}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{
|
4
|
+
import{i as e,j as t}from"./index-CX_Hk6ss.js";const s=e=>!("isConnected"in e)||e.isConnected,n=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(s))})(...t)}),2e3)}})(),o=e=>"function"==typeof e?e():e,r=(s,r)=>{const c=((e,t=(e,t)=>e!==t)=>{const s=o(e);let n=new Map(Object.entries(s??{}));const r={dispose:[],get:[],set:[],reset:[]},c=()=>{n=new Map(Object.entries(o(e)??{})),r.reset.forEach((e=>e()))},i=e=>(r.get.forEach((t=>t(e))),n.get(e)),p=(e,s)=>{const o=n.get(e);t(s,o,e)&&(n.set(e,s),r.set.forEach((t=>t(e,s,o))))},u="undefined"==typeof Proxy?{}:new Proxy(s,{get:(e,t)=>i(t),ownKeys:()=>Array.from(n.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>n.has(t),set:(e,t,s)=>(p(t,s),!0)}),a=(e,t)=>(r[e].push(t),()=>{((e,t)=>{const s=e.indexOf(t);s>=0&&(e[s]=e[e.length-1],e.length--)})(r[e],t)});return{state:u,get:i,set:p,on:a,onChange:(t,s)=>{const n=a("set",((e,n)=>{e===t&&s(n)})),r=a("reset",(()=>s(o(e)[t])));return()=>{n(),r()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(a("set",t.set)),t.get&&e.push(a("get",t.get)),t.reset&&e.push(a("reset",t.reset)),t.dispose&&e.push(a("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{r.dispose.forEach((e=>e())),c()},reset:c,forceUpdate:e=>{const t=n.get(e);r.set.forEach((s=>s(e,t,t)))}}})(s,r);return c.use((()=>{if("function"!=typeof e)return{};const s=new Map;return{dispose:()=>s.clear(),get:t=>{const n=e();n&&((e,t,s)=>{const n=e.get(t);n?n.includes(s)||n.push(s):e.set(t,[s])})(s,t,n)},set:e=>{const o=s.get(e);o&&s.set(e,o.filter(t)),n(s)},reset:()=>{s.forEach((e=>e.forEach(t))),n(s)}}})()),c};export{r as c}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{N as n}from"./index-
|
4
|
+
import{N as n}from"./index-CX_Hk6ss.js";import{t as o,s as e}from"./renderer-ZmozgREV.js";export{g as getTagPrefix}from"./renderer-ZmozgREV.js";export{d as nanoDebounce,t as nanoThrottle}from"./throttle-C93FMm2Z.js";export{g as nanoGetTabElements}from"./tabbable-CZtanbA9.js";const a=(n,o=[],t)=>`${n}\n ${o.length?'<nano-cta group="balanced" slot="footer">'+o.map(((n,o)=>`<button \n data-btn="${o}" \n class="${n.classes}"\n theme="${n.theme||t}"\n secondary="${n.secondary?"true":"false"}"\n >${n.content}</button>`)).join("")+"</nano-cta>":""}\n `,r=(n,o=[])=>{o.length&&Array.from(n.querySelectorAll('nano-cta[slot="footer"] button')).map((n=>{const t=o.find(((o,t)=>n.dataset.btn===t.toString()));t&&t.handler&&n.addEventListener("click",t.handler)}))};async function c(n,t="tr",e,c,s=[]){const i={theme:"primary",duration:3e3,closable:!0,...c};e=e||"light/circle-info";const m=Object.assign(document.createElement(o("nano-alert")),{...i,open:!1,innerHTML:`\n <nano-icon name="${e}" slot="icon"></nano-icon>\n ${a(n,s,i.theme)}\n `});return r(m,s),document.body.appendChild(m),new Promise((n=>{requestAnimationFrame((async()=>{await m.toast(t),n(m)}))}))}function s(n,t=[],e,c="light/circle-info",s={}){const i={theme:"primary",duration:1/0,closable:!1,...s};c=c||"light/circle-info";const m=Object.assign(document.createElement(o("nano-alert")),{...i,open:!1,innerHTML:`\n ${c?`<nano-icon name="${c}" slot="icon"></nano-icon>`:""}\n ${a(n,t,i.theme)}\n `});return r(m,t),document.body.appendChild(m),new Promise((n=>{setTimeout((async()=>{await m.alert(e),n(m)}),100)}))}function i(n,t=[],e){const a={noUserDismiss:!1,label:"Dialog",...e},r=Object.assign(document.createElement(o("nano-dialog")),{...a,open:!1,innerHTML:`\n ${n}\n ${t.length?'<nano-cta group="balanced" slot="footer">'+t.map(((n,o)=>`<button \n data-btn="${o}" \n class="${n.classes}"\n theme="${n.theme}"\n secondary="${n.secondary?"true":"false"}"\n >${n.content}</button>`)).join("")+"</nano-cta>":""}`});return t.length&&Array.from(r.querySelectorAll('nano-cta[slot="footer"] button')).map((n=>{const o=t.find(((o,t)=>n.dataset.btn===t.toString()));o&&o.handler&&n.addEventListener("click",o.handler)})),document.body.appendChild(r),new Promise((n=>{requestAnimationFrame((async()=>{await r.show(),n(r)}))}))}function m(o){if(!window||!document)return;const t=e(o),a=document.querySelector(`script[src$="/${n}.esm.js"]`);return a&&(a["data-opts"]={transformTagName:t}),t}const l=()=>{};export{m as componentPrefix,l as initialize,i as nanoCreateDialog,s as nanoShowAlert,c as nanoShowToast,o as transformTag}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{F as t,u as i}from"./nano-slides-
|
4
|
+
import{F as t,u as i}from"./nano-slides-CuheM3tf.js";import"./index-CX_Hk6ss.js";import"./renderer-ZmozgREV.js";t.createMethods.push("_createLazyload");const s=t.prototype;function a(t,i){this.img=t,this.flickity=i,this.load()}s._createLazyload=function(){this.on("select",this.lazyLoad)},s.lazyLoad=function(){const t=this.options.lazyLoad;if(!t)return;const s=this.getAdjacentCellElements("number"==typeof t?t:0);let l=[];s.forEach((function(t){const s=function(t){if("IMG"==t.nodeName){const i=t.getAttribute("data-flickity-lazyload"),s=t.getAttribute("data-flickity-lazyload-src"),a=t.getAttribute("data-flickity-lazyload-srcset");if(i||s||a)return[t]}const s=t.querySelectorAll("img[data-flickity-lazyload], img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]");return i.makeArray(s)}(t);l=l.concat(s)})),l.forEach((function(t){new a(t,this)}),this)},a.prototype.handleEvent=i.handleEvent,a.prototype.load=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this);const t=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src"),i=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=t,i&&this.img.setAttribute("srcset",i),this.img.removeAttribute("data-flickity-lazyload"),this.img.removeAttribute("data-flickity-lazyload-src"),this.img.removeAttribute("data-flickity-lazyload-srcset")},a.prototype.onload=function(t){this.complete(t,"flickity-lazyloaded")},a.prototype.onerror=function(t){this.complete(t,"flickity-lazyerror")},a.prototype.complete=function(t,i){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this);const s=this.flickity.getParentCell(this.img),a=s&&s.element;this.flickity.cellSizeChange(a),this.img.classList.add(i),this.flickity.dispatchEvent("lazyLoad",t,a)},t.LazyLoader=a;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{g as t}from"./tabbable-
|
4
|
+
import{g as t}from"./tabbable-CZtanbA9.js";let s=[];class i{element;tabDirection="forward";constructor(t){this.element=t,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activate(){s.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown)}deactivate(){s=s.filter((t=>t!==this.element)),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown)}isActive(){return s[s.length-1]===this.element}handleFocusIn(s){const i=s.composedPath();if(this.isActive()&&!i.includes(this.element)){const s=t(this.element),i="backward"===this.tabDirection?s.length-1:0;s[i]?.focus({preventScroll:!0})}}handleKeyDown(t){"Tab"===t.key&&t.shiftKey&&(this.tabDirection="backward",setTimeout((()=>this.tabDirection="forward")))}}export{i as M}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{r as
|
4
|
+
import{r as o,c as t,g as n}from"./index-CX_Hk6ss.js";import{t as e,h as i}from"./renderer-ZmozgREV.js";import{g as r}from"./dom-COiksOVZ.js";const a=class{constructor(n){o(this,n),this.nanoToggle=t(this,"nanoToggle",7)}itemOpened;get el(){return n(this)}nanoToggle;onToggleHandler(o){"NANO-DETAILS"===o.target?.tagName&&(o.stopPropagation(),(r(this.el,e("nano-details"))||this.el.querySelectorAll(e("nano-details"))).forEach(((t,n)=>{t!==o.target?t.open=!1:this.itemOpened=n})),this.nanoToggle.emit(o.target))}onClosedHandler(o){o.stopPropagation(),this.itemOpened=null,this.nanoToggle.emit()}render(){return i("slot",{key:"ec9331ce0686c1234021e58af9a456aa267e9247"})}};a.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{display:contents}";export{a as nano_accordion}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{r as n,c as t,a as o,d as a}from"./index-DXvE-U_j.js";import{M as e}from"./modal-B_AxJQQp.js";import{l as i,u as r}from"./scroll-iCYjzh9N.js";import{h as s,t as l}from"./renderer-BUaAsDso.js";import{b as c}from"./active-element-C1pBwzyj.js";import{H as h}from"./slot-DYFgWo5f.js";import"./tabbable-C4l-rYq9.js";import"./dom-Cb7FUtXp.js";let d,m,u,p;globalThis.document&&(d=Object.assign(document.createElement("div"),{className:"nano-toast-stack nano-toast-stack--tr"}),m=Object.assign(document.createElement("div"),{className:"nano-toast-stack nano-toast-stack--tl"}),u=Object.assign(document.createElement("div"),{className:"nano-toast-stack nano-toast-stack--bl"}),p=Object.assign(document.createElement("div"),{className:"nano-toast-stack nano-toast-stack--br"}));const v=class{constructor(o){n(this,o),this.nanoShow=t(this,"nanoShow",7),this.nanoAfterShow=t(this,"nanoAfterShow",7),this.nanoHide=t(this,"nanoHide",7),this.nanoAfterHide=t(this,"nanoAfterHide",7)}panel;overlay;modal;originalTrigger;goingToHide=!1;goingToShow=!1;autoHideTimeout;remainingTimeInterval;countdownAnimation;countdownElement;slotCtrl=new h(this,"[default]","heading","title","footer");isModal=!1;isToast=!1;isShowing=!1;label;noDismiss=!1;get host(){return o(this)}open=!1;handleOpenChange(){this.open?this.show():this.hide()}closable=!1;color;theme;duration=1/0;remainingTime=this.duration;handleDurationChange(){this.restartAutoHide()}hoist=!1;handleHoistChange(){this.hoist&&document.body.children[0]!==this.host&&document.body.prepend(this.host)}countdown=!0;nanoShow;nanoAfterShow;nanoHide;nanoAfterHide;async show(){if(!this.goingToShow)return this.nanoShow.emit().defaultPrevented?(this.open=!1,!1):(this.host.hidden=!1,this.goingToShow=!0,this.open=!0,requestAnimationFrame((()=>{this.isShowing=!0,this.goingToShow=!1})),void(this.duration<1/0&&this.restartAutoHide()))}async hide(){if(!this.goingToHide)return this.nanoHide.emit().defaultPrevented?(this.open=!0,!1):(this.goingToHide=!0,this.open=!1,c(this.host),requestAnimationFrame((()=>this.goingToHide=!1)),clearTimeout(this.autoHideTimeout),void clearInterval(this.remainingTimeInterval))}async toast(n="tr"){return this.isToast=!0,new Promise((t=>{let o;switch(this.handleCountdownChange(),n){case"tl":o=m;break;case"bl":o=u;break;case"br":o=p;break;default:o=d}o.isConnected||document.body.appendChild(o),o.appendChild(this.host),this.connectedCallback(),this.show();const a=()=>{this.host.remove(),this.isToast=!1,t(),o.querySelector(l("nano-alert"))||o.remove()};this.host.addEventListener("nanoAfterHide",a,{once:!0}),this.host.addEventListener("nano-after-hide",a,{once:!0})}))}async alert(n){return this.isModal=!0,this.label=n,new Promise((n=>{let t=!1;for(const n of document.body.children)"NANO-ALERT"===n.tagName&&n===this.host&&(t=!0);t||document.body.append(this.host),this.modal.activate(),i(this.host),this.originalTrigger=document.activeElement,requestAnimationFrame((()=>{this.show()}));const o=()=>requestAnimationFrame((()=>this.panel.focus({preventScroll:!0}))),a=()=>{this.modal.deactivate(),this.host.remove(),this.label=void 0,this.isModal=!1,n(),this.originalTrigger&&"function"==typeof this.originalTrigger.focus&&setTimeout((()=>this.originalTrigger.focus()))};this.host.addEventListener("nanoAfterShow",o,{once:!0}),this.host.addEventListener("nano-after-show",o,{once:!0}),this.host.addEventListener("nanoAfterHide",a,{once:!0}),this.host.addEventListener("nano-after-hide",a,{once:!0})}))}handleCountdownChange(){this.open&&this.duration<1/0&&this.countdown&&(this.countdownAnimation=this.countdownElement.animate([{width:"100%"},{width:"0"}],{duration:this.duration,easing:"linear"}))}restartAutoHide(){this.handleCountdownChange(),clearTimeout(this.autoHideTimeout),clearInterval(this.remainingTimeInterval),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.duration),this.remainingTime=this.duration,this.remainingTimeInterval=window.setInterval((()=>{this.remainingTime-=100}),100))}handleMouseEnter=()=>{this.countdownAnimation?.pause(),clearTimeout(this.autoHideTimeout),clearInterval(this.remainingTimeInterval)};handleMouseLeave=()=>{this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.remainingTime),this.remainingTimeInterval=window.setInterval((()=>{this.remainingTime-=100}),100),this.countdownAnimation?.play())};handleCloseClick=()=>{this.hide()};handleTransitionEnd=n=>{"opacity"!==n.propertyName||n.target!==this.panel&&n.target!==this.overlay||(this.host.hidden=!this.open,this.isShowing=this.open,this.open?this.nanoAfterShow.emit():this.nanoAfterHide.emit())};handleButtonClick=n=>{n.defaultPrevented||n.target.tagName&&"button"===n.target.tagName.toLowerCase()&&this.hide()};connectedCallback(){this.modal=new e(this.host),this.handleHoistChange(),this.host.addEventListener("click",this.handleButtonClick),this.isShowing="string"==typeof this.host.getAttribute("showing")}disconnectedCallback(){r(this.host),this.host.removeEventListener("click",this.handleButtonClick)}componentDidLoad(){this.open&&!this.isShowing&&this.show()}Panel=()=>s("div",{ref:n=>this.panel=n,part:"panel",class:{alert:!0,"alert--open":this.open,"alert--toasty":this.isToast,"alert--modal":!!this.isModal,"alert--showing":this.isShowing,"alert--nodismiss":this.noDismiss},tabIndex:this.isModal?0:void 0,role:this.isModal?"alertdialog":"alert","aria-atomic":"true","aria-hidden":this.isShowing?"false":"true","aria-modal":this.isModal?"true":void 0,"aria-label":this.label?this.label:void 0,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onTransitionEnd:this.handleTransitionEnd},s("div",{class:"alert__main",part:"main"},s("div",{part:"icon",class:"alert__icon"},s("slot",{name:"icon"})),s("div",{part:"content",class:"alert__content","aria-live":this.isModal?"assertive":"polite"},this.slotCtrl.has("heading")&&s("div",{class:"alert__heading"},s("slot",{name:"heading"})),this.slotCtrl.has("title")&&s("div",{class:"alert__title"},s("slot",{name:"title"})),this.slotCtrl.has("[default]")&&s("div",{class:"alert__body"},s("slot",null)),this.slotCtrl.has("footer")&&s("div",{part:"footer",class:"alert__footer"},s("slot",{name:"footer"}))),this.closable&&s("div",{class:"alert__close",part:"close"},s("nano-icon-button",{iconName:"light/xmark",label:"close menu",onClick:this.handleCloseClick}))),this.duration<1/0&&[s("div",{role:"timer",class:"alert__timer"},this.remainingTime),this.countdown?s("div",{class:"alert__countdown"},s("div",{ref:n=>this.countdownElement=n,class:"alert__countdown-elapsed"})):""]);render(){return s(a,{key:"5e937f25c5029d3e2ec86f0d240b5f4336de9a51",class:{"nano-alert":!0},showing:this.isShowing},this.isModal&&[s("div",{key:"b21cc499555d44cde911efa637662363cb296c71",part:"overlay",class:{alert__overlay:!0,"alert__overlay--open":this.open},ref:n=>this.overlay=n}),s("div",{key:"6e3a1c5b34abc9324a3802927dc95a66ade63b18",class:"alert__modal-wrap",onClick:n=>{n.target.classList.contains("alert__modal-wrap")&&(this.noDismiss=!0,setTimeout((()=>this.noDismiss=!1),250))}},s(this.Panel,{key:"ca7f6ae3565e6a4249ccef33d868a166141b01e0"}))],!this.isModal&&s(this.Panel,{key:"f401f5e740a3af18c298b8ad4492b872b611a1f2"}))}static get watchers(){return{open:["handleOpenChange"],duration:["handleDurationChange"],hoist:["handleHoistChange"]}}};v.style=":host,\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n[hidden] {\n display: none !important;\n}\n@media (prefers-reduced-motion: reduce) {\n :host,\n *,\n *::before,\n *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }:host,\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n[hidden] {\n display: none !important;\n}\n@media (prefers-reduced-motion: reduce) {\n :host,\n *,\n *::before,\n *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }/** Typography */\n:host {\n /**\n * @prop --border-radius: Defaults to var(--nano-layer-border-radius);\n * @prop --border-color: Defaults to var(--nano-layer-border-color);\n * @prop --border-width: Defaults to var(--nano-layer-border-width);\n * @prop --background: Defaults to var(--nano-layer-background-color);\n * @prop --tint-color: The highlight colour (border-start, icon and heading text). Defaults to var(--nano-color-primary-1100);\n * @prop --icon-size: Defaults to var(--nano-pictogram-size-large);\n * @prop --scrim-color: overlay colour of alert display. Defaults to var(--nano-overlay-background-color);\n * @prop --close-button-color: Defaults to var(--nano-color-neutral-400);\n */\n --border-radius: var(--nano-layer-border-radius);\n --border-color: var(--nano-layer-border-color);\n --border-width: var(--nano-layer-border-width);\n --icon-size: var(--nano-pictogram-size-large);\n --scrim-color: var(--nano-overlay-background-color);\n --close-button-color: var(--nano-color-neutral-800);\n --tint-color: var(--nano-color-primary-1100);\n --background: var(--nano-color-primary-50);\n display: block;\n container-type: inline-size;\n}\n\n:host([color=neutral]), :host([theme=neutral]) {\n --tint-color: var(--nano-color-neutral-1200);\n --background: var(--nano-color-neutral-75);\n}\n\n:host([color=success]), :host([theme=success]) {\n --tint-color: var(--nano-color-success-1100);\n --background: var(--nano-color-success-50);\n}\n\n:host([color=warning]), :host([theme=warning]) {\n --tint-color: var(--nano-color-warning-1100);\n --background: var(--nano-color-warning-75);\n}\n\n:host([color=danger]), :host([theme=danger]) {\n --tint-color: var(--nano-color-danger-1100);\n --background: var(--nano-color-danger-100);\n}\n\n.alert {\n position: relative;\n background-color: var(--background);\n border: solid var(--border-width) var(--border-color);\n border-inline-start: solid 4px var(--tint-color);\n border-radius: var(--border-radius);\n opacity: 0;\n transform: scale(0.9);\n transition: var(--nano-transition-medium) opacity ease, var(--nano-transition-fast) transform ease;\n}\n.alert:focus {\n outline: none;\n}\n.alert:not(.alert--showing) {\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n clip-path: inset(50%);\n overflow: hidden;\n pointer-events: none;\n visibility: hidden;\n}\n.alert--open {\n opacity: 1;\n transform: none;\n}\n.alert--toasty, .alert--modal {\n box-shadow: var(--nano-shadow-l2);\n margin: var(--nano-spacing-md);\n}\n.alert--modal.alert--nodismiss {\n animation: cannotClose 0.25s ease-in-out 1;\n}\n@keyframes cannotClose {\n 0% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.08);\n }\n 100% {\n transform: scale(1);\n }\n}\n\n.alert__main {\n display: flex;\n align-items: stretch;\n}\n\n.alert__content {\n font-size: var(--nano-font-size-small);\n line-height: var(--nano-line-height-normal);\n letter-spacing: var(--nano-letter-spacing-loose);\n flex: 1 1 auto;\n padding: var(--nano-spacing-md);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n gap: var(--nano-spacing-sm);\n}\n\n.alert__modal-wrap {\n position: fixed;\n display: flex;\n align-items: center;\n justify-content: center;\n inset: 0;\n z-index: var(--nano-z-index-alert);\n}\n\n.alert__heading {\n font-size: var(--nano-font-size-small);\n line-height: var(--nano-line-height-normal);\n font-weight: var(--nano-font-weight-bold);\n color: var(--tint-color);\n}\n\n.alert__title {\n font-weight: var(--nano-font-weight-normal);\n font-size: var(--nano-font-size-medium);\n line-height: var(--nano-line-height-dense);\n}\n\n.alert__close {\n --color: var(--close-button-color);\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 1.1em;\n padding-inline: 0 var(--nano-spacing-md);\n padding-block: 0;\n}\n\n.alert__overlay {\n position: fixed;\n inset: 0;\n background-color: var(--scrim-color);\n opacity: 0;\n transition: var(--nano-transition-fast) opacity;\n z-index: var(--nano-z-index-alert);\n pointer-events: all;\n}\n.alert__overlay--open {\n opacity: 1;\n}\n\n.alert__icon {\n flex: 0 0 auto;\n display: flex;\n align-items: start;\n font-size: var(--icon-size);\n padding-block: var(--nano-spacing-md);\n}\n.alert__icon ::slotted(*), .alert__icon::slotted(*) {\n color: var(--tint-color);\n margin-inline-start: var(--nano-spacing-md);\n}\n@container (width < 280px) {\n .alert__icon {\n display: none;\n }\n}\n\n.alert__countdown {\n position: absolute;\n inset-block-end: 0;\n inset-inline-start: 0;\n inline-size: 100%;\n block-size: 4px;\n background-color: var(--nano-layer-border-color);\n display: flex;\n justify-content: flex-end;\n}\n\n.alert__countdown .alert__countdown-elapsed {\n block-size: 100%;\n inline-size: 0;\n}\n\n.alert__timer {\n clip-path: inset(50%);\n block-size: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n inline-size: 1px;\n}\n\n.alert__countdown-elapsed {\n background-color: var(--tint-color);\n}";export{v as nano_alert}
|
4
|
+
import{r as n,c as t,g as o,a}from"./index-CX_Hk6ss.js";import{M as e}from"./modal-CH7Vma1I.js";import{l as i,u as r}from"./scroll-D4n69pGx.js";import{h as s,t as l}from"./renderer-ZmozgREV.js";import{b as c}from"./active-element-C1pBwzyj.js";import{H as h}from"./slot-CjAtXEOo.js";import"./tabbable-CZtanbA9.js";import"./dom-COiksOVZ.js";let d,m,u,p;globalThis.document&&(d=Object.assign(document.createElement("div"),{className:"nano-toast-stack nano-toast-stack--tr"}),m=Object.assign(document.createElement("div"),{className:"nano-toast-stack nano-toast-stack--tl"}),u=Object.assign(document.createElement("div"),{className:"nano-toast-stack nano-toast-stack--bl"}),p=Object.assign(document.createElement("div"),{className:"nano-toast-stack nano-toast-stack--br"}));const v=class{constructor(o){n(this,o),this.nanoShow=t(this,"nanoShow",7),this.nanoAfterShow=t(this,"nanoAfterShow",7),this.nanoHide=t(this,"nanoHide",7),this.nanoAfterHide=t(this,"nanoAfterHide",7)}panel;overlay;modal;originalTrigger;goingToHide=!1;goingToShow=!1;autoHideTimeout;remainingTimeInterval;countdownAnimation;countdownElement;slotCtrl=new h(this,"[default]","heading","title","footer");isModal=!1;isToast=!1;isShowing=!1;label;noDismiss=!1;get host(){return o(this)}open=!1;handleOpenChange(){this.open?this.show():this.hide()}closable=!1;color;theme;duration=1/0;remainingTime=this.duration;handleDurationChange(){this.restartAutoHide()}hoist=!1;handleHoistChange(){this.hoist&&document.body.children[0]!==this.host&&document.body.prepend(this.host)}countdown=!0;nanoShow;nanoAfterShow;nanoHide;nanoAfterHide;async show(){if(!this.goingToShow)return this.nanoShow.emit().defaultPrevented?(this.open=!1,!1):(this.host.hidden=!1,this.goingToShow=!0,this.open=!0,requestAnimationFrame((()=>{this.isShowing=!0,this.goingToShow=!1})),void(this.duration<1/0&&this.restartAutoHide()))}async hide(){if(!this.goingToHide)return this.nanoHide.emit().defaultPrevented?(this.open=!0,!1):(this.goingToHide=!0,this.open=!1,c(this.host),requestAnimationFrame((()=>this.goingToHide=!1)),clearTimeout(this.autoHideTimeout),void clearInterval(this.remainingTimeInterval))}async toast(n="tr"){return this.isToast=!0,new Promise((t=>{let o;switch(this.handleCountdownChange(),n){case"tl":o=m;break;case"bl":o=u;break;case"br":o=p;break;default:o=d}o.isConnected||document.body.appendChild(o),o.appendChild(this.host),this.connectedCallback(),this.show();const a=()=>{this.host.remove(),this.isToast=!1,t(),o.querySelector(l("nano-alert"))||o.remove()};this.host.addEventListener("nanoAfterHide",a,{once:!0}),this.host.addEventListener("nano-after-hide",a,{once:!0})}))}async alert(n){return this.isModal=!0,this.label=n,new Promise((n=>{let t=!1;for(const n of document.body.children)"NANO-ALERT"===n.tagName&&n===this.host&&(t=!0);t||document.body.append(this.host),this.modal.activate(),i(this.host),this.originalTrigger=document.activeElement,requestAnimationFrame((()=>{this.show()}));const o=()=>requestAnimationFrame((()=>this.panel.focus({preventScroll:!0}))),a=()=>{this.modal.deactivate(),this.host.remove(),this.label=void 0,this.isModal=!1,n(),this.originalTrigger&&"function"==typeof this.originalTrigger.focus&&setTimeout((()=>this.originalTrigger.focus()))};this.host.addEventListener("nanoAfterShow",o,{once:!0}),this.host.addEventListener("nano-after-show",o,{once:!0}),this.host.addEventListener("nanoAfterHide",a,{once:!0}),this.host.addEventListener("nano-after-hide",a,{once:!0})}))}handleCountdownChange(){this.open&&this.duration<1/0&&this.countdown&&(this.countdownAnimation=this.countdownElement.animate([{width:"100%"},{width:"0"}],{duration:this.duration,easing:"linear"}))}restartAutoHide(){this.handleCountdownChange(),clearTimeout(this.autoHideTimeout),clearInterval(this.remainingTimeInterval),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.duration),this.remainingTime=this.duration,this.remainingTimeInterval=window.setInterval((()=>{this.remainingTime-=100}),100))}handleMouseEnter=()=>{this.countdownAnimation?.pause(),clearTimeout(this.autoHideTimeout),clearInterval(this.remainingTimeInterval)};handleMouseLeave=()=>{this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.remainingTime),this.remainingTimeInterval=window.setInterval((()=>{this.remainingTime-=100}),100),this.countdownAnimation?.play())};handleCloseClick=()=>{this.hide()};handleTransitionEnd=n=>{"opacity"!==n.propertyName||n.target!==this.panel&&n.target!==this.overlay||(this.host.hidden=!this.open,this.isShowing=this.open,this.open?this.nanoAfterShow.emit():this.nanoAfterHide.emit())};handleButtonClick=n=>{n.defaultPrevented||n.target.tagName&&"button"===n.target.tagName.toLowerCase()&&this.hide()};connectedCallback(){this.modal=new e(this.host),this.handleHoistChange(),this.host.addEventListener("click",this.handleButtonClick),this.isShowing="string"==typeof this.host.getAttribute("showing")}disconnectedCallback(){r(this.host),this.host.removeEventListener("click",this.handleButtonClick)}componentDidLoad(){this.open&&!this.isShowing&&this.show()}Panel=()=>s("div",{ref:n=>this.panel=n,part:"panel",class:{alert:!0,"alert--open":this.open,"alert--toasty":this.isToast,"alert--modal":!!this.isModal,"alert--showing":this.isShowing,"alert--nodismiss":this.noDismiss},tabIndex:this.isModal?0:void 0,role:this.isModal?"alertdialog":"alert","aria-atomic":"true","aria-hidden":this.isShowing?"false":"true","aria-modal":this.isModal?"true":void 0,"aria-label":this.label?this.label:void 0,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onTransitionEnd:this.handleTransitionEnd},s("div",{class:"alert__main",part:"main"},s("div",{part:"icon",class:"alert__icon"},s("slot",{name:"icon"})),s("div",{part:"content",class:"alert__content","aria-live":this.isModal?"assertive":"polite"},this.slotCtrl.has("heading")&&s("div",{class:"alert__heading"},s("slot",{name:"heading"})),this.slotCtrl.has("title")&&s("div",{class:"alert__title"},s("slot",{name:"title"})),this.slotCtrl.has("[default]")&&s("div",{class:"alert__body"},s("slot",null)),this.slotCtrl.has("footer")&&s("div",{part:"footer",class:"alert__footer"},s("slot",{name:"footer"}))),this.closable&&s("div",{class:"alert__close",part:"close"},s("nano-icon-button",{iconName:"light/xmark",label:"close menu",onClick:this.handleCloseClick}))),this.duration<1/0&&[s("div",{role:"timer",class:"alert__timer"},this.remainingTime),this.countdown?s("div",{class:"alert__countdown"},s("div",{ref:n=>this.countdownElement=n,class:"alert__countdown-elapsed"})):""]);render(){return s(a,{key:"5e937f25c5029d3e2ec86f0d240b5f4336de9a51",class:{"nano-alert":!0},showing:this.isShowing},this.isModal&&[s("div",{key:"b21cc499555d44cde911efa637662363cb296c71",part:"overlay",class:{alert__overlay:!0,"alert__overlay--open":this.open},ref:n=>this.overlay=n}),s("div",{key:"6e3a1c5b34abc9324a3802927dc95a66ade63b18",class:"alert__modal-wrap",onClick:n=>{n.target.classList.contains("alert__modal-wrap")&&(this.noDismiss=!0,setTimeout((()=>this.noDismiss=!1),250))}},s(this.Panel,{key:"ca7f6ae3565e6a4249ccef33d868a166141b01e0"}))],!this.isModal&&s(this.Panel,{key:"f401f5e740a3af18c298b8ad4492b872b611a1f2"}))}static get watchers(){return{open:["handleOpenChange"],duration:["handleDurationChange"],hoist:["handleHoistChange"]}}};v.style=":host,\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n[hidden] {\n display: none !important;\n}\n@media (prefers-reduced-motion: reduce) {\n :host,\n *,\n *::before,\n *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }:host,\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n[hidden] {\n display: none !important;\n}\n@media (prefers-reduced-motion: reduce) {\n :host,\n *,\n *::before,\n *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }/** Typography */\n:host {\n /**\n * @prop --border-radius: Defaults to var(--nano-layer-border-radius);\n * @prop --border-color: Defaults to var(--nano-layer-border-color);\n * @prop --border-width: Defaults to var(--nano-layer-border-width);\n * @prop --background: Defaults to var(--nano-layer-background-color);\n * @prop --tint-color: The highlight colour (border-start, icon and heading text). Defaults to var(--nano-color-primary-1100);\n * @prop --icon-size: Defaults to var(--nano-pictogram-size-large);\n * @prop --scrim-color: overlay colour of alert display. Defaults to var(--nano-overlay-background-color);\n * @prop --close-button-color: Defaults to var(--nano-color-neutral-400);\n */\n --border-radius: var(--nano-layer-border-radius);\n --border-color: var(--nano-layer-border-color);\n --border-width: var(--nano-layer-border-width);\n --icon-size: var(--nano-pictogram-size-large);\n --scrim-color: var(--nano-overlay-background-color);\n --close-button-color: var(--nano-color-neutral-800);\n --tint-color: var(--nano-color-primary-1100);\n --background: var(--nano-color-primary-50);\n display: block;\n container-type: inline-size;\n}\n\n:host([color=neutral]), :host([theme=neutral]) {\n --tint-color: var(--nano-color-neutral-1200);\n --background: var(--nano-color-neutral-75);\n}\n\n:host([color=success]), :host([theme=success]) {\n --tint-color: var(--nano-color-success-1100);\n --background: var(--nano-color-success-50);\n}\n\n:host([color=warning]), :host([theme=warning]) {\n --tint-color: var(--nano-color-warning-1100);\n --background: var(--nano-color-warning-75);\n}\n\n:host([color=danger]), :host([theme=danger]) {\n --tint-color: var(--nano-color-danger-1100);\n --background: var(--nano-color-danger-100);\n}\n\n.alert {\n position: relative;\n background-color: var(--background);\n border: solid var(--border-width) var(--border-color);\n border-inline-start: solid 4px var(--tint-color);\n border-radius: var(--border-radius);\n opacity: 0;\n transform: scale(0.9);\n transition: var(--nano-transition-medium) opacity ease, var(--nano-transition-fast) transform ease;\n}\n.alert:focus {\n outline: none;\n}\n.alert:not(.alert--showing) {\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n clip-path: inset(50%);\n overflow: hidden;\n pointer-events: none;\n visibility: hidden;\n}\n.alert--open {\n opacity: 1;\n transform: none;\n}\n.alert--toasty, .alert--modal {\n box-shadow: var(--nano-shadow-l2);\n margin: var(--nano-spacing-md);\n}\n.alert--modal.alert--nodismiss {\n animation: cannotClose 0.25s ease-in-out 1;\n}\n@keyframes cannotClose {\n 0% {\n transform: scale(1);\n }\n 50% {\n transform: scale(1.08);\n }\n 100% {\n transform: scale(1);\n }\n}\n\n.alert__main {\n display: flex;\n align-items: stretch;\n}\n\n.alert__content {\n font-size: var(--nano-font-size-small);\n line-height: var(--nano-line-height-normal);\n letter-spacing: var(--nano-letter-spacing-loose);\n flex: 1 1 auto;\n padding: var(--nano-spacing-md);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n gap: var(--nano-spacing-sm);\n}\n\n.alert__modal-wrap {\n position: fixed;\n display: flex;\n align-items: center;\n justify-content: center;\n inset: 0;\n z-index: var(--nano-z-index-alert);\n}\n\n.alert__heading {\n font-size: var(--nano-font-size-small);\n line-height: var(--nano-line-height-normal);\n font-weight: var(--nano-font-weight-bold);\n color: var(--tint-color);\n}\n\n.alert__title {\n font-weight: var(--nano-font-weight-normal);\n font-size: var(--nano-font-size-medium);\n line-height: var(--nano-line-height-dense);\n}\n\n.alert__close {\n --color: var(--close-button-color);\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n font-size: 1.1em;\n padding-inline: 0 var(--nano-spacing-md);\n padding-block: 0;\n}\n\n.alert__overlay {\n position: fixed;\n inset: 0;\n background-color: var(--scrim-color);\n opacity: 0;\n transition: var(--nano-transition-fast) opacity;\n z-index: var(--nano-z-index-alert);\n pointer-events: all;\n}\n.alert__overlay--open {\n opacity: 1;\n}\n\n.alert__icon {\n flex: 0 0 auto;\n display: flex;\n align-items: start;\n font-size: var(--icon-size);\n padding-block: var(--nano-spacing-md);\n}\n.alert__icon ::slotted(*), .alert__icon::slotted(*) {\n color: var(--tint-color);\n margin-inline-start: var(--nano-spacing-md);\n}\n@container (width < 280px) {\n .alert__icon {\n display: none !important;\n }\n}\n\n.alert__countdown {\n position: absolute;\n inset-block-end: 0;\n inset-inline-start: 0;\n inline-size: 100%;\n block-size: 4px;\n background-color: var(--nano-layer-border-color);\n display: flex;\n justify-content: flex-end;\n}\n\n.alert__countdown .alert__countdown-elapsed {\n block-size: 100%;\n inline-size: 0;\n}\n\n.alert__timer {\n clip-path: inset(50%);\n block-size: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n inline-size: 1px;\n}\n\n.alert__countdown-elapsed {\n background-color: var(--tint-color);\n}";export{v as nano_alert}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{r as t,c as e,
|
4
|
+
import{r as t,c as e,g as i,d as s,a as h}from"./index-CX_Hk6ss.js";import{C as o}from"./component-store-DMqr8_D3.js";import{h as n}from"./renderer-ZmozgREV.js";import{W as a}from"./algolia-data-B1lm-wYl.js";import"./throttle-C93FMm2Z.js";const r=class{constructor(i){t(this,i),this.nanoFilterChanged=e(this,"nanoFilterChanged",7),this.nanoTplUpdated=e(this,"nanoTplUpdated",7)}get el(){return i(this)}templateStr;templateSlot;outputSlot;outputEle;filterId=null;tplDidRnder;tplWillRnder=new Promise((t=>{this.tplDidRnder=t}));changeEvent;internalValue=[void 0];showFilter=!1;indexResults=null;filterChanged=null;facets;tplRenderFn;globalStoreMethod;filterName=null;value="";operator="or";storeId;storeMethod="session";nanoFilterChanged;nanoTplUpdated;valueSet(){const t=this.value;let e;if(e="string"==typeof t?t.length?t.split("|"):[]:this.value,this.didValueChange(e)){const t=this.setFieldValues(e);t&&t.length?this.internalValue=e:this.tplWillRnder.then((()=>{this.setFieldValues(e),this.internalValue=e}))}}valueChanged(){this.value=this.internalValue,this.nanoFilterChanged.emit({filterId:this.filterId,facetName:this.filterName,value:this.internalValue,operator:this.operator})}appliedFilterChanged(){this.filterName&&this.filterChanged&&(this.filterChanged!==this.filterId||"and"===this.operator)&&this.updateContent()}tplUpdate(){this.updateContent()}handleFilterChange(){if(this.indexResults&&this.indexResults.appliedFilters){const t=this.indexResults.appliedFilters.find((t=>t.name===this.filterName));if(!t)return;this.tplWillRnder.then((()=>{const e=this.setFieldValues(t.values);e&&e.length&&(this.value=e)}))}this.updateContent()}handleChangeEvent(){const t=this.getFieldValues();return!!this.didValueChange(t)&&(this.internalValue=t,!0)}updateContent(){const t=this.outputSlot||this.outputEle;this.el&&(this.templateStr?this.filterName&&t&&(!this.templateStr||this.indexResults&&this.indexResults.origFilters[this.filterName])||(this.showFilter=!1):this.showFilter=!0,t&&(this.indexResults?s((()=>{t.innerHTML=this.tplRenderFn(this.templateStr,{orig:{...this.indexResults.origFilters[this.filterName]},dyn:{...this.indexResults.dynFilters[this.filterName]},selected:this.internalValue&&this.internalValue.length?this.internalValue:this.value}),this.tplDidRnder(),this.setFieldValues(),this.showFilter||(this.showFilter=!0),this.nanoTplUpdated.emit(this.el)})):this.templateStr?s((()=>{t.innerHTML=this.tplRenderFn(this.templateStr,{orig:{},dyn:{},selected:this.internalValue&&this.internalValue.length?this.internalValue:this.value}),this.value&&this.value.length||this.handleChangeEvent()})):this.value&&this.value.length||this.handleChangeEvent()))}getFieldValues(){const t=[],e=this.outputSlot.querySelectorAll('input[type="checkbox"], input[type="radio"], select');for(let i=0;i<e.length;i++){const s=e[i];if("select-multiple"===s.type){const e=s;for(let i=0;i<e.options.length;i++)e.options[i].selected&&e.options[i].value.length&&t.push(e.options[i].value)}else("checkbox"!==s.type&&"radio"!==s.type||s.checked&&s.value.length)&&t.push(s.value)}return t}setFieldValues(t){if(!(t=t||this.internalValue))return;const e=[],i=this.outputSlot.querySelectorAll('input[type="checkbox"], input[type="radio"], select, nano-select, nano-checkbox');for(let s=0;s<i.length;s++){const h=i[s];if(!h.disabled&&"file"!==h.type&&"reset"!==h.type&&"submit"!==h.type&&"button"!==h.type)if("select-multiple"===h.type||"select-one"===h.type){const i=h;for(let s=0;s<i.options.length;s++)t.includes(i.options[s].value)?(e.push(i.value),i.options[s].selected=!0,"select-one"===h.type&&(i.value=i.options[s].value)):i.options[s].selected=!1}else["checkbox","radio","tag","segment","segment-pill"].includes(h.type)&&(t.includes(h.value)?(e.push(h.value),h.checked=!0):h.checked=!t.length&&!h.value.length)}return e}didValueChange(t){if(this.internalValue&&!t)return!0;if(!this.internalValue&&!t)return!1;if(this.internalValue&&t.length!==this.internalValue.length)return!0;let e=!1;for(let i=0;i<t.length;i++)e||this.internalValue&&this.internalValue.includes(t[i])||(e=!0);return e}connectedCallback(){this.templateSlot=this.el.querySelector('[slot="filter-template"]'),this.outputSlot=this.el.querySelector('[slot="output"]'),this.filterId=this.filterName+"_"+l++,this.templateSlot&&(this.templateStr=this.templateSlot.innerHTML,this.templateStr=this.templateStr.replace(/=>/gm,"=>"))}componentWillLoad(){this.storeId&&o.init(this,["value"],this.storeMethod||this.globalStoreMethod,this.storeId)}componentDidLoad(){this.updateContent(),this.templateStr&&this.filterName&&this.indexResults&&this.indexResults.origFilters[this.filterName]&&(this.showFilter=!0)}render(){return n(h,{key:"c1d229a764c08c92c4f25093d98bf51e1b4f6bcf",class:{"show-filter":this.showFilter,"nano-filter":!0}},n("div",{key:"21f66d2dcd03e19aa46face1220459dce136ccd1",ref:t=>this.outputEle=t},n("slot",{key:"3ec8e00ee477c651e48e96db7888f0a751573a3e",name:"output"})))}static get watchers(){return{value:["valueSet"],internalValue:["valueChanged"],facets:["appliedFilterChanged"],tplRenderFn:["tplUpdate"],indexResults:["handleFilterChange"]}}};a(r,["globalStoreMethod","indexResults","filterChanged","facets","tplRenderFn","changeEvent"]);let l=0;r.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{display:none}:host ::slotted([slot=filter-template]){display:none !important}:host(.show-filter){display:block}";export{r as nano_algolia_filter}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{r as t,c as e,
|
4
|
+
import{r as t,c as e,g as n,h as a,a as s}from"./index-CX_Hk6ss.js";import{W as i}from"./algolia-data-B1lm-wYl.js";const o=class{constructor(n){t(this,n),this.nanoPageChanged=e(this,"nanoPageChanged",7)}get el(){return n(this)}outputEle;outputSlot;outputTo;templateStr;templateSlot;currentPage=null;canGoPrev=!1;canGoNext=!1;show=!0;tplRenderFn;indexResults=null;infiniteScroll=!1;maxToShow=null;nanoPageChanged;currentPageChange(){}infiniteScrollChange(){this.show=!this.infiniteScroll}async nextPage(){}async prevPage(){}async goToPage(t){console.info(t)}updateContent(){this.outputTo=this.outputSlot||this.outputEle,this.templateStr&&this.outputTo&&this.indexResults||(this.show=!1)}componentWillLoad(){this.templateSlot=this.el.querySelector('[slot="filter-template"]'),this.outputSlot=this.el.querySelector('[slot="output"]'),this.templateSlot&&(this.templateStr=this.templateSlot.innerHTML)}componentDidLoad(){this.updateContent()}render(){return a(s,{key:"488332e371953208f90e754ebdceff321795177c",class:{"show-pagination":this.show}},a("div",{key:"9f24519df07b4f022297a5e6f1ace601efc71e2b",ref:t=>this.outputEle=t},a("slot",{key:"363d87eb251ba2db6e6c3346e32f5dcb8b8d3a0c",name:"output"})))}static get watchers(){return{currentPage:["currentPageChange"],infiniteScroll:["infiniteScrollChange"]}}};i(o,["indexResults","filterChanged","tplRenderFn"]);export{o as nano_algolia_pagination}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{r as t,c as s,
|
4
|
+
import{r as t,c as s,g as e,e as i,a as h}from"./index-CX_Hk6ss.js";import{h as a}from"./renderer-ZmozgREV.js";import{W as n,S as l}from"./algolia-data-B1lm-wYl.js";const d=class{constructor(e){t(this,e),this.nanoPageChanged=s(this,"nanoPageChanged",7),this.nanoTplUpdated=s(this,"nanoTplUpdated",7)}get el(){return e(this)}resultTpl;resultTplSlot;startTpl;startTplSlot;endTpl;endTplSlot;outputSlot;outputEle;outputTo;startOutputSlot;endOutputSlot;io;infiniteScrollBar;append=!1;shouldClear=!0;currHitNum=0;showResults=!1;tplRenderFn;results=null;indexResults=null;resultsPage=0;changeEvent=l.Init;facets;isLoading=!0;infiniteScroll=!1;appendPages=!1;nanoPageChanged;nanoTplUpdated;addContentIndex(){this.shouldPageClear(),(this.shouldClear||0===this.resultsPage)&&(this.currHitNum=0),this.indexResults&&this.indexResults.results&&this.indexResults.results.map((t=>{t._uIndex=this.currHitNum++}))}resultsChange(){this.shouldPageClear(),this.updateResultContent(),this.infiniteScrollChange()}headerFooterChange(){this.updateStartEndContent()}appendChange(){this.append=!!this.infiniteScroll||this.appendPages}infiniteScrollChange(){this.append=!!this.infiniteScroll||this.appendPages,this.infiniteScroll?this.attachIO():this.detachIO()}handlePageChage(){this.infiniteScroll?this.attachIO():this.detachIO()}handleLoading(){this.isLoading||this.infiniteScrollChange()}shouldPageClear(){this.shouldClear=this.changeEvent!==l.Page||!this.append}nextPage(){this.shouldClear=!this.append,this.nanoPageChanged.emit({page:this.resultsPage+1})}attachIO(){this.infiniteScrollBar&&this.infiniteScroll&&!this.io&&"undefined"!=typeof window&&window.IntersectionObserver&&(this.io=new window.IntersectionObserver((async t=>{(t[0].isIntersecting||t[1]&&t[1].isIntersecting)&&(this.nextPage(),this.detachIO())}),{document,rootMargin:"100px",threshold:1}),this.io.observe(this.infiniteScrollBar))}detachIO(){this.io&&(this.io.disconnect(),this.io=null)}updateStartEndContent(){this.startTpl&&this.startOutputSlot&&(this.startOutputSlot.innerHTML=this.tplRenderFn(this.startTpl,this.indexResults)),this.endOutputSlot&&this.endTpl&&(this.endOutputSlot.innerHTML=this.tplRenderFn(this.endTpl,this.indexResults)),this.nanoTplUpdated.emit(this.el)}updateResultContent(){if(this.outputTo=this.outputSlot||this.outputEle,!this.resultTpl||!this.indexResults)return;if(this.shouldClear&&(this.outputTo.innerHTML=""),!this.tplRenderFn)return;const t=document.createElement("div");t.innerHTML=this.tplRenderFn(this.resultTpl,this.indexResults),Array.from(t.children).forEach((t=>{this.outputTo.appendChild(t)})),this.shouldClear=!0,this.nanoTplUpdated.emit(this.el)}connectedCallback(){i((()=>{this.startTplSlot=this.el.querySelector('[slot="start-template"]'),this.startOutputSlot=this.el.querySelector('[slot="start-output"]'),this.startTplSlot&&(this.startTpl=this.startTplSlot.innerHTML,this.startTpl=this.startTpl.replace(/=>/gm,"=>")),this.resultTplSlot=this.el.querySelector('[slot="result-template"]'),this.outputSlot=this.el.querySelector('[slot="result-output"]'),this.resultTplSlot&&(this.resultTpl=this.resultTplSlot.innerHTML,this.resultTpl=this.resultTpl.replace(/=>/gm,"=>")),this.endTplSlot=this.el.querySelector('[slot="end-template"]'),this.endOutputSlot=this.el.querySelector('[slot="end-output"]'),this.endTplSlot&&(this.endTpl=this.endTplSlot.innerHTML,this.endTpl=this.endTpl.replace(/=>/gm,"=>")),this.indexResults&&(this.addContentIndex(),this.updateResultContent())}))}componentDidLoad(){this.updateStartEndContent()}disconnectedCallback(){this.io&&(this.io.disconnect(),this.io=void 0)}render(){return a(h,{key:"14939adaa742d13214faf5375692737010467a7c",class:{"show-results":this.showResults,"nano-results":!0}},a("div",{key:"8153995d81af56df593694ca7902e93f6efb0565",class:"default"},a("slot",{key:"60e2c4a10cdf5f6fbd609972114be5d04ccfe3f0"})),a("div",{key:"cf589b852a52ffc84b8d9dd48c193603e733f02e",ref:t=>this.outputEle=t},a("slot",{key:"aad8bfb81edca4af57503bc80b4eac5cbe69a97e",name:"start-output"}),a("slot",{key:"30e848bcf8b1d0f03d57b65cb805abcca87aefd5",name:"result-output"}),a("div",{key:"8663b935facbe62a5b30d4e6446cc978083369d7",ref:t=>this.infiniteScrollBar=t}),a("slot",{key:"b8652a198cd7fefe5a127b8bc9387305971be922",name:"end-output"})))}static get watchers(){return{results:["addContentIndex","resultsChange"],tplRenderFn:["resultsChange"],facets:["headerFooterChange"],appendPages:["appendChange"],infiniteScroll:["infiniteScrollChange"],resultsPage:["handlePageChage"],isLoading:["handleLoading"]}}};n(d,["indexResults","results","tplRenderFn","resultsPage","changeEvent","facets","isLoading"]);export{d as nano_algolia_results}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{j as t,a as e,r as i,c as s,e as n,f as o,d as r}from"./index-DXvE-U_j.js";import{a}from"./algoliasearch-lite.esm.browser-C1SNUAIj.js";import{g as h}from"./dom-Cb7FUtXp.js";import{C as l}from"./component-store-CH5BI3Tg.js";import{d as c}from"./throttle-C93FMm2Z.js";import{t as u,h as f}from"./renderer-BUaAsDso.js";import{S as d}from"./algolia-data-D6wnbV__.js";var p=new Map,m=function(t,e){var i=t.updater;t.fields.forEach((function(t){i(t,e[t])}))},g=function(e,i){var s=e.state,n=t();if(p.has(n)){var o=p.get(n);o.state=s,o.wormholes.forEach((function(t){m(t,s)}))}return i};class y{queue=[];workingOnPromise=!1;static pendingPromise=!1;stop=!1;limit=null;enqueue(t){return new Promise(((e,i)=>{this.queue.push({promise:t,resolve:e,reject:i}),this.dequeue()}))}dequeue(){if(this.workingOnPromise)return!1;if(this.stop)return this.queue=[],void(this.stop=!1);const t=this.queue.shift();if(!t)return!1;try{this.workingOnPromise=!0,t.promise().then((e=>{this.workingOnPromise=!1,t.resolve(e),this.dequeue()})).catch((e=>{this.workingOnPromise=!1,t.reject(e),this.dequeue()}))}catch(e){this.workingOnPromise=!1,t.reject(e),this.dequeue()}return!0}}function b(t){const e=new Error(t);var i,s;return i=e,s=b.prototype,Object.setPrototypeOf?Object.setPrototypeOf(i,s):i.__proto__=s,e}function w(t,e,i){const s=e.slice(0,i).split(/\n/),n=s.length,o=s[n-1].length+1;throw b(t+=" at line "+n+" col "+o+":\n\n "+e.split(/\n/)[n-1]+"\n "+Array(o).join(" ")+"^")}b.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});const v=new Function("return this")().Promise;let x=!1;try{x=new Function("return (async function(){}).constructor")()}catch(t){if(!(t instanceof SyntaxError))throw t}function F(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function C(t,e,i){for(const s in e)F(e,s)&&(t[s]=null==e[s]||"object"!=typeof e[s]||"storage"!==s&&"prefixes"!==s||i?e[s]:C({},e[s]));return t}const I=/^async +/,k=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,S=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,R=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g,j=/[.*+\-?^${}()|[\]\\]/g;function _(t){return j.test(t)?t.replace(j,"\\$&"):t}function A(t,e){e.rmWhitespace&&(t=t.replace(/[\r\n]+/g,"\n").replace(/^\s+|\s+$/gm,"")),k.lastIndex=0,S.lastIndex=0,R.lastIndex=0;const i=e.prefixes,s=[i.h,i.b,i.i,i.r,i.c,i.e].reduce((function(t,e){return t&&e?t+"|"+_(e):e?_(e):t}),""),n=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+_(e.tags[1])+")","g"),o=new RegExp("([^]*?)"+_(e.tags[0])+"(-|_)?\\s*("+s+")?\\s*","g");let r=0,a=!1;function h(i,s){const h={f:[]};let l,c=0,u="c";function f(i){const s=t.slice(r,i);let n=s.trim();if("f"===u)"safe"===n?h.raw=!0:e.async&&I.test(n)?(n=n.replace(I,""),h.f.push([n,"",!0])):h.f.push([n,""]);else if("fp"===u)h.f[h.f.length-1][1]+=n;else if("err"===u){if(n){const e=s.search(/\S/);w("invalid syntax",t,r+e)}}else h[u]=n;r=i+1}for("h"===s||"b"===s||"c"===s?u="n":"r"===s&&(h.raw=!0,s="i"),n.lastIndex=r;null!==(l=n.exec(t));){const e=l[1],i=l[2],d=l[3],p=l[4],m=l[5],g=l.index;if(e)"("===e?(0===c&&("n"===u?(f(g),u="p"):"f"===u&&(f(g),u="fp")),c++):")"===e?(c--,0===c&&"c"!==u&&(f(g),u="err")):0===c&&"|"===e?(f(g),u="f"):"=>"===e&&(f(g),r+=1,u="res");else if(i)if("/*"===i){const e=t.indexOf("*/",n.lastIndex);-1===e&&w("unclosed comment",t,l.index),n.lastIndex=e+2}else"'"===i?(S.lastIndex=l.index,S.exec(t)?n.lastIndex=S.lastIndex:w("unclosed string",t,l.index)):'"'===i?(R.lastIndex=l.index,R.exec(t)?n.lastIndex=R.lastIndex:w("unclosed string",t,l.index)):"`"===i&&(k.lastIndex=l.index,k.exec(t)?n.lastIndex=k.lastIndex:w("unclosed string",t,l.index));else if(d)return f(g),r=g+l[0].length,o.lastIndex=r,a=m,p&&"h"===s&&(s="s"),h.t=s,h}return w("unclosed tag",t,i),h}const l=function s(n,l){n.b=[],n.d=[];let c,u=!1,f=[];function d(t,i){t&&(t=function(t,e,i,s){let n,o;return"string"==typeof e.autoTrim?n=o=e.autoTrim:Array.isArray(e.autoTrim)&&(n=e.autoTrim[1],o=e.autoTrim[0]),(i||!1===i)&&(n=i),(s||!1===s)&&(o=s),"slurp"===n&&"slurp"===o?t.trim():("_"===n||"slurp"===n?t=String.prototype.trimLeft?t.trimLeft():t.replace(/^[\s\uFEFF\xA0]+/,""):"-"!==n&&"nl"!==n||(t=t.replace(/^(?:\n|\r|\r\n)/,"")),"_"===o||"slurp"===o?t=String.prototype.trimRight?t.trimRight():t.replace(/[\s\uFEFF\xA0]+$/,""):"-"!==o&&"nl"!==o||(t=t.replace(/(?:\n|\r|\r\n)$/,"")),t)}(t,e,a,i),t&&(t=t.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),f.push(t)))}for(;null!==(c=o.exec(t));){const o=c[1],a=c[2],l=c[3]||"";let p;for(const t in i)if(i[t]===l){p=t;break}d(o,a),r=c.index+c[0].length,p||w("unrecognized tag type: "+l,t,r);let m=h(c.index,p);const g=m.t;if("h"===g){const t=m.n||"";e.async&&I.test(t)&&(m.a=!0,m.n=t.replace(I,"")),m=s(m),f.push(m)}else if("c"===g){if(n.n===m.n)return u?(u.d=f,n.b.push(u)):n.d=f,n;w("Helper start and end don't match",t,c.index+c[0].length)}else if("b"===g){u?(u.d=f,n.b.push(u)):n.d=f;const t=m.n||"";e.async&&I.test(t)&&(m.a=!0,m.n=t.replace(I,"")),u=m,f=[]}else if("s"===g){const t=m.n||"";e.async&&I.test(t)&&(m.a=!0,m.n=t.replace(I,"")),f.push(m)}else f.push(m)}if(!l)throw b('unclosed helper "'+n.n+'"');return d(t.slice(r,t.length),!1),n.d=f,n}({f:[]},!0);if(e.plugins)for(let t=0;t<e.plugins.length;t++){const i=e.plugins[t];i.processAST&&(l.d=i.processAST(l.d,e))}return l.d}function z(t,e){const i=A(t,e);let s="var tR='';"+(e.useWith?"with("+e.varName+"||{}){":"")+q(i,e)+"if(cb){cb(null,tR)} return tR"+(e.useWith?"}":"");if(e.plugins)for(let t=0;t<e.plugins.length;t++){const i=e.plugins[t];i.processFnString&&(s=i.processFnString(s,e))}return s}function P(t,e){for(let i=0;i<e.length;i++){const s=e[i][1];t=(e[i][2]?"await ":"")+"c.l('F','"+e[i][0]+"')("+t,s&&(t+=","+s),t+=")"}return t}function T(t,e,i,s,n,o){let r="{exec:"+(n?"async ":"")+O(i,e,t)+",params:["+s+"]";return o&&(r+=",name:'"+o+"'"),n&&(r+=",async:true"),r+="}",r}function E(t,e){let i="[";for(let s=0;s<t.length;s++){const n=t[s];i+=T(e,n.res||"",n.d,n.p||"",n.a,n.n),s<t.length&&(i+=",")}return i+="]",i}function O(t,e,i){return"function("+e+"){var tR='';"+q(t,i)+"return tR}"}function q(t,e){let i=0;const s=t.length;let n="";for(;i<s;i++){const s=t[i];if("string"==typeof s)n+="tR+='"+s+"';";else{const t=s.t;let i=s.c||"";const o=s.f,r=s.n||"",a=s.p||"",h=s.res||"",l=s.b,c=!!s.a;if("i"===t){e.defaultFilter&&(i="c.l('F','"+e.defaultFilter+"')("+i+")");let t=P(i,o);!s.raw&&e.autoEscape&&(t="c.l('F','e')("+t+")"),n+="tR+="+t+";"}else if("h"===t)if(e.storage.nativeHelpers.get(r))n+=e.storage.nativeHelpers.get(r)(s,e);else{let t=(c?"await ":"")+"c.l('H','"+r+"')("+T(e,h,s.d,a,c);t+=l?","+E(l,e):",[]",t+=",c)",n+="tR+="+P(t,o)+";"}else"s"===t?n+="tR+="+P((c?"await ":"")+"c.l('H','"+r+"')({params:["+a+"]},[],c)",o)+";":"e"===t&&(n+=i+"\n")}}return n}class D{cache;constructor(t){this.cache=t}define(t,e){this.cache[t]=e}get(t){return this.cache[t]}remove(t){delete this.cache[t]}reset(){this.cache={}}load(t){C(this.cache,t,!0)}}function H(t,e,i,s){if(e&&e.length>0)throw b((s?"Native":"")+"Helper '"+t+"' doesn't accept blocks");if(i&&i.length>0)throw b((s?"Native":"")+"Helper '"+t+"' doesn't accept filters")}function N(t,e,i,s,n){i(t[e],e).then((function(o){s+=o,e===t.length-1?n(s):N(t,e+1,i,s,n)}))}function $(t,e,i,s,n,o){s(e[i],t[e[i]]).then((function(r){n+=r,i===e.length-1?o(n):$(t,e,i+1,s,n,o)}))}const L={"&":"&","<":"<",">":">",'"':""","'":"'"};function M(t){return L[t]}const U=new D({}),B=new D({each:function(t,e){let i="";const s=t.params[0];if(H("each",e,!1),t.async)return new Promise((function(e){N(s,0,t.exec,i,e)}));for(let e=0;e<s.length;e++)i+=t.exec(s[e],e);return i},foreach:function(t,e){const i=t.params[0];if(H("foreach",e,!1),t.async)return new Promise((function(e){$(i,Object.keys(i),0,t.exec,"",e)}));{let e="";for(const s in i)F(i,s)&&(e+=t.exec(s,i[s]));return e}},include:function(t,e,i){H("include",e,!1);const s=i.storage.templates.get(t.params[0]);if(!s)throw b('Could not fetch template "'+t.params[0]+'"');return s(t.params[1],i)},extends:function(t,e,i){const s=t.params[1]||{};s.content=t.exec();for(let t=0;t<e.length;t++){const i=e[t];s[i.name]=i.exec()}const n=i.storage.templates.get(t.params[0]);if(!n)throw b('Could not fetch template "'+t.params[0]+'"');return n(s,i)},useScope:function(t,e){return H("useScope",e,!1),t.exec(t.params[0])}}),Q=new D({if:function(t,e){H("if",!1,t.f,!0);let i="if("+t.p+"){"+q(t.d,e)+"}";if(t.b)for(let s=0;s<t.b.length;s++){const n=t.b[s];"else"===n.n?i+="else{"+q(n.d,e)+"}":"elif"===n.n&&(i+="else if("+n.p+"){"+q(n.d,e)+"}")}return i},try:function(t,e){if(H("try",!1,t.f,!0),!t.b||1!==t.b.length||"catch"!==t.b[0].n)throw b("native helper 'try' only accepts 1 block, 'catch'");let i="try{"+q(t.d,e)+"}";const s=t.b[0];return i+="catch"+(s.res?"("+s.res+")":"")+"{"+q(s.d,e)+"}",i},block:function(t,e){return H("block",t.b,t.f,!0),"if(!"+e.varName+"["+t.p+"]){tR+=("+O(t.d,"",e)+")()}else{tR+="+e.varName+"["+t.p+"]}"}}),W=new D({e:function(t){const e=String(t);return/[&<>"']/.test(e)?e.replace(/[&<>"']/g,M):e}}),K={varName:"it",autoTrim:[!1,"nl"],autoEscape:!0,defaultFilter:!1,tags:["{{","}}"],l:function(t,e){if("H"===t){const t=this.storage.helpers.get(e);if(t)return t;throw b("Can't find helper '"+e+"'")}if("F"===t){const t=this.storage.filters.get(e);if(t)return t;throw b("Can't find filter '"+e+"'")}},async:!1,storage:{helpers:B,nativeHelpers:Q,filters:W,templates:U},prefixes:{h:"@",b:"#",i:"",r:"*",c:"/",e:"!"},cache:!1,plugins:[],useWith:!1};function X(t,e){const i={};return C(i,K),e&&C(i,e),t&&C(i,t),i.l.bind(i),i}function G(t,e){const i=X(e||{});let s=Function;if(i.async){if(!x)throw b("This environment doesn't support async/await");s=x}try{return new s(i.varName,"c","cb",z(t,i))}catch(e){throw e instanceof SyntaxError?b("Bad template syntax\n\n"+e.message+"\n"+Array(e.message.length+1).join("=")+"\n"+z(t,i)):e}}function V(t,e){let i;return e.cache&&e.name&&e.storage.templates.get(e.name)?e.storage.templates.get(e.name):(i="function"==typeof t?t:G(t,e),e.cache&&e.name&&e.storage.templates.define(e.name,i),i)}K.l.bind(K);var Z=Object.freeze({__proto__:null,compile:G,compileScope:q,compileScopeIntoFunction:O,compileToString:z,defaultConfig:K,filters:W,getConfig:X,helpers:B,nativeHelpers:Q,parse:A,render:function(t,e,i,s){const n=X(i||{});if(!n.async)return V(t,n)(e,n);{let i;if(!s){if("function"==typeof v)return new v((function(s,o){try{i=V(t,n)(e,n),s(i)}catch(t){o(t)}}));throw b("Please provide a callback function, this env doesn't support Promises")}try{V(t,n)(e,n,s)}catch(t){return s(t)}}},templates:U});W.define("date_long",((t,e={year:"numeric",month:"long",day:"numeric"})=>{if(t)return new Date(1e3*parseInt(t)).toLocaleDateString("en-GB",e)})),W.define("date_short",((t,e="d/m/y")=>{if(!t)return;const i=new Date(1e3*parseInt(t));return(t=(t=e.replace(/(d)/,i.getDate().toString())).replace(/(m)/,(i.getMonth()+1).toString())).replace(/(y)/,i.getFullYear().toString())})),W.define("public_name",(t=>{if(t)return(t=t.split("_").map((t=>t.length<3?t.toUpperCase():t)).join(" ")).charAt(0).toUpperCase()+t.slice(1)})),W.define("trim_to",((t,e=100)=>{if(t)return t.length<=e?t:t.substr(0,e)+"..."})),W.define("classname",(t=>{if(t)return t.replace(/[\W]+/g,"")})),W.define("abs_url",((t,e=null,i)=>{if(!e)return t;if(!t)return;let s;if(e.domains&&i&&i.origin){const t=e.domains.find((t=>t.origin===i.origin));s=t?t.domain:""}else e.domain&&(s=e.domain);return t.match(/^http/)||!s?t:(t.startsWith("/")||(t="/"+t),location.protocol+"//"+s+t)})),W.define("replace",((t,e,i)=>t.replace(e,i))),W.define("remove_spaces",(t=>t.replace(/ /g,"_"))),W.define("add_spaces",(t=>t.replace(/[_\-]/g," "))),W.define("capitalise",(t=>t.charAt(0).toUpperCase()+t.slice(1))),W.define("lowercase",(t=>t.toLowerCase()));const J=Z,Y=class{constructor(t){i(this,t),this.nanoDidLoad=s(this,"nanoDidLoad",7),this.nanoResultsShown=s(this,"nanoResultsShown",3),this.nanoBeforeQuery=s(this,"nanoBeforeQuery",7),this.nanoAfterQuery=s(this,"nanoAfterQuery",7),this.nanoNewResults=s(this,"nanoNewResults",7)}staticFacetFilters={};dynFacetFilters={};tplSlot;outputSlot;slottedInput;hasLoadSlot=!1;resultsDiv;defaultDiv;tpl;facets;placedAlgoliaEles=[];algoliaClient;promiseQueue=new y;get host(){return e(this)}_dynFacetFilters={};inputField;algoliaIndex;indeces=[];indexResults;filterChanged="";currentHits;changeEvent=d.Init;isLoading=!1;wormholeState=this;showResults=!1;resultsPage=0;appId;apiKey;searchIndex={};searchIndexName="";listenTo=null;handleListenToChange(){if(!this.listenTo)return;const t=document.querySelector(this.listenTo);["nano-input","input"].includes(t.tagName.toLocaleLowerCase())&&(this.inputField=t)}query="";operator="and";filters=[];tplRenderFn=J.render;replicaIndex="";browseIndex=!1;minChars=2;storeId;storeMethod="session";nanoDidLoad;nanoResultsShown;nanoBeforeQuery;nanoAfterQuery;nanoNewResults;async removeFilters(t,e){t||e?Object.keys(this._dynFacetFilters).forEach((i=>{t&&this._dynFacetFilters[i].facetName===t&&(this._dynFacetFilters[i].element.value=e?this._dynFacetFilters[i].value.filter((t=>t!==e)):"")})):this.clearAllFacetFilters()}onAllTplUpdate(t){t.stopPropagation(),t.target.tagName.toLowerCase()===u("nano-algolia-results")&&requestAnimationFrame((()=>{this.nanoNewResults.emit(this.indexResults)}))}async onPageChange(t){if(!this.indexResults)return;let e=this.resultsPage;t&&(t.stopPropagation(),e=t.detail.page),e=Math.min(this.indexResults.totalPages-1,e),e=Math.max(e,0),this.indexResults.currentPage!==e&&(this.indexResults.currentPage=e,await this.algoliaSearch(d.Page))}async onFilterChange(t){t.stopPropagation();const e={},i=t.detail;i.element=t.target,this.indexResults?(this.staticFacetFilters[i.filterId]?this.staticFacetFilters[i.filterId]=i:(e[i.filterId]=i,this._dynFacetFilters={...this._dynFacetFilters,...e}),this.indexResults.appliedFilters=this.makeAppliedFilters()):this.staticFacetFilters[i.filterId]=i,this.filterChanged=i.value&&i.value.length?i.filterId:"all",this.resetPage(),this.algoliaSearch(d.Filter)}dynFacetFiltersChange(){Object.values(this._dynFacetFilters).forEach((t=>{this.host.ownerDocument===t.element.ownerDocument?this.dynFacetFilters[t.filterId]=t:delete this.dynFacetFilters[t.filterId]}))}browseIndexChange(){this.browseIndex&&(!this.query||this.query.length<this.minChars)&&(this.query="*")}inputFieldSet(){this.inputField&&"*"!==this.query&&this.inputField&&this.inputField.value!==this.query&&(this.inputField.value=this.query)}queryChange(){this.searchChange()}searchChange=async()=>{if(this.algoliaIndex){if(!this.query||this.query.length<this.minChars){if(!this.browseIndex)return this.query&&0!==this.query.length?void 0:void this.handleSearchReset();if("*"!==this.query)return void(this.query="*")}this.isLoading=!0,setTimeout((async()=>{this.resetPage(),await this.algoliaSearch(d.Init),await this.updateContent(),setTimeout((()=>this.isLoading=!1),800),this.showResults=!0,this.nanoResultsShown.emit({meta:this.indexResults,client:{appId:this.appId,apiKey:this.apiKey}})}),200)}};async internalIndexSwitch(){this.replicaIndex&&this.indexResults&&this.indexResults.index!==this.replicaIndex&&(this.indexResults.index=this.replicaIndex,this.algoliaIndex=this.algoliaClient.initIndex(this.indexResults.index),this.resetPage(),this.algoliaSearch(d.Replica))}pageChange(){this.onPageChange()}searchIndexNameChange(){!this.searchIndexName||!this.searchIndexName.length||this.searchIndex&&this.searchIndex.index===this.searchIndexName||(this.searchIndex={index:this.searchIndexName})}initAlgoliaClient(){this.appId&&this.apiKey&&(this.algoliaClient=a(this.appId,this.apiKey))}initAlgoliaIndex(){this.algoliaClient&&this.searchIndex&&this.searchIndex.index&&(this.searchIndex.hitsPerPage||(this.searchIndex.hitsPerPage=100),this.replicaIndex&&(this.searchIndex.index=this.replicaIndex),this.searchIndexName=this.searchIndex.index,this.algoliaIndex=this.algoliaClient.initIndex(this.searchIndex.index),this.searchChange())}showResultsChange(){this.resultsDiv&&this.defaultDiv&&(this.showResults?(this.resultsDiv.style.width=this.host.scrollWidth+"px",this.resultsDiv.style.minHeight=this.host.scrollHeight+"px",n((()=>{this.resultsDiv.addEventListener("transitionend",this.onResultDisplay),this.resultsDiv.style.display="block",setTimeout((()=>this.resultsDiv.classList.add("show")),50)}))):n((()=>{this.resultsDiv.classList.remove("shown"),this.defaultDiv.style.display="block",setTimeout((()=>{this.resultsDiv.addEventListener("transitionend",this.onResultDisplay),this.resultsDiv.classList.remove("show"),this.slottedInput?this.slottedInput.focus({preventScroll:!0}):this.defaultDiv.focus({preventScroll:!0})}),50)})))}handleFilterpropChange(){this.algoliaSearch(d.Init)}fixDomain(t){return this.searchIndex&&this.searchIndex.domain?(t.hits.map((t=>{t.url&&!t.url.match(/^http/)&&(t.url=location.protocol+"//"+this.searchIndex.domain+t.url)})),t):t}makeAppliedFilters=()=>{const t=[],e=e=>{Object.values(e).forEach((e=>{if(e.value&&e.value.length){const i=t.find((t=>t.name===e.facetName));i?i.values=[...i.values,...e.value]:t.push({name:e.facetName,values:[...e.value]})}}))};return e(this.dynFacetFilters),e(this.staticFacetFilters),t.length?t:null};algoliaSearch=async t=>this.promiseQueue.enqueue((()=>this.queueSearch(t)));queueSearch=async t=>{if(!(this.algoliaIndex&&this.query&&this.searchIndex&&this.searchIndex.index))return;this.nanoBeforeQuery.emit(this.indexResults),d.Init===t&&this.clearAllFacetFilters();const e={filters:this.algoliaFilterStr(),page:this.indexResults?this.indexResults.currentPage:0,clickAnalytics:!0};this.searchIndex.filters&&(e.facets=this.searchIndex.filters),this.searchIndex.hitsPerPage&&(e.hitsPerPage=this.searchIndex.hitsPerPage);let i=await this.algoliaIndex.search(this.query,e);return i=this.fixDomain(i),this.changeEvent=t,t!==d.Init&&this.indexResults||(this.indexResults={queryID:i.queryID,currentPage:0,totalHits:i.nbHits,hitsPerPage:null,origFilters:i.facets,query:this.query,domain:this.searchIndex.domain||null,totalHitsWithFilters:0,results:[],totalPages:0,appliedFilters:this.makeAppliedFilters(),indexName:this.searchIndex.name||null,index:this.searchIndex.index,searchIndex:this.searchIndex}),this.indexResults.dynFilters=i.facets,this.indexResults.results=i.hits,this.indexResults.totalHitsWithFilters=i.nbHits,this.indexResults.currentPage=i.page,this.indexResults.totalPages=i.nbPages,this.indexResults.hitsPerPage=i.hitsPerPage,this.indexResults.query=i.query,this.changeEvent!==d.Page&&this.changeEvent!==d.Replica&&(this.facets=i.facets),this.nanoAfterQuery.emit(this.indexResults),new Promise((t=>{setTimeout((()=>t("tpl updated")),20)})).then((()=>{this.currentHits=this.indexResults.results,this.resultsPage=this.indexResults.currentPage}))};resetPage(){this.indexResults&&(this.indexResults.currentPage=0)}clearAllFacetFilters(){Object.values(this._dynFacetFilters).forEach((t=>{t.element.value=""})),this._dynFacetFilters={}}algoliaFilterStr(){const t={},e=e=>{let i,s;Object.keys(e).forEach((n=>{i=e[n],t[n]=t[n]||{name:i.facetName,or:[],and:[],not:[]},s=t[n][i.operator],i.value&&i.value.length&&(t[n][i.operator]=[...s,...i.value])}))};e(this.dynFacetFilters),e(this.staticFacetFilters);const i=(t,e)=>e.indexOf(" ")>-1?t+':"'+e+'"':t+":"+e;let s,n,o=[];return Object.values(t).forEach((function(t){Object.keys(t).filter((t=>t.match(/(or|and|not)/))).forEach((e=>{s=t,n=t.name,"or"===e||"and"===e?s[e].length&&o.push("( "+s[e].map((t=>{if(t.length)return i(n,t)})).join(" "+e.toLocaleUpperCase()+" ")+" )"):s.not.length&&o.push("( "+s[e].map((t=>{if(t.length)return"NOT "+i(n,t)})).join(" AND ")+" )")}))})),o=[...this.filters,...o],o.join(" "+this.operator.toLocaleUpperCase()+" ")}handleInputChange(t){t.target===this.inputField&&(this.query=this.inputField.value)}handleSearchReset=()=>{this.showResults=!1,this.indexResults=null};onResultDisplay=()=>{n((()=>{this.resultsDiv.removeEventListener("transitionend",this.onResultDisplay),this.showResults?(this.defaultDiv.style.display="none",this.resultsDiv.classList.add("shown"),this.resultsDiv.style.minHeight="",this.resultsDiv.style.width=""):this.resultsDiv.style.display="none"}))};async updateContent(){return this.promiseQueue.enqueue((()=>this.updateContentQueue()))}async updateContentQueue(){const t=this.outputSlot||this.resultsDiv;if(!t||!this.tpl)return"no tpl";const e=document.createElement("div");e.innerHTML=this.tpl;const i=[];return this.placedAlgoliaEles=[],Array.from(e.querySelectorAll(`${u("nano-algolia")}, ${u("nano-algolia-filter")}, ${u("nano-algolia-results")}`)).forEach(((t,e)=>{const s=document.createElement("div");s.dataset.placeholderId=e.toString(),s.classList.add("nano-ele-placeholder"),i.push(t),t.parentNode.replaceChild(s,t)})),t.innerHTML=this.tplRenderFn(e.innerHTML.replace(/>/gm,">").replace(/</gm,"<").replace(/&/gm,"&"),this.indexResults),Array.from(t.querySelectorAll("div.nano-ele-placeholder")).forEach((t=>{t.parentNode.replaceChild(i[parseInt(t.dataset.placeholderId)],t),this.placedAlgoliaEles.push(i[parseInt(t.dataset.placeholderId)])})),this.placedAlgoliaEles.length?new Promise((e=>{const i=s=>{this.placedAlgoliaEles=this.placedAlgoliaEles.filter((t=>t!==s.detail)),this.placedAlgoliaEles.length||(setTimeout((()=>e("tpl updated")),500),t.removeEventListener("nanoTplUpdated",i))};t.addEventListener("nanoTplUpdated",i)})):Promise.resolve("algolia setup")}componentWillLoad(){o((()=>{this.tplSlot=h(this.host,'[slot="template"]')[0],this.outputSlot=h(this.host,'[slot="output"]')[0],this.slottedInput=h(this.host,'[slot="search-input"]')[0],this.hasLoadSlot=!!h(this.host,'[slot="loader"]')[0],this.tplSlot&&(this.tpl=this.tplSlot.innerHTML||this.tplSlot.innerText),this.slottedInput&&(this.slottedInput.tagName.toLocaleLowerCase()===u("nano-input")||this.slottedInput instanceof HTMLInputElement)?this.inputField=this.slottedInput:this.slottedInput?this.inputField=this.slottedInput.querySelector(`${u("nano-input")}, input:not([type="radio"]):not([type="checkbox"])`):this.handleListenToChange(),n((()=>{this.showResults&&this.tpl&&this.searchChange()}))})),this.searchIndexNameChange(),this.initAlgoliaClient(),this.initAlgoliaIndex(),function(t,i){var s=e(t),n=new Map,o={wormholes:n,state:i};p.set(t,o);var r=t.connectedCallback;t.connectedCallback=function(){p.set(t,o),r&&r.call(t)};var a=t.disconnectedCallback;t.disconnectedCallback=function(){p.delete(t),a&&a.call(t)},s.addEventListener("openWormhole",(function(t){t.stopPropagation();var e=t.detail,i=e.consumer,s=e.onOpen;if(!n.has(i)){if("symbol"!=typeof i){var r=i.connectedCallback,a=i.disconnectedCallback;i.connectedCallback=function(){n.set(i,t.detail),r&&r.call(i)},i.disconnectedCallback=function(){n.delete(i),a&&a.call(i)}}n.set(i,t.detail),m(t.detail,o.state),null==s||s.resolve((function(){n.delete(i)}))}})),s.addEventListener("closeWormhole",(function(t){n.delete(t.detail)}))}(this,this.wormholeState),this.storeId&&(l.init(this,["query","replicaIndex"],this.storeMethod,this.storeId),l.init(this,["apiKey","appId","searchIndex"],"session",this.storeId+"_api")),this.internalIndexSwitch()}connectedCallback(){this.searchChange=c(this.searchChange,300),this.browseIndexChange(),this.host.dispatchEvent(new CustomEvent("nanoDidLoad",{detail:this.host}))}render(){const t={indexResults:this.indexResults,results:this.currentHits,filterChanged:this.filterChanged,tplRenderFn:this.tplRenderFn,resultsPage:this.resultsPage,changeEvent:this.changeEvent,facets:this.facets,algoliaIndex:this.algoliaIndex,searchIndex:this.searchIndex,globalStoreMethod:this.storeMethod,isLoading:this.isLoading};return f(r,{key:"e5a080bf3b11c991465f1b44521b75539f80d5ec",class:{"show-results":this.showResults,"is-loading":this.isLoading,"nano-algolia":!0},"aria-busy":this.isLoading},this.hasLoadSlot&&f("div",{key:"586696526af9ba7b721ebfe8aeba2b5a45b8a19a",hidden:!this.isLoading},f("slot",{key:"40556633911954fd20b756fedf71aea7e15b15e1",name:"loader"})),!this.hasLoadSlot&&f("div",{key:"e5ee4968b6864b656b3537ec46b69e64ebe76370",class:{loader:!0,loading:this.isLoading}},f("nano-spinner",{key:"420a97d058127ea029329d6eca5055c0c54f4c1f",overlay:!0})),f(g,{key:"9c271e35ea7f850eb1ec2f99415ab2eebf014387",state:t},f("slot",{key:"7a7a5ac869321d6db0a2f6f784a28e638cbe1a3f",name:"search-input"}),f("div",{key:"91b799022bee756066f1eb60038fdb428c98d3dc",class:"results-container","aria-live":"polite"},f("div",{key:"4209e438e0cefbc244dde4c3a9c10e3e5bf56137",ref:t=>this.resultsDiv=t,class:"results"},f("slot",{key:"44b89a4cae72f8ff38c08dd605df32df03a2fc9a",name:"output"})))),f("div",{key:"7fa2100def56573ef4e098ca6da1a722d50416f9",ref:t=>this.defaultDiv=t,class:"default",tabindex:"-1"},f("slot",{key:"2d5b9cd557465ceee3f249cc556aa6fa32cffd75"})))}static get watchers(){return{listenTo:["handleListenToChange"],_dynFacetFilters:["dynFacetFiltersChange"],browseIndex:["browseIndexChange"],inputField:["inputFieldSet"],query:["queryChange"],replicaIndex:["internalIndexSwitch"],resultsPage:["pageChange"],searchIndexName:["searchIndexNameChange"],apiKey:["initAlgoliaClient"],appId:["initAlgoliaClient"],searchIndex:["initAlgoliaIndex"],showResults:["showResultsChange"],filters:["handleFilterpropChange"]}}};Y.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{position:relative;display:block}:host ::slotted([slot=search-template]){display:none !important}.loader{opacity:0;position:fixed;block-size:100%;inline-size:100%;min-block-size:100%;max-block-size:100vh !important;max-inline-size:100vw !important;inset-inline-start:0;inset-block-start:0;z-index:-10;font-size:60px;display:flex;align-items:center;justify-content:center;transition:opacity 0.2s ease, z-index 0.01s ease 0.2s}.loader.loading{opacity:1;z-index:10;transition:z-index 0.01s ease, opacity 0.2s ease 0.01s}.default{block-size:100%}.default:focus{outline:none}.results{opacity:0;outline:none;overflow:auto;transition:transform 0.3s ease, opacity 0.3s ease, visibility 0.01s ease 0.3s, z-index 0.01s ease 0.3s;transform:translate(0, 100px);visibility:hidden;z-index:-1;position:absolute;inset-block-start:0;inset-inline-start:0;display:none}.results-container{position:relative}.results.show{transition:z-index 0.01s ease, visibility 0.01s ease, transform 0.3s ease 0.01s, opacity 0.3s ease 0.01s, overflow 0.01s ease 0.31s;transform:translate(0, 0);visibility:visible;opacity:1;z-index:10;overflow:hidden}.results.shown{block-size:auto !important;inline-size:auto !important;display:block;position:static;transform:none;z-index:auto;visibility:inherit;opacity:initial;overflow:visible}";export{Y as nano_algolia}
|
4
|
+
import{i as t,g as e,r as i,c as s,d as n,e as o,a as r}from"./index-CX_Hk6ss.js";import{a}from"./algoliasearch-lite.esm.browser-C1SNUAIj.js";import{g as h}from"./dom-COiksOVZ.js";import{C as l}from"./component-store-DMqr8_D3.js";import{d as c}from"./throttle-C93FMm2Z.js";import{t as u,h as f}from"./renderer-ZmozgREV.js";import{S as d}from"./algolia-data-B1lm-wYl.js";var p=new Map,m=function(t,e){var i=t.updater;t.fields.forEach((function(t){i(t,e[t])}))},g=function(e,i){var s=e.state,n=t();if(p.has(n)){var o=p.get(n);o.state=s,o.wormholes.forEach((function(t){m(t,s)}))}return i};class y{queue=[];workingOnPromise=!1;static pendingPromise=!1;stop=!1;limit=null;enqueue(t){return new Promise(((e,i)=>{this.queue.push({promise:t,resolve:e,reject:i}),this.dequeue()}))}dequeue(){if(this.workingOnPromise)return!1;if(this.stop)return this.queue=[],void(this.stop=!1);const t=this.queue.shift();if(!t)return!1;try{this.workingOnPromise=!0,t.promise().then((e=>{this.workingOnPromise=!1,t.resolve(e),this.dequeue()})).catch((e=>{this.workingOnPromise=!1,t.reject(e),this.dequeue()}))}catch(e){this.workingOnPromise=!1,t.reject(e),this.dequeue()}return!0}}function b(t){const e=new Error(t);var i,s;return i=e,s=b.prototype,Object.setPrototypeOf?Object.setPrototypeOf(i,s):i.__proto__=s,e}function w(t,e,i){const s=e.slice(0,i).split(/\n/),n=s.length,o=s[n-1].length+1;throw b(t+=" at line "+n+" col "+o+":\n\n "+e.split(/\n/)[n-1]+"\n "+Array(o).join(" ")+"^")}b.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});const v=new Function("return this")().Promise;let x=!1;try{x=new Function("return (async function(){}).constructor")()}catch(t){if(!(t instanceof SyntaxError))throw t}function F(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function C(t,e,i){for(const s in e)F(e,s)&&(t[s]=null==e[s]||"object"!=typeof e[s]||"storage"!==s&&"prefixes"!==s||i?e[s]:C({},e[s]));return t}const I=/^async +/,k=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,S=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,R=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g,j=/[.*+\-?^${}()|[\]\\]/g;function _(t){return j.test(t)?t.replace(j,"\\$&"):t}function z(t,e){e.rmWhitespace&&(t=t.replace(/[\r\n]+/g,"\n").replace(/^\s+|\s+$/gm,"")),k.lastIndex=0,S.lastIndex=0,R.lastIndex=0;const i=e.prefixes,s=[i.h,i.b,i.i,i.r,i.c,i.e].reduce((function(t,e){return t&&e?t+"|"+_(e):e?_(e):t}),""),n=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+_(e.tags[1])+")","g"),o=new RegExp("([^]*?)"+_(e.tags[0])+"(-|_)?\\s*("+s+")?\\s*","g");let r=0,a=!1;function h(i,s){const h={f:[]};let l,c=0,u="c";function f(i){const s=t.slice(r,i);let n=s.trim();if("f"===u)"safe"===n?h.raw=!0:e.async&&I.test(n)?(n=n.replace(I,""),h.f.push([n,"",!0])):h.f.push([n,""]);else if("fp"===u)h.f[h.f.length-1][1]+=n;else if("err"===u){if(n){const e=s.search(/\S/);w("invalid syntax",t,r+e)}}else h[u]=n;r=i+1}for("h"===s||"b"===s||"c"===s?u="n":"r"===s&&(h.raw=!0,s="i"),n.lastIndex=r;null!==(l=n.exec(t));){const e=l[1],i=l[2],d=l[3],p=l[4],m=l[5],g=l.index;if(e)"("===e?(0===c&&("n"===u?(f(g),u="p"):"f"===u&&(f(g),u="fp")),c++):")"===e?(c--,0===c&&"c"!==u&&(f(g),u="err")):0===c&&"|"===e?(f(g),u="f"):"=>"===e&&(f(g),r+=1,u="res");else if(i)if("/*"===i){const e=t.indexOf("*/",n.lastIndex);-1===e&&w("unclosed comment",t,l.index),n.lastIndex=e+2}else"'"===i?(S.lastIndex=l.index,S.exec(t)?n.lastIndex=S.lastIndex:w("unclosed string",t,l.index)):'"'===i?(R.lastIndex=l.index,R.exec(t)?n.lastIndex=R.lastIndex:w("unclosed string",t,l.index)):"`"===i&&(k.lastIndex=l.index,k.exec(t)?n.lastIndex=k.lastIndex:w("unclosed string",t,l.index));else if(d)return f(g),r=g+l[0].length,o.lastIndex=r,a=m,p&&"h"===s&&(s="s"),h.t=s,h}return w("unclosed tag",t,i),h}const l=function s(n,l){n.b=[],n.d=[];let c,u=!1,f=[];function d(t,i){t&&(t=function(t,e,i,s){let n,o;return"string"==typeof e.autoTrim?n=o=e.autoTrim:Array.isArray(e.autoTrim)&&(n=e.autoTrim[1],o=e.autoTrim[0]),(i||!1===i)&&(n=i),(s||!1===s)&&(o=s),"slurp"===n&&"slurp"===o?t.trim():("_"===n||"slurp"===n?t=String.prototype.trimLeft?t.trimLeft():t.replace(/^[\s\uFEFF\xA0]+/,""):"-"!==n&&"nl"!==n||(t=t.replace(/^(?:\n|\r|\r\n)/,"")),"_"===o||"slurp"===o?t=String.prototype.trimRight?t.trimRight():t.replace(/[\s\uFEFF\xA0]+$/,""):"-"!==o&&"nl"!==o||(t=t.replace(/(?:\n|\r|\r\n)$/,"")),t)}(t,e,a,i),t&&(t=t.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),f.push(t)))}for(;null!==(c=o.exec(t));){const o=c[1],a=c[2],l=c[3]||"";let p;for(const t in i)if(i[t]===l){p=t;break}d(o,a),r=c.index+c[0].length,p||w("unrecognized tag type: "+l,t,r);let m=h(c.index,p);const g=m.t;if("h"===g){const t=m.n||"";e.async&&I.test(t)&&(m.a=!0,m.n=t.replace(I,"")),m=s(m),f.push(m)}else if("c"===g){if(n.n===m.n)return u?(u.d=f,n.b.push(u)):n.d=f,n;w("Helper start and end don't match",t,c.index+c[0].length)}else if("b"===g){u?(u.d=f,n.b.push(u)):n.d=f;const t=m.n||"";e.async&&I.test(t)&&(m.a=!0,m.n=t.replace(I,"")),u=m,f=[]}else if("s"===g){const t=m.n||"";e.async&&I.test(t)&&(m.a=!0,m.n=t.replace(I,"")),f.push(m)}else f.push(m)}if(!l)throw b('unclosed helper "'+n.n+'"');return d(t.slice(r,t.length),!1),n.d=f,n}({f:[]},!0);if(e.plugins)for(let t=0;t<e.plugins.length;t++){const i=e.plugins[t];i.processAST&&(l.d=i.processAST(l.d,e))}return l.d}function A(t,e){const i=z(t,e);let s="var tR='';"+(e.useWith?"with("+e.varName+"||{}){":"")+q(i,e)+"if(cb){cb(null,tR)} return tR"+(e.useWith?"}":"");if(e.plugins)for(let t=0;t<e.plugins.length;t++){const i=e.plugins[t];i.processFnString&&(s=i.processFnString(s,e))}return s}function P(t,e){for(let i=0;i<e.length;i++){const s=e[i][1];t=(e[i][2]?"await ":"")+"c.l('F','"+e[i][0]+"')("+t,s&&(t+=","+s),t+=")"}return t}function T(t,e,i,s,n,o){let r="{exec:"+(n?"async ":"")+E(i,e,t)+",params:["+s+"]";return o&&(r+=",name:'"+o+"'"),n&&(r+=",async:true"),r+="}",r}function O(t,e){let i="[";for(let s=0;s<t.length;s++){const n=t[s];i+=T(e,n.res||"",n.d,n.p||"",n.a,n.n),s<t.length&&(i+=",")}return i+="]",i}function E(t,e,i){return"function("+e+"){var tR='';"+q(t,i)+"return tR}"}function q(t,e){let i=0;const s=t.length;let n="";for(;i<s;i++){const s=t[i];if("string"==typeof s)n+="tR+='"+s+"';";else{const t=s.t;let i=s.c||"";const o=s.f,r=s.n||"",a=s.p||"",h=s.res||"",l=s.b,c=!!s.a;if("i"===t){e.defaultFilter&&(i="c.l('F','"+e.defaultFilter+"')("+i+")");let t=P(i,o);!s.raw&&e.autoEscape&&(t="c.l('F','e')("+t+")"),n+="tR+="+t+";"}else if("h"===t)if(e.storage.nativeHelpers.get(r))n+=e.storage.nativeHelpers.get(r)(s,e);else{let t=(c?"await ":"")+"c.l('H','"+r+"')("+T(e,h,s.d,a,c);t+=l?","+O(l,e):",[]",t+=",c)",n+="tR+="+P(t,o)+";"}else"s"===t?n+="tR+="+P((c?"await ":"")+"c.l('H','"+r+"')({params:["+a+"]},[],c)",o)+";":"e"===t&&(n+=i+"\n")}}return n}class D{cache;constructor(t){this.cache=t}define(t,e){this.cache[t]=e}get(t){return this.cache[t]}remove(t){delete this.cache[t]}reset(){this.cache={}}load(t){C(this.cache,t,!0)}}function H(t,e,i,s){if(e&&e.length>0)throw b((s?"Native":"")+"Helper '"+t+"' doesn't accept blocks");if(i&&i.length>0)throw b((s?"Native":"")+"Helper '"+t+"' doesn't accept filters")}function N(t,e,i,s,n){i(t[e],e).then((function(o){s+=o,e===t.length-1?n(s):N(t,e+1,i,s,n)}))}function $(t,e,i,s,n,o){s(e[i],t[e[i]]).then((function(r){n+=r,i===e.length-1?o(n):$(t,e,i+1,s,n,o)}))}const L={"&":"&","<":"<",">":">",'"':""","'":"'"};function M(t){return L[t]}const Q=new D({}),W=new D({each:function(t,e){let i="";const s=t.params[0];if(H("each",e,!1),t.async)return new Promise((function(e){N(s,0,t.exec,i,e)}));for(let e=0;e<s.length;e++)i+=t.exec(s[e],e);return i},foreach:function(t,e){const i=t.params[0];if(H("foreach",e,!1),t.async)return new Promise((function(e){$(i,Object.keys(i),0,t.exec,"",e)}));{let e="";for(const s in i)F(i,s)&&(e+=t.exec(s,i[s]));return e}},include:function(t,e,i){H("include",e,!1);const s=i.storage.templates.get(t.params[0]);if(!s)throw b('Could not fetch template "'+t.params[0]+'"');return s(t.params[1],i)},extends:function(t,e,i){const s=t.params[1]||{};s.content=t.exec();for(let t=0;t<e.length;t++){const i=e[t];s[i.name]=i.exec()}const n=i.storage.templates.get(t.params[0]);if(!n)throw b('Could not fetch template "'+t.params[0]+'"');return n(s,i)},useScope:function(t,e){return H("useScope",e,!1),t.exec(t.params[0])}}),B=new D({if:function(t,e){H("if",!1,t.f,!0);let i="if("+t.p+"){"+q(t.d,e)+"}";if(t.b)for(let s=0;s<t.b.length;s++){const n=t.b[s];"else"===n.n?i+="else{"+q(n.d,e)+"}":"elif"===n.n&&(i+="else if("+n.p+"){"+q(n.d,e)+"}")}return i},try:function(t,e){if(H("try",!1,t.f,!0),!t.b||1!==t.b.length||"catch"!==t.b[0].n)throw b("native helper 'try' only accepts 1 block, 'catch'");let i="try{"+q(t.d,e)+"}";const s=t.b[0];return i+="catch"+(s.res?"("+s.res+")":"")+"{"+q(s.d,e)+"}",i},block:function(t,e){return H("block",t.b,t.f,!0),"if(!"+e.varName+"["+t.p+"]){tR+=("+E(t.d,"",e)+")()}else{tR+="+e.varName+"["+t.p+"]}"}}),K=new D({e:function(t){const e=String(t);return/[&<>"']/.test(e)?e.replace(/[&<>"']/g,M):e}}),U={varName:"it",autoTrim:[!1,"nl"],autoEscape:!0,defaultFilter:!1,tags:["{{","}}"],l:function(t,e){if("H"===t){const t=this.storage.helpers.get(e);if(t)return t;throw b("Can't find helper '"+e+"'")}if("F"===t){const t=this.storage.filters.get(e);if(t)return t;throw b("Can't find filter '"+e+"'")}},async:!1,storage:{helpers:W,nativeHelpers:B,filters:K,templates:Q},prefixes:{h:"@",b:"#",i:"",r:"*",c:"/",e:"!"},cache:!1,plugins:[],useWith:!1};function Z(t,e){const i={};return C(i,U),e&&C(i,e),t&&C(i,t),i.l.bind(i),i}function V(t,e){const i=Z(e||{});let s=Function;if(i.async){if(!x)throw b("This environment doesn't support async/await");s=x}try{return new s(i.varName,"c","cb",A(t,i))}catch(e){throw e instanceof SyntaxError?b("Bad template syntax\n\n"+e.message+"\n"+Array(e.message.length+1).join("=")+"\n"+A(t,i)):e}}function G(t,e){let i;return e.cache&&e.name&&e.storage.templates.get(e.name)?e.storage.templates.get(e.name):(i="function"==typeof t?t:V(t,e),e.cache&&e.name&&e.storage.templates.define(e.name,i),i)}U.l.bind(U);var X=Object.freeze({__proto__:null,compile:V,compileScope:q,compileScopeIntoFunction:E,compileToString:A,defaultConfig:U,filters:K,getConfig:Z,helpers:W,nativeHelpers:B,parse:z,render:function(t,e,i,s){const n=Z(i||{});if(!n.async)return G(t,n)(e,n);{let i;if(!s){if("function"==typeof v)return new v((function(s,o){try{i=G(t,n)(e,n),s(i)}catch(t){o(t)}}));throw b("Please provide a callback function, this env doesn't support Promises")}try{G(t,n)(e,n,s)}catch(t){return s(t)}}},templates:Q});K.define("date_long",((t,e={year:"numeric",month:"long",day:"numeric"})=>{if(t)return new Date(1e3*parseInt(t)).toLocaleDateString("en-GB",e)})),K.define("date_short",((t,e="d/m/y")=>{if(!t)return;const i=new Date(1e3*parseInt(t));return(t=(t=e.replace(/(d)/,i.getDate().toString())).replace(/(m)/,(i.getMonth()+1).toString())).replace(/(y)/,i.getFullYear().toString())})),K.define("public_name",(t=>{if(t)return(t=t.split("_").map((t=>t.length<3?t.toUpperCase():t)).join(" ")).charAt(0).toUpperCase()+t.slice(1)})),K.define("trim_to",((t,e=100)=>{if(t)return t.length<=e?t:t.substr(0,e)+"..."})),K.define("classname",(t=>{if(t)return t.replace(/[\W]+/g,"")})),K.define("abs_url",((t,e=null,i)=>{if(!e)return t;if(!t)return;let s;if(e.domains&&i&&i.origin){const t=e.domains.find((t=>t.origin===i.origin));s=t?t.domain:""}else e.domain&&(s=e.domain);return t.match(/^http/)||!s?t:(t.startsWith("/")||(t="/"+t),location.protocol+"//"+s+t)})),K.define("replace",((t,e,i)=>t.replace(e,i))),K.define("remove_spaces",(t=>t.replace(/ /g,"_"))),K.define("add_spaces",(t=>t.replace(/[_\-]/g," "))),K.define("capitalise",(t=>t.charAt(0).toUpperCase()+t.slice(1))),K.define("lowercase",(t=>t.toLowerCase()));const Y=X,J=class{constructor(t){i(this,t),this.nanoDidLoad=s(this,"nanoDidLoad",7),this.nanoResultsShown=s(this,"nanoResultsShown",3),this.nanoBeforeQuery=s(this,"nanoBeforeQuery",7),this.nanoAfterQuery=s(this,"nanoAfterQuery",7),this.nanoNewResults=s(this,"nanoNewResults",7)}staticFacetFilters={};dynFacetFilters={};tplSlot;outputSlot;slottedInput;hasLoadSlot=!1;resultsDiv;defaultDiv;tpl;facets;placedAlgoliaEles=[];algoliaClient;promiseQueue=new y;get host(){return e(this)}_dynFacetFilters={};inputField;algoliaIndex;indeces=[];indexResults;filterChanged="";currentHits;changeEvent=d.Init;isLoading=!1;wormholeState=this;showResults=!1;resultsPage=0;appId;apiKey;searchIndex={};searchIndexName="";listenTo=null;handleListenToChange(){if(!this.listenTo)return;const t=document.querySelector(this.listenTo);["nano-input","input"].includes(t.tagName.toLocaleLowerCase())&&(this.inputField=t)}query="";operator="and";filters=[];tplRenderFn=Y.render;replicaIndex="";browseIndex=!1;minChars=2;storeId;storeMethod="session";nanoDidLoad;nanoResultsShown;nanoBeforeQuery;nanoAfterQuery;nanoNewResults;async removeFilters(t,e){t||e?Object.keys(this._dynFacetFilters).forEach((i=>{t&&this._dynFacetFilters[i].facetName===t&&(this._dynFacetFilters[i].element.value=e?this._dynFacetFilters[i].value.filter((t=>t!==e)):"")})):this.clearAllFacetFilters()}onAllTplUpdate(t){t.stopPropagation(),t.target.tagName.toLowerCase()===u("nano-algolia-results")&&requestAnimationFrame((()=>{this.nanoNewResults.emit(this.indexResults)}))}async onPageChange(t){if(!this.indexResults)return;let e=this.resultsPage;t&&(t.stopPropagation(),e=t.detail.page),e=Math.min(this.indexResults.totalPages-1,e),e=Math.max(e,0),this.indexResults.currentPage!==e&&(this.indexResults.currentPage=e,await this.algoliaSearch(d.Page))}async onFilterChange(t){t.stopPropagation();const e={},i=t.detail;i.element=t.target,this.indexResults?(this.staticFacetFilters[i.filterId]?this.staticFacetFilters[i.filterId]=i:(e[i.filterId]=i,this._dynFacetFilters={...this._dynFacetFilters,...e}),this.indexResults.appliedFilters=this.makeAppliedFilters()):this.staticFacetFilters[i.filterId]=i,this.filterChanged=i.value&&i.value.length?i.filterId:"all",this.resetPage(),this.algoliaSearch(d.Filter)}dynFacetFiltersChange(){Object.values(this._dynFacetFilters).forEach((t=>{this.host.ownerDocument===t.element.ownerDocument?this.dynFacetFilters[t.filterId]=t:delete this.dynFacetFilters[t.filterId]}))}browseIndexChange(){this.browseIndex&&(!this.query||this.query.length<this.minChars)&&(this.query="*")}inputFieldSet(){this.inputField&&"*"!==this.query&&this.inputField&&this.inputField.value!==this.query&&(this.inputField.value=this.query)}queryChange(){this.searchChange()}searchChange=async()=>{if(this.algoliaIndex){if(!this.query||this.query.length<this.minChars){if(!this.browseIndex)return this.query&&0!==this.query.length?void 0:void this.handleSearchReset();if("*"!==this.query)return void(this.query="*")}this.isLoading=!0,setTimeout((async()=>{this.resetPage(),await this.algoliaSearch(d.Init),await this.updateContent(),setTimeout((()=>this.isLoading=!1),800),this.showResults=!0,this.nanoResultsShown.emit({meta:this.indexResults,client:{appId:this.appId,apiKey:this.apiKey}})}),200)}};async internalIndexSwitch(){this.replicaIndex&&this.indexResults&&this.indexResults.index!==this.replicaIndex&&(this.indexResults.index=this.replicaIndex,this.algoliaIndex=this.algoliaClient.initIndex(this.indexResults.index),this.resetPage(),this.algoliaSearch(d.Replica))}pageChange(){this.onPageChange()}searchIndexNameChange(){!this.searchIndexName||!this.searchIndexName.length||this.searchIndex&&this.searchIndex.index===this.searchIndexName||(this.searchIndex={index:this.searchIndexName})}initAlgoliaClient(){this.appId&&this.apiKey&&(this.algoliaClient=a(this.appId,this.apiKey))}initAlgoliaIndex(){this.algoliaClient&&this.searchIndex&&this.searchIndex.index&&(this.searchIndex.hitsPerPage||(this.searchIndex.hitsPerPage=100),this.replicaIndex&&(this.searchIndex.index=this.replicaIndex),this.searchIndexName=this.searchIndex.index,this.algoliaIndex=this.algoliaClient.initIndex(this.searchIndex.index),this.searchChange())}showResultsChange(){this.resultsDiv&&this.defaultDiv&&(this.showResults?(this.resultsDiv.style.width=this.host.scrollWidth+"px",this.resultsDiv.style.minHeight=this.host.scrollHeight+"px",n((()=>{this.resultsDiv.addEventListener("transitionend",this.onResultDisplay),this.resultsDiv.style.display="block",setTimeout((()=>this.resultsDiv.classList.add("show")),50)}))):n((()=>{this.resultsDiv.classList.remove("shown"),this.defaultDiv.style.display="block",setTimeout((()=>{this.resultsDiv.addEventListener("transitionend",this.onResultDisplay),this.resultsDiv.classList.remove("show"),this.slottedInput?this.slottedInput.focus({preventScroll:!0}):this.defaultDiv.focus({preventScroll:!0})}),50)})))}handleFilterpropChange(){this.algoliaSearch(d.Init)}fixDomain(t){return this.searchIndex&&this.searchIndex.domain?(t.hits.map((t=>{t.url&&!t.url.match(/^http/)&&(t.url=location.protocol+"//"+this.searchIndex.domain+t.url)})),t):t}makeAppliedFilters=()=>{const t=[],e=e=>{Object.values(e).forEach((e=>{if(e.value&&e.value.length){const i=t.find((t=>t.name===e.facetName));i?i.values=[...i.values,...e.value]:t.push({name:e.facetName,values:[...e.value]})}}))};return e(this.dynFacetFilters),e(this.staticFacetFilters),t.length?t:null};algoliaSearch=async t=>this.promiseQueue.enqueue((()=>this.queueSearch(t)));queueSearch=async t=>{if(!(this.algoliaIndex&&this.query&&this.searchIndex&&this.searchIndex.index))return;this.nanoBeforeQuery.emit(this.indexResults),d.Init===t&&this.clearAllFacetFilters();const e={filters:this.algoliaFilterStr(),page:this.indexResults?this.indexResults.currentPage:0,clickAnalytics:!0};this.searchIndex.filters&&(e.facets=this.searchIndex.filters),this.searchIndex.hitsPerPage&&(e.hitsPerPage=this.searchIndex.hitsPerPage);let i=await this.algoliaIndex.search(this.query,e);return i=this.fixDomain(i),this.changeEvent=t,t!==d.Init&&this.indexResults||(this.indexResults={queryID:i.queryID,currentPage:0,totalHits:i.nbHits,hitsPerPage:null,origFilters:i.facets,query:this.query,domain:this.searchIndex.domain||null,totalHitsWithFilters:0,results:[],totalPages:0,appliedFilters:this.makeAppliedFilters(),indexName:this.searchIndex.name||null,index:this.searchIndex.index,searchIndex:this.searchIndex}),this.indexResults.dynFilters=i.facets,this.indexResults.results=i.hits,this.indexResults.totalHitsWithFilters=i.nbHits,this.indexResults.currentPage=i.page,this.indexResults.totalPages=i.nbPages,this.indexResults.hitsPerPage=i.hitsPerPage,this.indexResults.query=i.query,this.changeEvent!==d.Page&&this.changeEvent!==d.Replica&&(this.facets=i.facets),this.nanoAfterQuery.emit(this.indexResults),new Promise((t=>{setTimeout((()=>t("tpl updated")),20)})).then((()=>{this.currentHits=this.indexResults.results,this.resultsPage=this.indexResults.currentPage}))};resetPage(){this.indexResults&&(this.indexResults.currentPage=0)}clearAllFacetFilters(){Object.values(this._dynFacetFilters).forEach((t=>{t.element.value=""})),this._dynFacetFilters={}}algoliaFilterStr(){const t={},e=e=>{let i,s;Object.keys(e).forEach((n=>{i=e[n],t[n]=t[n]||{name:i.facetName,or:[],and:[],not:[]},s=t[n][i.operator],i.value&&i.value.length&&(t[n][i.operator]=[...s,...i.value])}))};e(this.dynFacetFilters),e(this.staticFacetFilters);const i=(t,e)=>e.indexOf(" ")>-1?t+':"'+e+'"':t+":"+e;let s,n,o=[];return Object.values(t).forEach((function(t){Object.keys(t).filter((t=>t.match(/(or|and|not)/))).forEach((e=>{s=t,n=t.name,"or"===e||"and"===e?s[e].length&&o.push("( "+s[e].map((t=>{if(t.length)return i(n,t)})).join(" "+e.toLocaleUpperCase()+" ")+" )"):s.not.length&&o.push("( "+s[e].map((t=>{if(t.length)return"NOT "+i(n,t)})).join(" AND ")+" )")}))})),o=[...this.filters,...o],o.join(" "+this.operator.toLocaleUpperCase()+" ")}handleInputChange(t){t.target===this.inputField&&(this.query=this.inputField.value)}handleSearchReset=()=>{this.showResults=!1,this.indexResults=null};onResultDisplay=()=>{n((()=>{this.resultsDiv.removeEventListener("transitionend",this.onResultDisplay),this.showResults?(this.defaultDiv.style.display="none",this.resultsDiv.classList.add("shown"),this.resultsDiv.style.minHeight="",this.resultsDiv.style.width=""):this.resultsDiv.style.display="none"}))};async updateContent(){return this.promiseQueue.enqueue((()=>this.updateContentQueue()))}async updateContentQueue(){const t=this.outputSlot||this.resultsDiv;if(!t||!this.tpl)return"no tpl";const e=document.createElement("div");e.innerHTML=this.tpl;const i=[];return this.placedAlgoliaEles=[],Array.from(e.querySelectorAll(`${u("nano-algolia")}, ${u("nano-algolia-filter")}, ${u("nano-algolia-results")}`)).forEach(((t,e)=>{const s=document.createElement("div");s.dataset.placeholderId=e.toString(),s.classList.add("nano-ele-placeholder"),i.push(t),t.parentNode.replaceChild(s,t)})),t.innerHTML=this.tplRenderFn(e.innerHTML.replace(/>/gm,">").replace(/</gm,"<").replace(/&/gm,"&"),this.indexResults),Array.from(t.querySelectorAll("div.nano-ele-placeholder")).forEach((t=>{t.parentNode.replaceChild(i[parseInt(t.dataset.placeholderId)],t),this.placedAlgoliaEles.push(i[parseInt(t.dataset.placeholderId)])})),this.placedAlgoliaEles.length?new Promise((e=>{const i=s=>{this.placedAlgoliaEles=this.placedAlgoliaEles.filter((t=>t!==s.detail)),this.placedAlgoliaEles.length||(setTimeout((()=>e("tpl updated")),500),t.removeEventListener("nanoTplUpdated",i))};t.addEventListener("nanoTplUpdated",i)})):Promise.resolve("algolia setup")}componentWillLoad(){o((()=>{this.tplSlot=h(this.host,'[slot="template"]')[0],this.outputSlot=h(this.host,'[slot="output"]')[0],this.slottedInput=h(this.host,'[slot="search-input"]')[0],this.hasLoadSlot=!!h(this.host,'[slot="loader"]')[0],this.tplSlot&&(this.tpl=this.tplSlot.innerHTML||this.tplSlot.innerText),this.slottedInput&&(this.slottedInput.tagName.toLocaleLowerCase()===u("nano-input")||this.slottedInput instanceof HTMLInputElement)?this.inputField=this.slottedInput:this.slottedInput?this.inputField=this.slottedInput.querySelector(`${u("nano-input")}, input:not([type="radio"]):not([type="checkbox"])`):this.handleListenToChange(),n((()=>{this.showResults&&this.tpl&&this.searchChange()}))})),this.searchIndexNameChange(),this.initAlgoliaClient(),this.initAlgoliaIndex(),function(t,i){var s=e(t),n=new Map,o={wormholes:n,state:i};p.set(t,o);var r=t.connectedCallback;t.connectedCallback=function(){p.set(t,o),r&&r.call(t)};var a=t.disconnectedCallback;t.disconnectedCallback=function(){p.delete(t),a&&a.call(t)},s.addEventListener("openWormhole",(function(t){t.stopPropagation();var e=t.detail,i=e.consumer,s=e.onOpen;if(!n.has(i)){if("symbol"!=typeof i){var r=i.connectedCallback,a=i.disconnectedCallback;i.connectedCallback=function(){n.set(i,t.detail),r&&r.call(i)},i.disconnectedCallback=function(){n.delete(i),a&&a.call(i)}}n.set(i,t.detail),m(t.detail,o.state),null==s||s.resolve((function(){n.delete(i)}))}})),s.addEventListener("closeWormhole",(function(t){n.delete(t.detail)}))}(this,this.wormholeState),this.storeId&&(l.init(this,["query","replicaIndex"],this.storeMethod,this.storeId),l.init(this,["apiKey","appId","searchIndex"],"session",this.storeId+"_api")),this.internalIndexSwitch()}connectedCallback(){this.searchChange=c(this.searchChange,300),this.browseIndexChange(),this.host.dispatchEvent(new CustomEvent("nanoDidLoad",{detail:this.host}))}render(){const t={indexResults:this.indexResults,results:this.currentHits,filterChanged:this.filterChanged,tplRenderFn:this.tplRenderFn,resultsPage:this.resultsPage,changeEvent:this.changeEvent,facets:this.facets,algoliaIndex:this.algoliaIndex,searchIndex:this.searchIndex,globalStoreMethod:this.storeMethod,isLoading:this.isLoading};return f(r,{key:"e5a080bf3b11c991465f1b44521b75539f80d5ec",class:{"show-results":this.showResults,"is-loading":this.isLoading,"nano-algolia":!0},"aria-busy":this.isLoading},this.hasLoadSlot&&f("div",{key:"586696526af9ba7b721ebfe8aeba2b5a45b8a19a",hidden:!this.isLoading},f("slot",{key:"40556633911954fd20b756fedf71aea7e15b15e1",name:"loader"})),!this.hasLoadSlot&&f("div",{key:"e5ee4968b6864b656b3537ec46b69e64ebe76370",class:{loader:!0,loading:this.isLoading}},f("nano-spinner",{key:"420a97d058127ea029329d6eca5055c0c54f4c1f",overlay:!0})),f(g,{key:"9c271e35ea7f850eb1ec2f99415ab2eebf014387",state:t},f("slot",{key:"7a7a5ac869321d6db0a2f6f784a28e638cbe1a3f",name:"search-input"}),f("div",{key:"91b799022bee756066f1eb60038fdb428c98d3dc",class:"results-container","aria-live":"polite"},f("div",{key:"4209e438e0cefbc244dde4c3a9c10e3e5bf56137",ref:t=>this.resultsDiv=t,class:"results"},f("slot",{key:"44b89a4cae72f8ff38c08dd605df32df03a2fc9a",name:"output"})))),f("div",{key:"7fa2100def56573ef4e098ca6da1a722d50416f9",ref:t=>this.defaultDiv=t,class:"default",tabindex:"-1"},f("slot",{key:"2d5b9cd557465ceee3f249cc556aa6fa32cffd75"})))}static get watchers(){return{listenTo:["handleListenToChange"],_dynFacetFilters:["dynFacetFiltersChange"],browseIndex:["browseIndexChange"],inputField:["inputFieldSet"],query:["queryChange"],replicaIndex:["internalIndexSwitch"],resultsPage:["pageChange"],searchIndexName:["searchIndexNameChange"],apiKey:["initAlgoliaClient"],appId:["initAlgoliaClient"],searchIndex:["initAlgoliaIndex"],showResults:["showResultsChange"],filters:["handleFilterpropChange"]}}};J.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{position:relative;display:block}:host ::slotted([slot=search-template]){display:none !important}.loader{opacity:0;position:fixed;block-size:100%;inline-size:100%;min-block-size:100%;max-block-size:100vh !important;max-inline-size:100vw !important;inset-inline-start:0;inset-block-start:0;z-index:-10;font-size:60px;display:flex;align-items:center;justify-content:center;transition:opacity 0.2s ease, z-index 0.01s ease 0.2s}.loader.loading{opacity:1;z-index:10;transition:z-index 0.01s ease, opacity 0.2s ease 0.01s}.default{block-size:100%}.default:focus{outline:none}.results{opacity:0;outline:none;overflow:auto;transition:transform 0.3s ease, opacity 0.3s ease, visibility 0.01s ease 0.3s, z-index 0.01s ease 0.3s;transform:translate(0, 100px);visibility:hidden;z-index:-1;position:absolute;inset-block-start:0;inset-inline-start:0;display:none}.results-container{position:relative}.results.show{transition:z-index 0.01s ease, visibility 0.01s ease, transform 0.3s ease 0.01s, opacity 0.3s ease 0.01s, overflow 0.01s ease 0.31s;transform:translate(0, 0);visibility:visible;opacity:1;z-index:10;overflow:hidden}.results.shown{block-size:auto !important;inline-size:auto !important;display:block;position:static;transform:none;z-index:auto;visibility:inherit;opacity:initial;overflow:visible}";export{J as nano_algolia}
|