@nanoporetech-digital/components 8.0.0-alpha.12 → 8.0.0-alpha.13
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/{fade-QCWQMt6E.js → fade-CiX74e7g.js} +1 -1
- package/dist/cjs/{fullscreen-BYiPBVB-.js → fullscreen-CRDiLBHG.js} +1 -1
- package/dist/cjs/{lazyload-CE9AflwC.js → lazyload-DQBOwjop.js} +1 -1
- package/dist/cjs/{nano-data-table-Bt1hEvrv.js → nano-data-table-DpoWsfe-.js} +4 -3
- package/dist/cjs/nano-data-table.cjs.entry.js +1 -1
- package/dist/cjs/nano-grid_2.cjs.entry.js +3 -3
- package/dist/cjs/{nano-slides-C79dDqp3.js → nano-slides-CEgnF-Y8.js} +14 -11
- package/dist/cjs/nano-slides.cjs.entry.js +1 -1
- package/dist/cjs/{page-dots-S-JrbRKH.js → page-dots-KutnmYpQ.js} +1 -1
- package/dist/cjs/{table.worker-DJPRsl4W.js → table.worker-iOdjCdrO.js} +1 -1
- package/dist/collection/components/data-table/table.pin-service.js +3 -2
- package/dist/collection/components/img/img.css +1 -1
- package/dist/collection/components/img/img.js +8 -4
- package/dist/collection/components/slides/slides.js +10 -7
- package/dist/collection/components/tabs/tab-group.css +8 -8
- package/dist/collection/components/tabs/tab.css +6 -6
- package/dist/components/img.js +3 -3
- package/dist/components/nano-data-table.js +3 -2
- package/dist/components/slides.js +10 -7
- package/dist/esm/{fade-BwtMNpw7.js → fade-DJjEJ3OV.js} +1 -1
- package/dist/esm/{fullscreen-CLTOaIQ8.js → fullscreen-C0Rg1tXP.js} +1 -1
- package/dist/esm/{lazyload-CBLyQMEG.js → lazyload-BGGkN269.js} +1 -1
- package/dist/esm/{nano-data-table-BqsFe2Ik.js → nano-data-table-TfPKf5LE.js} +4 -3
- package/dist/esm/nano-data-table.entry.js +1 -1
- package/dist/esm/nano-grid_2.entry.js +3 -3
- package/dist/esm/{nano-slides-DEqstC8u.js → nano-slides-B1zM-u4Y.js} +14 -11
- package/dist/esm/nano-slides.entry.js +1 -1
- package/dist/esm/{page-dots-2yJYdWP9.js → page-dots-D9sLGqee.js} +1 -1
- package/dist/esm/{table.worker-BJVVUKdP.js → table.worker-Dq_pppel.js} +1 -1
- package/dist/nano-components/{fade-BwtMNpw7.js → fade-DJjEJ3OV.js} +1 -1
- package/dist/nano-components/{fullscreen-CLTOaIQ8.js → fullscreen-C0Rg1tXP.js} +1 -1
- package/dist/nano-components/{lazyload-CBLyQMEG.js → lazyload-BGGkN269.js} +1 -1
- package/dist/nano-components/nano-data-table-TfPKf5LE.js +4 -0
- package/dist/nano-components/nano-data-table.entry.js +1 -1
- package/dist/nano-components/nano-grid_2.entry.js +1 -1
- package/dist/nano-components/{nano-slides-DEqstC8u.js → nano-slides-B1zM-u4Y.js} +3 -3
- package/dist/nano-components/nano-slides.entry.js +1 -1
- package/dist/nano-components/{page-dots-2yJYdWP9.js → page-dots-D9sLGqee.js} +1 -1
- package/dist/nano-components/{table.worker-BJVVUKdP.js → table.worker-Dq_pppel.js} +1 -1
- package/dist/types/components/img/img.d.ts +5 -1
- package/dist/types/components/slides/slides.d.ts +1 -0
- package/dist/types/components.d.ts +12 -4
- package/docs-json.json +39 -31
- package/docs-vscode.json +1 -1
- package/hydrate/index.js +21 -13
- package/hydrate/index.mjs +21 -13
- package/package.json +2 -2
- package/dist/nano-components/nano-data-table-BqsFe2Ik.js +0 -4
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import { F as Flickity, u as utils, U as Unipointer } from './nano-slides-
|
4
|
+
import { F as Flickity, u as utils, U as Unipointer } from './nano-slides-B1zM-u4Y.js';
|
5
5
|
import './index-D6WdRvhp.js';
|
6
6
|
import './renderer-BhDJHRB-.js';
|
7
7
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import { c as createWorker } from './nano-data-table-
|
4
|
+
import { c as createWorker } from './nano-data-table-TfPKf5LE.js';
|
5
5
|
import './index-D6WdRvhp.js';
|
6
6
|
import './renderer-BhDJHRB-.js';
|
7
7
|
import './math-BEqsTfVK.js';
|
@@ -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-B1zM-u4Y.js";import"./index-D6WdRvhp.js";import"./renderer-BhDJHRB-.js";const s=t.Slide,h=s.prototype.updateTarget;s.prototype.updateTarget=function(...t){if(h.apply(this,t),!this.parent.options.fade)return;const i=this.target-this.x,s=this.cells[0].x;this.cells.forEach((function(t){t.renderPosition(t.x-s-i)}))},s.prototype.setOpacity=function(t){this.cells.forEach((function(i){i.element.style.opacity=t}))};const n=t.prototype;t.createMethods.push("_createFade"),n._createFade=function(){this.fadeIndex=this.selectedIndex,this.prevSelectedIndex=this.selectedIndex,this.on("select",this.onSelectFade),this.on("dragEnd",this.onDragEndFade),this.on("settle",this.onSettleFade),this.on("activate",this.onActivateFade),this.on("deactivate",this.onDeactivateFade)};const o=n.updateSlides;n.updateSlides=function(...t){o.apply(this,t),this.options.fade&&this.slides.forEach((function(t,i){t.setOpacity(i==this.selectedIndex?1:0)}),this)},n.onSelectFade=function(){this.fadeIndex=Math.min(this.prevSelectedIndex,this.slides.length-1),this.prevSelectedIndex=this.selectedIndex},n.onSettleFade=function(){delete this.didDragEnd,this.options.fade&&(this.selectedSlide.setOpacity(1),this.slides[this.fadeIndex]&&this.fadeIndex!=this.selectedIndex&&this.slides[this.fadeIndex].setOpacity(0))},n.onDragEndFade=function(){this.didDragEnd=!0},n.onActivateFade=function(){this.options.fade&&this.element.classList.add("is-fade")},n.onDeactivateFade=function(){this.options.fade&&(this.element.classList.remove("is-fade"),this.slides.forEach((function(t){t.setOpacity("")})))};const c=n.positionSlider;n.positionSlider=function(...t){this.options.fade?(this.fadeSlides(),this.dispatchScrollEvent()):c.apply(this,t)};const u=n.positionSliderAtSelected;n.positionSliderAtSelected=function(...t){this.options.fade&&this.setTranslateX(0),u.apply(this,t)},n.fadeSlides=function(){if(this.slides.length<2)return;const t=this.getFadeIndexes(),i=this.slides[t.a],s=this.slides[t.b],h=this.wrapDifference(i.target,s.target);let n=this.wrapDifference(i.target,-this.x);n/=h,i.setOpacity(1-n),s.setOpacity(n);let o=t.a;this.isDragging&&(o=n>.5?t.a:t.b),null!=this.fadeHideIndex&&this.fadeHideIndex!=o&&this.fadeHideIndex!=t.a&&this.fadeHideIndex!=t.b&&this.slides[this.fadeHideIndex].setOpacity(0),this.fadeHideIndex=o},n.getFadeIndexes=function(){return this.isDragging||this.didDragEnd||void 0===this.fadeIndex?this.options.wrapAround?this.getFadeDragWrapIndexes():this.getFadeDragLimitIndexes():{a:this.fadeIndex,b:this.selectedIndex}},n.getFadeDragWrapIndexes=function(){const t=this.slides.map((function(t,i){return this.getSlideDistance(-this.x,i)}),this),s=t.map((function(t){return Math.abs(t)})),h=Math.min(...s),n=s.indexOf(h);return{a:n,b:i.modulo(n+(t[n]>=0?1:-1),this.slides.length)}},n.getFadeDragLimitIndexes=function(){let t=0;for(let i=0;i<this.slides.length-1&&!(-this.x<this.slides[i].target);i++)t=i;return{a:t,b:t+1}},n.wrapDifference=function(t,i){let s=i-t;if(!this.options.wrapAround)return s;const h=s+this.slideableWidth,n=s-this.slideableWidth;return Math.abs(h)<Math.abs(s)&&(s=h),Math.abs(n)<Math.abs(s)&&(s=n),s};const e=n._getWrapShiftCells;n._getWrapShiftCells=function(...t){this.options.fade||e.apply(this,t)};const f=n.shiftWrapCells;n.shiftWrapCells=function(...t){this.options.fade||f.apply(this,t)}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{F as t}from"./nano-slides-
|
4
|
+
import{F as t}from"./nano-slides-B1zM-u4Y.js";import"./index-D6WdRvhp.js";import"./renderer-BhDJHRB-.js";t.createMethods.push("_createFullscreen");const i=t.prototype;i._createFullscreen=function(){this.isFullscreen=!1,this.options.fullscreen&&(this.viewFullscreenButton=new n("view",this),this.exitFullscreenButton=new n("exit",this),this.on("activate",this._changeFullscreenActive),this.on("deactivate",this._changeFullscreenActive))},i._changeFullscreenActive=function(){const t=this.isActive?"appendChild":"removeChild";this.element[t](this.viewFullscreenButton.element),this.element[t](this.exitFullscreenButton.element);const i=this.isActive?"activate":"deactivate";this.viewFullscreenButton[i](),this.exitFullscreenButton[i]()},i.viewFullscreen=function(){this._changeFullscreen(!0),this.focus()},i.exitFullscreen=function(){this._changeFullscreen(!1)},i._changeFullscreen=function(t){if(this.isFullscreen==t)return;this.isFullscreen=t;const i=t?"add":"remove";document.documentElement.classList[i]("is-flickity-fullscreen"),this.element.classList[i]("is-fullscreen"),this.resize(),this.isFullscreen&&this.reposition(),this.dispatchEvent("fullscreenChange",null,[t])},i.toggleFullscreen=function(){this._changeFullscreen(!this.isFullscreen)};const s=i.setGallerySize;function n(t,i){this.name=t,this.createButton(),this.createIcon(),this.onClick=function(){i[t+"Fullscreen"]()},this.clickHandler=this.onClick.bind(this)}i.setGallerySize=function(){this.options.setGallerySize&&(this.isFullscreen?this.viewport.style.height="":s.call(this))},t.keyboardHandlers[27]=function(){this.exitFullscreen()},n.prototype.createButton=function(){const t=this.element=document.createElement("button");t.className="flickity-button flickity-fullscreen-button flickity-fullscreen-button-"+this.name,t.setAttribute("type","button");const i=(s=this.name+" full-screen")[0].toUpperCase()+s.slice(1);var s;t.setAttribute("aria-label",i),t.title=i};const h="http://www.w3.org/2000/svg",c={view:"M15,20,7,28h5v4H0V20H4v5l8-8Zm5-5,8-8v5h4V0H20V4h5l-8,8Z",exit:"M32,3l-7,7h5v4H18V2h4V7l7-7ZM3,32l7-7v5h4V18H2v4H7L0,29Z"};n.prototype.createIcon=function(){const t=document.createElementNS(h,"svg");t.setAttribute("class","flickity-button-icon"),t.setAttribute("viewBox","0 0 32 32");const i=document.createElementNS(h,"path");i.setAttribute("d",c[this.name]),t.appendChild(i),this.element.appendChild(t)},n.prototype.activate=function(){this.element.addEventListener("click",this.clickHandler)},n.prototype.deactivate=function(){this.element.removeEventListener("click",this.clickHandler)},t.FullscreenButton=n;
|
@@ -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-B1zM-u4Y.js";import"./index-D6WdRvhp.js";import"./renderer-BhDJHRB-.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;
|
@@ -0,0 +1,4 @@
|
|
1
|
+
/*!
|
2
|
+
* Custom elements for Nanopore-Digital Web applications
|
3
|
+
*/
|
4
|
+
import{f as t,h as n,F as e,g as o,i,d as s,e as a,r,c as l,a as h}from"./index-D6WdRvhp.js";import{h as c,t as d}from"./renderer-BhDJHRB-.js";import{c as p}from"./math-BEqsTfVK.js";import{d as b}from"./throttle-C93FMm2Z.js";import{i as _,f as u}from"./scroll-CRQg8Vf0.js";import{c as f}from"./index-BC1-owN1.js";const m="nano-tbl",w=(t,n)=>{const e=globalThis[n];return null!=e&&t instanceof e},y=t=>{if(null!=t){if(w(t,"ArrayBuffer")||w(t,"MessagePort")||w(t,"ImageBitmap")||w(t,"OffscreenCanvas"))return[t];if("object"==typeof t)return t.constructor===Object&&(t=Object.values(t)),Array.isArray(t)?t.flatMap(y):y(t.buffer)}return[]};let v=0,g=0;const x=new Map,k=new Map,$=(n,e,o)=>{const i=new Worker(n,{name:e});return i.addEventListener("message",(({data:n})=>{if(n){const e=n[0],i=n[1],s=n[2];if(e===o){const e=n[3],[o,a,r]=x.get(i);if(x.delete(i),e){const n=e.isError?Object.assign(new Error(e.value.message),e.value):e.value;t(n),a(n)}else r&&r.forEach((t=>k.delete(t))),o(s)}else if(e===o+".cb")try{k.get(i)(...s)}catch(n){t(n)}}})),i},z=(t,n,e)=>(...o)=>new Promise(((i,s)=>{let a=v++,r=0,l=o.length,h=[i,s];for(x.set(a,h);r<l;r++)if("function"==typeof o[r]){const t=g++;k.set(t,o[r]),o[r]=[n+".cb",t],(h[2]=h[2]||[]).push(t)}const c=t=>t.postMessage([n,a,e,o],y(o));t.then?t.then(c):c(t)})),C=import("./table.worker-Dq_pppel.js").then((t=>t.worker)),S=z(C,"stencil.table.worker","createWorkerStore"),R=z(C,"stencil.table.worker","syncConfigToWorker"),T=z(C,"stencil.table.worker","syncDataToWorker"),I=z(C,"stencil.table.worker","workerFilter"),B=z(C,"stencil.table.worker","workerSearch"),D=z(C,"stencil.table.worker","workerSort");function F(t){const n=JSON.parse(JSON.stringify(t));return t.forEach((t=>{t?.sortCompareFn&&(n.find((n=>n.prop===t.prop)).sortCompareFn=t.sortCompareFn.toString())})),n}const P=new WeakMap;function A(t,n){const e=M(),o=e.config.state.columns,i=e.data.state.rows,s=o[n],a=s?.prop,r=i[t];return{prop:a,cellModel:r?r[o[n].prop]:"",column:s,rowIndex:t,rowModel:r}}function E(t,n){if(!n)return t;const e={...n,...t};return n.class&&("object"==typeof n.class&&"object"==typeof e.class?e.class={...n.class,...e.class}:"string"==typeof n.class&&"object"==typeof e.class?e.class[n.class]=!0:"string"==typeof e.class&&"string"==typeof n.class&&(e.class+=" "+n.class)),n.style&&(e.style={...n.style,...e.style}),e}function M(){return t=o(i()),P.get(t);var t}function N(t){const o=t?.columnTemplate;return o?o(n,t):n(e,null,t.title)}function j(t,n,e=!1){const o={[`${m}__${t}`]:!0,[`${m}__pin`]:!!n,[`${m}__pin--top`]:"top"===n,[`${m}__pin--bottom`]:"bottom"===n};return e?O(o):o}function O(t){let n="";return Object.entries(t).forEach((([t,e])=>{e&&(n+=t+" ")})),n}const H=({column:t,onColumnSortClick:n,defaults:o})=>{if(t.hidden)return c(e,null);function i(){return!!o.sortable&&!1!==t.sortable||!o.sortable&&!0===t.sortable}let s={};t.columnProperties&&(s=t.columnProperties(t)||s);const a={class:{...j("th",t.pinned),[`${m}__pin--start`]:"start"===t.pinned,[`${m}__pin--end`]:"end"===t.pinned,[`${m}__ordered`]:!!t.order,[`${m}__filtered`]:null!=t.filter}};let r=s?E(a,s):a;if(!N(t))return c(e,null);if(r=Number(r.colSpan)>1?{...r,scope:"colgroup"}:{...r,scope:"col"},i()){const n=t.order?"asc"===t.order?"ascending":"descending":"none";r={...r,"aria-sort":n}}return c("th",{...r,key:t.prop},i()?c("button",{class:{[`${m}__order-btn`]:!0,[`${m}__cell-content`]:!0},onClick:function(e){let o;switch(t.order){case"asc":o="desc";break;case"desc":o=null;break;default:o="asc"}n(o,t.prop,e.target.closest("th"))}},N(t),null!=t.filter&&c("nano-icon",{name:"light/filter"}),!!t.order&&c("nano-icon","desc"===t.order?{name:"solid/arrow-down-long"}:{name:"solid/arrow-up-long"}),c("div",{class:`${m}__status-icons`},c("nano-icon",{name:"light/chevron-down"}))):c("div",{class:`${m}__cell-content`},N(t),null!=t.filter&&c("nano-icon",{name:"light/bars-filter"})))},W=(t,n=!1)=>{const e=M().config.state.columns[t],o={[`${m}__td`]:!0,[`${m}__ordered`]:!!e.order,[`${m}__pin`]:!!e.pinned,[`${m}__pin--start`]:"start"===e.pinned,[`${m}__pin--end`]:"end"===e.pinned};return n?O(o):o},L=({rowIndex:t,colIndex:n,nestedContent:o})=>{const s=()=>o?o():function(t,n){const o=M().config.state.columns,s=o[n]?.cellTemplate,a=A(t,n),r=i();if(a.cellModel&&"date"===o[n].type){const t=new Date(a.cellModel);t instanceof Date&&!isNaN(t)&&(a.cellModel=s?t:`${new Date(a.cellModel).toLocaleDateString()} ${new Date(a.cellModel).toLocaleTimeString()}`)}let l=!1,h=s?s(((...t)=>(l=!0,c(...t))),a):void 0;if(h&&r.customRenderer&&void 0===h.t&&!(h instanceof Element)&&"string"!=typeof h&&!l){const t=document.createElement("template"),n=r.customRenderer(h,t.content);h=n&&n.then?n:t}return h||(null!=a.cellModel?c(e,null,a.cellModel?.toString()):"")}(t,n)||c("span",{class:"placeholder"}," ");let a="td";const r=M().config.state.columns[n];if(r.hidden)return c(e,null);let l=function(t,n,e){const o={...e},i=M().config.state.columns[n]?.cellProperties;if(!i)return o;const s=i(A(t,n));return s?E(o,s):o}(t,n,{class:W(n)});r.rowHeader&&(l=Number(l.rowSpan)>1?{...l,scope:"rowgroup"}:{...l,scope:"row"},a="th");const h=t=>{const n=s();return c("div",{ref:t=>{t&&(n instanceof Element?(t.replaceChildren(),t.append(n.content||n)):n.then&&n.then((n=>t.innerHTML=n)))},...t,class:{[`${m}__cell-content`]:!0,[`${m}__cell-content--wrap`]:!!r.wrap},innerHTML:"string"==typeof n&&n.includes("<")?n:void 0},("string"!=typeof n||!n.includes("<"))&&!n.then&&!(n instanceof Element)&&n)};return c(a,{...l},r.autoTooltip&&!r.wrap?c("nano-resize-observe",{notifyContentFit:"x",onNanoResizeContentFitChange:t=>t.target.firstElementChild.disabled=t.detail.x},c("nano-tooltip",{disabled:!0,placement:"top",onNanoShow:t=>t.target.closest(a).style.zIndex="100",onNanoHide:t=>t.target.closest(a).style.zIndex=""},c(h,null),c("span",{slot:"content"},c(s,null)))):c(h,null))},q=(t,n,e)=>{const o=c("div",{...t.wrapperProps,class:{[`${m}__cell-content`]:!0,[`${m}__cell-content--wrap`]:t.wrap}},n);return t.header?c("th",{scope:e,...t.cellProps},o):c("td",{...t.cellProps},o)},J=({rowRenderer:t,rowIndex:n,rowModel:e},o,i)=>{const s=({header:t,wrap:n,cellProps:e,wrapperProps:o},i)=>q({header:t,wrap:n,cellProps:e,wrapperProps:o},i,"row");let a,r={};if(!e){const t=function(t){return{rowModel:M().data.state.rows[t],rowIndex:t}}(n);e=t.rowModel}t?.rowProperties&&(r=t.rowProperties({rowModel:e,rowIndex:n})||r),t?.pinned&&"function"==typeof t.pinned&&(a=t.pinned({rowModel:e,rowIndex:n}));const l=E({class:j("tr",a,!0)},r),h=t?.template,d=t=>i.map(t,((t,n)=>(["td","th"].includes(t.vtag.toString())&&(t.vattrs=E({class:W(n,!0)},t.vattrs)),t)));if(h){let t=h(c,{renderedRow:c("tr",{...l,key:e.__uuid},o),rowModel:e,rowIndex:n},s);return Array.isArray(t)&&(t=i.map(t,((t,n)=>("tr"===t.vtag&&(t.vkey||(t.vkey=`${e.__uuid}_${n}`),t.vattrs=E({class:j("tr",a,!0)},t.vattrs),t.vchildren&&(t.vchildren=d(t.vchildren))),t)))),t}return c("tr",{...l,key:e.__uuid},d(o))},K=({rowRenderer:t},n,e)=>{let o={};t.rowProperties&&(o=t.rowProperties()||{});const i=({header:t,wrap:n,cellProps:e,wrapperProps:o},i)=>q({header:t,wrap:n,cellProps:e,wrapperProps:o},i,"col"),s=t.pinned||null,a={class:j("tr",s)},r=o?E(a,o):a,l=t?.template;if(l){let t=l(c,{renderedRow:c("tr",{...r},n)},i);return Array.isArray(t)&&(t=e.map(t,(t=>("tr"===t.vtag&&(t.vattrs=E({class:j("tr",s,!0)},t.vattrs),t.vchildren&&(t.vchildren=e.map(t.vchildren,(t=>(["td","th"].includes(t.vtag.toString())&&(t.vattrs=E({class:j(t.vtag.toString(),s,!0)},t.vattrs)),t))))),t)))),t}return c("tr",{...r},n)};function Y(t,n){const e=this.host.getRootNode(),o=e.getElementById(t)||document.createElement("style");o.id=t,o.innerHTML=n,o.isConnected||e.append(o)}class X{cachedColMeta=new WeakMap;tableId;tableEle;scrollElement;startColumns;endColumns;topRows;bottomRows;tableDims;constructor(t,n){this.tableEle=t,this.tableId=this.tableEle.id,this.scrollElement=n,this.startColumns=t.querySelector("thead").getElementsByClassName(`${m}__pin--start`),this.endColumns=t.querySelector("thead").getElementsByClassName(`${m}__pin--end`),this.topRows=t.getElementsByClassName(`${m}__pin--top`),this.bottomRows=t.getElementsByClassName(`${m}__pin--bottom`),this.onResize()}get pinnedStart(){return this._pinnedStart}set pinnedStart(t){this._pinnedStart=t,this.handlePinnedStartChange()}_pinnedStart=[];handlePinnedStartChange(){s((()=>{if(this.pinnedStart.length){this.tableEle.classList.add(`${m}__pinned--start`);const t=this.cachedColMeta.get(this.pinnedStart[this.pinnedStart.length-1]);Y(`${this.tableId}-col-start-active-style`,`\n #${this.tableId} tr > :nth-child(${t.idx+1}) {\n --pin-start-active: 1;\n }\n `)}else this.tableEle.classList.remove(`${m}__pinned--start`),Y(`${this.tableId}-col-start-active-style`,"")}))}get pinnedEnd(){return this._pinnedEnd}set pinnedEnd(t){this._pinnedEnd=t,this.handlePinnedEndChange()}_pinnedEnd=[];handlePinnedEndChange(){s((()=>{if(this.pinnedEnd.length){this.tableEle.classList.add(`${m}__pinned--end`);const t=this.cachedColMeta.get(this.pinnedEnd[0]);Y(`${this.tableId}-col-end-active-style`,`\n #${this.tableId} tr > :nth-child(${t.idx+1}) { --pin-end-active: 1; }\n `)}else this.tableEle.classList.remove(`${m}__pinned--end`),Y(`${this.tableId}-col-end-active-style`,"")}))}get cssColDimensionCacheKey(){return this._cssColDimensionCacheKey}set cssColDimensionCacheKey(t){t!==this._cssColDimensionCacheKey&&(this._cssColDimensionCacheKey=t,this.createPinnedColDimensionStyles())}_cssColDimensionCacheKey="";generateCssCacheKey(){let t="";for(const n of this.startColumns){const e=this.cachedColMeta.get(n);t+=`${e.idx}-start-${e.width}`}for(const n of this.endColumns){const e=this.cachedColMeta.get(n);t+=`${e.idx}-start-${e.width}`}this.cssColDimensionCacheKey=t}createPinnedColDimensionStyles(){let t=0,n=0;const e=Array.from(this.startColumns),o=Array.from(this.endColumns).reverse(),i=`\n ${e.map((n=>{const e=this.cachedColMeta.get(n);return t+=e.width-1||-1,`\n #${this.tableId} tr > :nth-child(${e.idx+1}) ~ td,\n #${this.tableId} tr > :nth-child(${e.idx+1}) ~ th {\n --pin-start: ${t-1}px;\n }\n `})).join("")}\n ${o.map((t=>{const e=this.cachedColMeta.get(t);return n+=e.width-1||-1,`\n #${this.tableId} tr > td:has(~ :nth-child(${e.idx+1})),\n #${this.tableId} tr > th:has(~ :nth-child(${e.idx+1})) {\n --pin-end: ${n-1}px;\n }\n `})).join("")}\n `;Y(`${this.tableId}-dimension-style`,i)}getParentOffsets(){const{x:t,y:n}=this.scrollElement.getBoundingClientRect();let e=t,o=n;return this.scrollElement===document.documentElement&&(e=this.scrollElement.offsetLeft,o=this.scrollElement.offsetTop),{offsetX:e,offsetY:o}}assessRows(){if((this.topRows.length||this.bottomRows.length)&&(this.topRows.length&&a((async()=>{let t,n=0;const{offsetY:e}=this.getParentOffsets();for(const o of this.topRows){const{y:i,height:a}=o.getBoundingClientRect(),r=o.parentElement,l=getComputedStyle(o).getPropertyValue("--pin-top"),h=""!==l?parseFloat(l):n;s((()=>{i-e<=h?o.classList.add(`${m}__pinned`,`${m}__pinned--top`):o.classList.remove(`${m}__pinned`,`${m}__pinned--top`),t!==r&&(r.style.setProperty("--pin-top",n-1+"px"),n+=a-1,t=r)}))}})),this.bottomRows.length)){const t=Array.from(this.bottomRows).reverse();a((async()=>{let n,e=0;const{offsetY:o}=this.getParentOffsets();for(const i of t){if(!i.isConnected)continue;const{y:t,height:a}=i.getBoundingClientRect(),r=i.parentElement,l=getComputedStyle(i).getPropertyValue("--pin-bottom"),h=""!==l?parseFloat(l):e;await new Promise((l=>s((()=>{this.tableDims.height+o-(t+a)<=h?i.classList.add(`${m}__pinned`,`${m}__pinned--bottom`):i.classList.remove(`${m}__pinned`,`${m}__pinned--bottom`),n!==r&&(r.style.setProperty("--pin-bottom",e-1+"px"),e+=a-1,n=r),l()}))))}}))}}async assessCols(){if(!this.startColumns.length&&!this.endColumns.length)return;let t,n,e;const o=new Promise((o=>{this.startColumns.length&&a((()=>{const{offsetX:i}=this.getParentOffsets();let s=i;e=Array.from(this.startColumns[0].parentElement.children);for(const o of this.startColumns)t=o.getBoundingClientRect(),this.cachedColMeta.set(o,{width:t.width,idx:e.indexOf(o)}),n=this.pinnedStart.find((t=>t===o)),t.x<s?n||(this.pinnedStart=[...this.pinnedStart,o]):n&&(this.pinnedStart=this.pinnedStart.filter((t=>t!==o))),s+=t.width;this.endColumns.length||o()})),this.endColumns.length&&a((()=>{const i=Array.from(this.endColumns).reverse();e=Array.from(this.endColumns[0].parentElement.children);const{offsetX:s}=this.getParentOffsets();let a=0;for(const o of i)t=o.getBoundingClientRect(),this.cachedColMeta.set(o,{width:t.width,idx:e.indexOf(o)}),n=this.pinnedEnd.find((t=>t===o)),this.tableDims.width+s-t.right<=a?n||(this.pinnedEnd=[o,...this.pinnedEnd]):n&&(this.pinnedEnd=this.pinnedEnd.filter((t=>t!==o))),a+=t.width;o()}))}));await o,this.generateCssCacheKey()}cacheX=0;cacheY=0;onScroll(t){this.cacheX!==t.x&&(this.cacheX=t.x,this.assessCols()),this.cacheY!==t.y&&(this.cacheY=t.y,this.assessRows())}onResize(){this.tableDims={width:this.scrollElement.clientWidth,height:this.scrollElement.clientHeight},this.assessCols(),this.assessRows()}}let V=0;const Q=class{constructor(t){r(this,t),this.nanoTblReady=l(this,"nanoTblReady",7),this.nanoTblBlockRendered=l(this,"nanoTblBlockRendered",7),this.nanoTblBeforeSort=l(this,"nanoTblBeforeSort",7),this.nanoTblAfterSort=l(this,"nanoTblAfterSort",7),this.nanoTblBeforeFilter=l(this,"nanoTblBeforeFilter",7),this.nanoTblAfterFilter=l(this,"nanoTblAfterFilter",7),this.nanoTblBeforeSearch=l(this,"nanoTblBeforeSearch",7),this.nanoTblAfterSearch=l(this,"nanoTblAfterSearch",7),this.nanoTblBeforeEdit=l(this,"nanoTblBeforeEdit",7),this.debounceSetLoading=b(this.debounceSetLoading.bind(this),50)}customRenderer;scrollable=!1;caption;showCaption=!1;loading=void 0;get _loading(){return void 0!==this.loading?this.loading:this.internalLoading}set _loading(t){void 0===this.loading&&this.debounceSetLoading(t)}debounceSetLoading(t){this.internalLoading=t}internalLoading=!0;placeholderSize=10;rows;handleRowsChange(){this.rows?(this._loading=!0,Promise.resolve(this.rows).then((async t=>{await function(t,n){const e=P.get(t);if(!e)return;const o=e.config.state.columns,i=o.filter((t=>"date"===t.type)).reduce(((t,n)=>[...t,n.prop]),[]),s=o.filter((t=>!t.type));return n=n.map(((t,n)=>(s.length&&0===n&&(e.config.state.columns=o.map((n=>{var e;return s.includes(n)&&t[n.prop]&&!n.type&&(n.type=(e=t[n.prop])instanceof Date?"date":["number","string","boolean"].includes(typeof e)?typeof e:"unknown","date"===n.type&&i.push(n.prop)),n}))),i.forEach((n=>{const e=new Date(t[n]);e&&Number(e)&&(t[n]=Number(e))})),t.__index=n,t.__uuid=p(o.map((n=>t[n.prop])).join()),t))),e.data.state.rows=n,e.general.state.workerId?T(e.general.state.workerId,n):void 0}(this.host,t),this.customFilterApplied?this.customFilterApplied=!1:this.currentFilters="",this.currentSort="",await this.columnInit(),this.isReady||requestAnimationFrame((()=>this.setInitialBlockDimension())),this._loading=!1,this.tablePinnedService&&this.tablePinnedService.assessRows()}))):this._loading=!0}columns=[];async handleColsChange(){await function(t,n){const e=P.get(t);if(e)return e.config.state.columns=n,e.general.state.workerId?R(e.general.state.workerId,F(n)):void 0}(this.host,this.columns),this.isReady&&this.columnInit()}headRender={pinned:"top"};rowRender;footRender={pinned:"bottom"};showFooter=!1;perBlock=50;get blocksLength(){return this.blocks.length}searchTerm;customFilterFn;customSortFn;defaultSort=!0;handleSearchTermChange(){this.searchStart()}showPaginateSpinner=!1;virtualTotalItems=0;virtualTotalItemsChangeHandler(){this.setBlocks()}get appliedFilters(){return this.filters}nanoTblReady;nanoTblBlockRendered;nanoTblBeforeSort;nanoTblAfterSort;nanoTblBeforeFilter;nanoTblAfterFilter;nanoTblBeforeSearch;nanoTblAfterSearch;nanoTblBeforeEdit;async resetSorting(){const t=this.columns.find((t=>!!t.order));if(t)return this.sortStart(null,t.prop)}async addSort(t,n){const e=this.columns.find((n=>n.prop===t));if(!e)throw new Error("Cannot find column with "+t);return this.sortStart(n,e.prop)}async resetFilters(){return this.filters=[],this.filterStart()}async addFilters(t,n=!0){return n||(this.filters=[]),this.filterStart(t,n)}async removeFilters(t){return this.filters=this.filters.filter((n=>!t.includes(n.prop))),this.filterStart()}async updateRow(t,n){this.rows.splice(n,1,t),this.handleRowsChange()}get host(){return o(this)}renderId="tbl-"+V++;store;filters=[];currentFilters="[]";currentSort="";tableEle;topAnchorEle;activeWatcherIo;tablePinnedService;customFilterApplied=!1;blocks=[];activeBlocks=[0,1];measureHeight=0;blockElements;blockHeights=[];set measureEle(t){if(!t)return;const n=t.getBoundingClientRect().height;this.measureHeight=Math.abs(this.measureHeight-n)<5?this.measureHeight:n,this.unitHeight=t.querySelector("tr")?.getBoundingClientRect().height||this.unitHeight}unitHeight=0;get scrollParent(){return this._scrollParent}set scrollParent(t){t!==this._scrollParent&&(this._scrollParent&&(this._scrollParent===document.documentElement?document:this._scrollParent).removeEventListener("scroll",this.scrollHandler),(t===document.documentElement?document:t).addEventListener("scroll",this.scrollHandler),this._scrollParent=t)}_scrollParent;get primaryBlockIndex(){return this._primaryBlockIndex}set primaryBlockIndex(t){this._primaryBlockIndex!==t&&(this._primaryBlockIndex=t,this.nanoTblBlockRendered.emit({block:t,totalBlocks:this.blockElements.length}))}_primaryBlockIndex;get isReady(){return this._isReady}set isReady(t){t!==this._isReady&&(this._isReady=t,this.isReady&&requestAnimationFrame((()=>this.handleReady())))}_isReady=!1;handleReady(){const t=window.location.hash;if(t.length>1)try{const n=document.querySelector(t);n&&n.scrollIntoView()}catch(t){}this.nanoTblReady.emit()}sortStart=async(t,n,e)=>{if(this.currentSort!==t+":"+n&&(this._loading=!0,!this.nanoTblBeforeSort.emit({column:n,order:t}).defaultPrevented)){if(this.currentSort=t+":"+n,this.scrollToTop(e),this.customSortFn)try{if(!0===await this.customSortFn(n,t))return this.sortComplete(t,n),void(this._loading=!1)}catch(t){return console.warn("custom sort failed",t),this.currentSort="",void(this._loading=!1)}try{await async function(t,n,e){const o=P.get(t);if(o&&o.general.state.workerId)try{o.data.state.rows=await D(o.general.state.workerId,n,e)}catch(t){console.warn(t)}}(this.host,n,t),this.sortComplete(t,n)}catch(t){console.warn("sort failed",t),this.currentSort=""}finally{this.blocks.length&&(this._loading=!1)}}};sortComplete(t,n){this.columns=this.columns.map((e=>e.prop===n?{...e,order:t}:{...e,order:null})),this.nanoTblAfterSort.emit({column:n,order:t})}async searchStart(){if(this._loading=!0,!this.nanoTblBeforeSearch.emit({term:this.searchTerm}).defaultPrevented){this.scrollToTop();try{await async function(t,n){const e=P.get(t);if(e&&e.general.state.workerId)try{e.data.state.rows=await B(e.general.state.workerId,n)}catch(t){console.warn(t)}}(this.host,this.searchTerm),this.nanoTblAfterSearch.emit({term:this.searchTerm})}catch(t){console.warn("search failed",t)}finally{this._loading=!1}}}async filterStart(t,n=!0){if(t&&(this.filters=n?[...this.filters.filter((n=>!t.find((t=>t.prop===n.prop)))),...t]:t),this.currentFilters!==JSON.stringify(this.filters)&&(this._loading=!0,!this.nanoTblBeforeFilter.emit({filters:this.filters}).defaultPrevented)){if(this.currentFilters=JSON.stringify(this.filters),this.scrollToTop(),this.customFilterFn)try{if(!0===await this.customFilterFn(this.filters))return this.customFilterApplied=!0,await this.filterComplete(),void(this._loading=!1)}catch(t){return console.warn("custom filter failed",t),this.currentFilters="",void(this._loading=!1)}try{await this.filterComplete()}catch(t){console.warn("filter failed",t)}finally{this._loading=!1}}}async filterComplete(){this.columns=this.columns.map((t=>{const n=this.filters.find((n=>n.prop===t.prop));return n&&("boolean"!=typeof n.filter&&n.filter.length||"boolean"==typeof n.filter)?t.filter=n.filter:(null!=t.filter||t.filter&&"boolean"!=typeof t.filter&&!t.filter.length)&&(t.filter=void 0),t})),await async function(t,n){const e=P.get(t);if(e&&e.general.state.workerId)try{e.data.state.rows=await I(e.general.state.workerId,n)}catch(t){console.warn(t)}}(this.host,this.filters),this.nanoTblAfterFilter.emit({filters:this.filters})}scrollToTop(t){if(!this.scrollParent)return;const n=this.scrollParent.style?.scrollBehavior,e=this.scrollParent.scrollLeft;this.scrollParent.style.scrollBehavior="auto",this.topAnchorEle&&!_(this.topAnchorEle,.1)&&this.host.scrollIntoView(),t&&!_(t,1)&&setTimeout((()=>t.scrollIntoView({block:"start"})),500),e&&(this.scrollParent.scrollLeft=e),n&&(this.scrollParent.style.scrollBehavior=n),this.scrollHandler()}setMeasureElement(){return new Promise((t=>{a((()=>{this.measureEle=this.blockElements.find((t=>!t?.classList?.contains(`${m}__inactive`))),t()}))}))}setInitialBlockDimension(){if(!this.blockElements?.length)return;const t=async()=>(await this.setMeasureElement(),!!this.unitHeight);new Promise((n=>{t().then((async e=>{if(e)n();else{const e=new IntersectionObserver((async()=>{await t()&&(n(),e.disconnect())}),{root:this.scrollParent});e.observe(this.tableEle)}}))})).then((()=>{requestAnimationFrame((()=>this.isReady=!0))}))}async columnInit(){this.filters=this.columns.filter((t=>null!=t.filter)).map((t=>{const{filter:n,prop:e}=t;return{prop:e,filter:n}})),this.searchTerm&&await this.searchStart(),this.filters.length&&await this.filterStart();const t=this.columns.find((t=>!!t.order));t&&await this.sortStart(t.order,t.prop),this.tablePinnedService&&this.tablePinnedService.assessCols()}setBlocks(){const t=this.store.data.state.rows;if(!t.length)return void(this.blocks=[]);let n=1;const e=this.virtualTotalItems>t.length?this.virtualTotalItems:t.length;let o=[];const i=[];for(;n<=e;n++)o.push(this.store.data.state.rows[n-1]||{__uuid:""}),n%this.perBlock==0&&(i.push({rows:o,__uuid:p(o.map((t=>t.__uuid)).join())}),o=[]);o.length&&i.push({rows:o,__uuid:p(o.map((t=>t.__uuid)).join())}),this.blocks=i}getBlockHeight(t){if(this.blockHeights.length){const n=this.blockHeights.find((n=>n.blockIndex===t));if(n&&n.height)return n.height}const n=this.blocks[t].rows.length;return n===this.perBlock&&this.measureHeight?this.measureHeight:this.unitHeight?this.unitHeight*n:100}setBlockHeight(){this.activeBlocks.forEach((t=>{const n=this.blockElements[t];n&&a((()=>{if(n.classList.contains(`${m}__inactive`))return;const e=n.getBoundingClientRect().height,o=this.blockHeights.findIndex((n=>n.blockIndex===t));o>-1?this.blockHeights[o]={height:e,blockIndex:t}:this.blockHeights.push({height:e,blockIndex:t})}))}))}scrollHandler=()=>{let t=0;this.store?.general.state.isActive&&this.rows&&(void 0===this.primaryBlockIndex&&(this.primaryBlockIndex=0),a((()=>{t=void 0!==this.scrollParent.scrollTop?this.scrollParent.scrollTop:window.scrollY,t+=this.host.offsetTop,this.tablePinnedService&&this.tablePinnedService.onScroll({x:void 0!==this.scrollParent.scrollLeft?this.scrollParent.scrollLeft:window.scrollX,y:t});let n=this.host.offsetTop,e=0;const o=this.blocks.length;for(;e<o&&t>=n;){if(n+=this.getBlockHeight(e),t<n){const t=[e,e+1];t.toString()!==this.activeBlocks.toString()&&(this.activeBlocks=t),this.primaryBlockIndex=e}e++}})))};processSlots(){this.caption||this.host.querySelector('[slot="caption"]')||console.error("For accessibility you must set a `caption` prop or use the `caption` slot")}setupActiveWatcher(){this.host&&this.scrollParent&&this.store&&(this.activeWatcherIo&&(this.activeWatcherIo.disconnect(),this.activeWatcherIo=void 0),(this.activeWatcherIo=new IntersectionObserver((([t])=>{this.store.general.state.isActive=!!t.isIntersecting}),{root:this.scrollParent,threshold:0})).observe(this.scrollable?this.tableEle:this.host))}async componentWillLoad(){this.store=await async function(t,n,e,o){const i={data:f({rows:[]}),config:f({columns:n}),general:f({workerId:null,scrollParent:e,host:t,isReady:o})},s=await S(i.data.state.rows,F(i.config.state.columns));return i.general.state.workerId=s,P.set(t,i),i.data.use({reset:()=>{i.general.state.workerId&&T(i.general.state.workerId,null)},dispose:()=>{i.general.state.workerId&&T(i.general.state.workerId,null)}}),i.config.use({reset:()=>{i.general.state.workerId&&R(i.general.state.workerId,null)},dispose:()=>{i.general.state.workerId&&R(i.general.state.workerId,null)}}),i}(this.host,this.columns,this.scrollParent,this.isReady),this.handleRowsChange(),this.store.general.onChange("isActive",(()=>{this.scrollHandler()})),this.store.data.onChange("rows",(()=>this.setBlocks())),this.processSlots(),this.setBlocks(),this.scrollable||(this.scrollParent=u(this.host),this.setupActiveWatcher())}connectedCallback(){this.scrollable||(this.scrollParent=u(this.host),this.setupActiveWatcher())}componentDidLoad(){this.setInitialBlockDimension(),this.scrollable&&(this.scrollParent=this.host.querySelector(d("nano-masked-overflow")).shadowRoot.querySelector(".onav__scroller"),this.setupActiveWatcher()),this.tablePinnedService||(this.tablePinnedService=new X(this.tableEle,this.scrollParent))}componentShouldUpdate(t,n,e){if(["rows","columns"].includes(e))return!1}componentWillRender(){}componentDidRender(){this.setMeasureElement().then((()=>this.setBlockHeight()))}disconnectedCallback(){this.activeWatcherIo&&(this.activeWatcherIo.disconnect(),this.activeWatcherIo=void 0,(this.scrollParent===document.documentElement?document:this.scrollParent).removeEventListener("scroll",this.scrollHandler))}render(){return this.blockElements=[],c(h,{class:"nano-data-table"},c("div",{class:`${m}__top-anchor`,ref:t=>this.topAnchorEle=t}," "),c("nano-resize-observe",{onNanoResize:()=>{this.tablePinnedService&&this.tablePinnedService.onResize()}}),(t=>this.scrollable?c("nano-masked-overflow",{hideScrollbars:!1,scrollControls:!1,label:this.caption},t):c("div",null,t))(c("div",{class:`${m}__wrap`},c("nano-progress-bar",{class:{[`${m}__progress-bar`]:!0,[`${m}__progress-bar--show`]:this._loading}},c("progress",null)),c("table",{"aria-rowcount":this.store.data.state.rows.length,"aria-colcount":this.store.config.state.columns.length,class:`${m}`,ref:t=>this.tableEle=t,id:"nano-data-table-"+this.renderId,"aria-busy":this._loading||void 0},c("caption",{class:{[`${m}__caption`]:!0,[`${m}__caption--hide`]:!this.showCaption}},c("slot",{name:"caption"},this.caption)),c("thead",null,c(K,{rowRenderer:this.headRender},this.store.config.state.columns.map((t=>[c(H,{column:t,headRenderer:this.headRender,onColumnSortClick:this.sortStart,defaults:{sortable:this.defaultSort}})])))),this._loading&&!this.blocks.length&&c("tbody",{class:`${m}__active ${m}__loading`},[...Array(this.placeholderSize).keys()].map((t=>c("tr",null,this.store.config.state.columns.map(((n,e)=>c(L,{rowIndex:t,colIndex:e,nestedContent:()=>c("span",{class:"n-loader-skeleton"},c("span",null,"Content loading"))}))))))),c("tr",{hidden:!!this._loading||!!this.blocks.length},c("th",{class:`${m}__th`,colSpan:this.store.config.state.columns.length},c("div",{class:"nano-tbl__cell-content nano-tbl__cell-content--no-result"},c("slot",{name:"no-results"},"No results found")))),this.blocks.map(((t,n)=>c("tbody",{key:t.__uuid,id:`tbody-${this.renderId}-${n}`,ref:t=>{this.blockElements.push(t)},class:{[`${m}__inactive`]:!this.activeBlocks.includes(n),[`${m}__active`]:this.activeBlocks.includes(n)}},this.activeBlocks.includes(n)?t.rows.map(((t,e)=>{const o=n>0?n*this.perBlock+e:e;return c(J,{rowRenderer:this.rowRender,rowModel:t,rowIndex:o},this.store.config.state.columns.map(((t,n)=>c(L,{rowIndex:o,colIndex:n}))))})):c("tr",{class:`${m}__tr--placeholder`},c("td",{colSpan:this.store.config.state.columns.length,style:{height:this.getBlockHeight(n)+"px"}}))))),this.showFooter&&c("tfoot",null,c(K,{rowRenderer:this.footRender},this.store.config.state.columns.map((t=>[c(H,{column:t,headRenderer:this.footRender,onColumnSortClick:this.sortStart,defaults:{sortable:this.defaultSort}})]))))),!!this.blocks.length&&this.showPaginateSpinner&&c("nano-spinner",{class:{[`${m}__spinner`]:!0,[`${m}__spinner--show`]:this._loading}}))))}static get watchers(){return{rows:["handleRowsChange"],columns:["handleColsChange"],searchTerm:["handleSearchTermChange"],virtualTotalItems:["virtualTotalItemsChangeHandler"]}}};Q.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 }.nano-data-table {\n /**\n * @prop --table-padding. The padding of the table cells. Defaults to `var(--table-compact-padding)`\n * @prop --table-border-color. The border color of the table cells. Defaults to `var(--nano-color-neutral-200)`\n * @prop --table-border-color-header. The border color of the table header and footer cells. Defaults to `var(--nano-color-primary-1000)`\n * @prop --table-background. The background color of the table cells. Defaults to `var(--nano-color-base-0)`\n * @prop --table-max-col-width. The maximum width of the table columns. Defaults to `clamp(200px, 500px, 50vw)`\n * @prop --table-ordered-bg. The background color of the ordered table rows. Defaults to `var(--nano-color-neutral-100)`\n * @prop --table-wrapper-max-height: maximum height of the table when table is scrollable. Defaults to 80vh;\n * @prop --table-wrapper-max-width: maximum width of the table when table is scrollable. Defaults to 100%;\n */\n --table-padding: var(--nano-spacing-sm) calc(var(--nano-spacing-md) - (var(--nano-spacing-md) / 3));\n --table-border-color: var(--nano-color-neutral-200);\n --table-border-color-header: var(--nano-color-primary-1000);\n --table-background: var(--nano-color-base-0);\n --table-max-col-width: clamp(200px, 500px, 50vw);\n --table-ordered-bg: var(--nano-color-neutral-100);\n --table-wrapper-max-height: 80vh;\n --table-wrapper-max-width: 100%;\n display: block;\n inline-size: 100%;\n color: var(--nano-color-neutral-1400);\n container-type: inline-size;\n --isLtR: 1;\n}\n.nano-data-table:dir(rtl) {\n --isLtR: -1;\n}\n.nano-data-table .nano-sortable__dragged {\n background: var(--nano-color-base-0);\n opacity: 0.9;\n box-shadow: var(--nano-shadow-l0);\n z-index: 10 !important;\n}\n\n.nano-tbl__wrap {\n display: table;\n min-inline-size: 100%;\n}\n.nano-data-table:not([scrollable=false]) .nano-tbl__wrap {\n max-inline-size: var(--table-wrapper-max-width);\n max-block-size: var(--table-wrapper-max-height);\n position: relative;\n display: block;\n}\n.nano-data-table:not([scrollable=false]) .nano-tbl__wrap table {\n margin-block-end: var(--nano-spacing-l);\n}\n\n.nano-data-table:not([scrollable=false]):has(.nano-tbl__pin--start, .nano-tbl__pin--end) .nano-masked-overflow {\n --fade-size: 0;\n}\n\n.nano-tbl {\n text-align: start;\n inline-size: 100%;\n border-spacing: 0 0;\n border-collapse: separate;\n border-inline-end: 1px solid transparent;\n border-block-start: 1px solid transparent;\n position: relative;\n z-index: 1;\n}\n.nano-tbl__top-anchor {\n clip-path: inset(50%);\n block-size: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n inline-size: 1px;\n position: relative;\n}\n.nano-tbl__ordered {\n background-color: var(--table-ordered-bg);\n --table-border-color: var(--nano-color-neutral-300);\n}\n.nano-tbl__order-btn {\n padding: 0;\n border: none;\n outline: none;\n font: inherit;\n background: none;\n appearance: none;\n color: inherit;\n display: flex;\n gap: var(--nano-spacing-sm);\n align-items: center;\n inline-size: 100%;\n}\n.nano-tbl__order-btn:focus-visible {\n outline: var(--nano-focus-ring);\n outline-offset: var(--nano-focus-ring-offset);\n}\n.nano-tbl__status-icons {\n margin-inline: auto 10px;\n display: flex;\n gap: 10px;\n}\n.nano-tbl__progress-bar {\n --height: 0.2125rem;\n position: sticky;\n inset-block-start: 0;\n inset-inline: 0;\n z-index: 10;\n transition: transform 0.25s;\n transform: scale(0);\n inline-size: 100%;\n}\n.nano-tbl__progress-bar--show {\n transform: scale(1);\n}\n.nano-tbl__caption--hide {\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.nano-tbl__td, .nano-tbl__th {\n max-inline-size: var(--table-max-col-width);\n}\nthead .nano-tbl__td .nano-sortable__keyboard-handle, thead .nano-tbl__th .nano-sortable__keyboard-handle {\n position: absolute;\n inset-inline-end: 5px;\n inset-block-start: 50%;\n transform: translateY(-50%);\n background: white;\n z-index: 10;\n}\n.nano-tbl__td.nano-tbl__ordered, .nano-tbl__th.nano-tbl__ordered {\n background-color: var(--table-ordered-bg) !important;\n --table-border-color: var(--nano-color-neutral-300);\n}\n.nano-tbl__cell-content {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.nano-tbl__cell-content--no-result {\n padding-block: var(--nano-spacing-md);\n}\n.nano-tbl__cell-content--wrap {\n white-space: normal;\n overflow: visible;\n}\n.nano-tbl tbody {\n opacity: 1;\n transition: 0.1s ease opacity;\n}\n.nano-tbl tbody.nano-tbl__loading {\n z-index: -1;\n position: relative;\n}\n.nano-tbl tbody.nano-tbl__inactive {\n opacity: 0;\n}\n.nano-tbl tbody .nano-tbl__tr:has(~ .nano-tbl__tr--placeholder) {\n display: none;\n}\n.nano-tbl tbody .nano-tbl__tr--placeholder ~ .nano-tbl__tr {\n display: none;\n}\n.nano-tbl th[scope=row] {\n margin: 0;\n}\n.nano-tbl__tr {\n --base-z: 0;\n}\n.nano-tbl__pin {\n z-index: var(--z, var(--base-z, 0));\n}\n.nano-tbl__pin .nano-tbl__th, .nano-tbl__pin .nano-tbl__td {\n z-index: var(--z, var(--base-z, 0));\n}\n.nano-tbl__pin--start {\n position: sticky;\n inset-inline-start: var(--pin-start, -1px);\n}\n.nano-tbl__pin--start::after {\n content: "";\n position: absolute;\n inset: 0;\n box-shadow: calc(4px * var(--isLtR)) 0 4px -3px rgb(var(--nano-color-base-rgb-1000)/25%);\n opacity: var(--pin-start-active, 0);\n z-index: -1;\n}\n.nano-tbl__pinned--start .nano-tbl__pin--start {\n --z: calc(var(--base-z) + 3) !important;\n}\n.nano-tbl__pin--end {\n position: sticky;\n inset-inline-end: var(--pin-end, -1px);\n max-inline-size: min(50vw, 200px);\n}\n@container (width <= 500px) {\n .nano-tbl__pin--start ~ .nano-tbl__pin--end {\n --z: 0 !important;\n inset-inline-end: auto !important;\n }\n .nano-tbl__pin--start ~ .nano-tbl__pin--end::after {\n display: none !important;\n }\n}\n@media (width <= 500px) {\n .nano-tbl__pin--start ~ .nano-tbl__pin--end {\n --z: 0 !important;\n inset-inline-end: auto !important;\n }\n .nano-tbl__pin--start ~ .nano-tbl__pin--end::after {\n display: none !important;\n }\n}\n.nano-tbl__pin--end::after {\n display: block;\n content: "";\n position: absolute;\n inset: 0;\n box-shadow: calc(-4px * var(--isLtR)) 0 4px -3px rgb(var(--nano-color-base-rgb-1000)/25%);\n opacity: var(--pin-end-active, 0);\n z-index: -1;\n}\n.nano-tbl__pinned--end .nano-tbl__pin--end {\n --z: calc(var(--base-z) + 2);\n}\n.nano-tbl__pin--top .nano-tbl__th, .nano-tbl__pin--top .nano-tbl__td {\n position: sticky;\n inset-block-start: var(--pin-top, -1px);\n}\n.nano-tbl__pin--top .nano-tbl__pin--end, .nano-tbl__pin--top .nano-tbl__pin--start {\n --z: calc(var(--base-z) + 1);\n}\n.nano-tbl__pin--top.nano-tbl__pinned--top {\n --base-z: 4;\n}\ntbody .nano-tbl__pin--top.nano-tbl__pinned--top .nano-tbl__th, tbody .nano-tbl__pin--top.nano-tbl__pinned--top .nano-tbl__td {\n border-block-end: 1px solid var(--table-border-color-header);\n}\n.nano-tbl__pin--bottom .nano-tbl__th, .nano-tbl__pin--bottom .nano-tbl__td {\n position: sticky;\n inset-block-end: var(--pin-bottom, -1px);\n}\n.nano-tbl__pin--bottom .nano-tbl__pin--end, .nano-tbl__pin--bottom .nano-tbl__pin--start {\n --z: calc(var(--base-z) + 1);\n}\n.nano-tbl__pin--bottom.nano-tbl__pinned--bottom {\n --base-z: 5;\n}\n.nano-tbl__pin--bottom.nano-tbl__pinned--bottom:has(.nano-tbl__pin--bottom.nano-tbl__pinned--bottom) .nano-tbl__pin {\n --base-z: 6;\n}\ntbody .nano-tbl__pin--bottom.nano-tbl__pinned--bottom .nano-tbl__th, tbody .nano-tbl__pin--bottom.nano-tbl__pinned--bottom .nano-tbl__td {\n border-block-start: 1px solid var(--table-border-color-header);\n}\n.nano-tbl thead tr:last-of-type td,\n.nano-tbl thead tr:last-of-type th {\n border-block-end: 2px solid var(--table-border-color-header);\n}\n.nano-tbl tfoot tr:first-of-type td,\n.nano-tbl tfoot tr:first-of-type th {\n border-block-start: none;\n}\n.nano-tbl tfoot tr:last-of-type td,\n.nano-tbl tfoot tr:last-of-type th {\n border-block-end: 2px solid var(--table-border-color-header);\n border-block-start: 2px solid var(--table-border-color-header);\n}\n.nano-tbl .unlimited-width {\n max-inline-size: none;\n}\n.nano-tbl__spinner {\n font-size: 1.5rem;\n transition: scale 0.25s;\n scale: 0;\n padding: 0.5rem;\n position: absolute;\n inset-block-end: 0;\n inset-inline-start: calc(50% - 0.75rem);\n z-index: 0;\n}\n.nano-tbl__spinner--show {\n scale: 1;\n position: sticky;\n}';export{Q as N,$ as c}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
export{N as nano_data_table}from"./nano-data-table-
|
4
|
+
export{N as nano_data_table}from"./nano-data-table-TfPKf5LE.js";import"./index-D6WdRvhp.js";import"./renderer-BhDJHRB-.js";import"./math-BEqsTfVK.js";import"./throttle-C93FMm2Z.js";import"./scroll-CRQg8Vf0.js";import"./dom-dabRzt7p.js";import"./index-BC1-owN1.js";
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{h as t,a as i,g as e,r as n,c as r}from"./index-D6WdRvhp.js";import{h as s}from"./renderer-BhDJHRB-.js";const o=(()=>{try{return!!new CSSStyleSheet}catch(t){return!1}})(),a=new WeakMap;function c(i,e,n){(function(t){for(const i in t)if(i in t&&Array.isArray(t[i]))return t[i]}(i)||[]).push(t("style",{type:"text/css","constructible-style":e},n))}function l(t,i,e,n){i.__constructableStyle||(i.__constructableStyle={});const r=t[n.cacheKeyProperty];return i.__constructableStyle[r]||(i.__constructableStyle[r]=new CSSStyleSheet,i.__constructableStyle[r].replace(e)),i.__constructableStyle[r]}const d=class{constructor(t){n(this,t)}grids=[];cacheKey;sSize=300;mSize=550;lSize=800;xlSize=1e3;sCols;mCols;lCols;xlCols;xxlCols;sTpl;mTpl;lTpl;xlTpl;xxlTpl;showHelper=!1;constructSizeArray(){this.grids=[],this.sCols&&this.grids.push({cols:this.sCols,breakpoint:0,name:"s",template:this.sTpl}),this.mCols&&this.grids.push({cols:this.mCols,breakpoint:this.sSize,name:"m",template:this.mTpl}),this.lCols&&this.grids.push({cols:this.lCols,breakpoint:this.mSize,name:"l",template:this.lTpl}),this.xlCols&&this.grids.push({cols:this.xlCols,breakpoint:this.lSize,name:"xl",template:this.xlTpl}),this.xxlCols&&this.grids.push({cols:this.xxlCols,breakpoint:this.xlSize,name:"xxl",template:this.xxlTpl}),this.cacheKey=this.grids.map((t=>`${t.cols}-${t.breakpoint}-${t.template||""}`)).join("")+"-helper-"+this.showHelper}styles=()=>`\n ${this.grids.map((t=>`\n @container (min-width: ${Number(t.breakpoint+1)?Number(t.breakpoint)+1+"px":t.breakpoint}) {\n [cache-key="${this.cacheKey}"].grid {\n --current-grid-size: "grid size: ${t.name}";\n ${t.template?`grid-template: ${t.template};`:`grid-template-columns: repeat(${t.cols}, minmax(calc((100% / ${t.cols}) - var(--grid-col-gap)), 1fr));`}\n }\n ${[...Array(t.cols)].map(((i,e)=>{const n=e+1;return`\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-col-start-${n}"],\n ::slotted([grid-states~="${t.name}-col-start-${n}"]) {\n grid-column-start: ${n} !important;\n }\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-col-span-${n}"],\n ::slotted([grid-states~="${t.name}-col-span-${n}"]) {\n grid-column-end: span ${n} !important;\n }\n `})).join("")}\n ${[...Array(24)].map(((i,e)=>{const n=e+1;return`\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-row-start-${n}"],\n ::slotted([grid-states~="${t.name}-row-start-${n}"]) {\n grid-row-start: ${n} !important;\n }\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-row-span-${n}"],\n ::slotted([grid-states~="${t.name}-row-span-${n}"]) {\n grid-row-end: span ${n} !important;\n }\n `})).join("")}\n ${this.showHelper?`\n [cache-key="${this.cacheKey}"].grid--helper :nth-child(-n+${t.cols}) {\n display: block !important;\n }\n `:""}\n }\n `)).join("")}\n `.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s{2,}/g," ").replace(/\s*([{}:;,])\s*/g,"$1").replace(/\n/g,"");componentWillLoad(){this.constructSizeArray()}render(){return s(i,{key:"74b98156bf6fbb3bf105135be4f461737d7774ac",class:"nano-grid"},s("div",{key:"dda06ec152c7d25ee0e6090e6c301bc8e5e81aac",part:"grid",class:"grid","cache-key":this.cacheKey},s("slot",{key:"175e120e0198bfad25600316aa8a8becf9390866"})),this.showHelper&&s("div",{key:"773d0ca81af12cc416550578e4df88f08b7af3cd",class:"grid grid--helper",part:"helper","cache-key":this.cacheKey},[...Array(24)].map((()=>s("div",{class:"grid__helper-item"})))))}static get watchers(){return{sTpl:["constructSizeArray"],mTpl:["constructSizeArray"],lTpl:["constructSizeArray"],xlTpl:["constructSizeArray"],xxlTpl:["constructSizeArray"],sSize:["constructSizeArray"],mSize:["constructSizeArray"],lSize:["constructSizeArray"],xlSize:["constructSizeArray"],sCols:["constructSizeArray"],mCols:["constructSizeArray"],lCols:["constructSizeArray"],xlCols:["constructSizeArray"],xxlCols:["constructSizeArray"],showHelper:["constructSizeArray"]}}};(function(t,i,e,n){var r,s=arguments.length,o=s<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(i,e,o):r(i,e))||o);s>3&&o&&Object.defineProperty(i,e,o)})([function(n={}){return(r,s)=>{n.cacheKeyProperty||(n.cacheKeyProperty=s);const{componentWillLoad:d,render:h,componentWillRender:m}=r;if(d||console.warn(`ConstructibleStyle requires you to have a \`componentWillLoad\` lifecycle method in \`${r.constructor.name}\`. Failure to add this function may cause ConstructibleStyle to fail due to StencilJS build optimizations.`),o){const t=t=>{if(!t[n.cacheKeyProperty]||a.get(t)&&a.get(t)===t[n.cacheKeyProperty])return;a.set(t,t[n.cacheKeyProperty]);const i=e(t),o="function"==typeof t[s]?t[s]():t[s],c=i.shadowRoot||document;c.adoptedStyleSheets=[...c.adoptedStyleSheets||[],l(t,r,o,n)]};r.componentWillLoad=function(){const i=d&&d.call(this);return t(this),i},r.componentWillRender=function(){const i=m&&m.call(this);return t(this),i}}else r.render=function(){const e="function"==typeof this[s]?this[s]():this[s];let n=h.call(this);if(function(t){for(const e in t)if(e in t&&t[e]===i)return!0;return!1}(n))c(n,r.constructor.name,e);else if(n=t(i,null,n),"attachShadow"in HTMLElement.prototype){if(!r.__constructableStyle){const t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("constructible-style",r.constructor.name),t.innerHTML=e,r.__constructableStyle=t,document.head.appendChild(t)}}else c(n,r.constructor.name,e);return n}}}({cacheKeyProperty:"cacheKey"}),function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)}("design:type",Object)],d.prototype,"styles",void 0),d.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{--grid-col-gap:var(--nano-spacing-md);--grid-row-gap:var(--nano-spacing-md);--grid-align-items:start;--grid-justify-items:normal;--current-grid-size:"grid size: s";container-type:inline-size;display:block}:host .grid{display:grid;gap:var(--grid-row-gap) var(--grid-col-gap);block-size:inherit;min-block-size:inherit;align-items:var(--grid-align-items);justify-items:var(--grid-justify-items)}:host([show-helper]:not([show-helper=false])){position:relative}:host([show-helper]:not([show-helper=false])) .grid--helper{position:absolute;inset:0;pointer-events:none;display:grid !important;overflow:hidden}:host([show-helper]:not([show-helper=false])) .grid--helper::before{content:var(--current-grid-size);font-size:30px;position:absolute;inline-size:100%;inset-inline-start:0;text-align:center;inset-block-start:50%;transform:translateY(-50%);color:rgba(0, 0, 0, 0.2);text-transform:uppercase;z-index:99;pointer-events:none}:host([show-helper]:not([show-helper=false])) .grid__helper-item{background:hsla(204, 80%, 72%, 0.25);block-size:100vh;inline-size:100%}';const h=class{constructor(t){n(this,t),this.nanoImgWillLoad=r(this,"nanoImgWillLoad",7),this.nanoImgDidLoad=r(this,"nanoImgDidLoad",7),this.nanoImgError=r(this,"nanoImgError",7)}io;_srcSet={};get host(){return e(this)}loadSrc;loadError;hasLoaded=!1;imgStates=null;_src;_srcChanged(){this.hasLoaded=!1,this.addIO()}alt;src;srcChanged(){this._src=this.src}srcSet;srcSetChanged(){this.srcSet&&(delete this._srcSet,this._srcSet={},this.imgStates=this.srcSet.split(",").map((t=>{const[i,e]=t.split(" ").filter((t=>t.length));return this._srcSet[i]={src:e,active:!1},i})).join(", "))}lazy=!0;lazyChanged(){this.lazy||this.load()}background;autoHeight="content";nanoImgWillLoad;nanoImgDidLoad;nanoImgError;addIO(){this._src&&!this.hasLoaded&&(this.lazy?"undefined"!=typeof window&&"IntersectionObserver"in window?(this.removeIO(),this.io=new IntersectionObserver((t=>{t[0].isIntersecting&&(this.load(),this.removeIO())})),this.io.observe(this.host)):setTimeout((()=>this.load()),200):this.load())}load(){this.loadError=this.onError,this.loadSrc=this._src,this.nanoImgWillLoad.emit()}onLoad=()=>{this.nanoImgDidLoad.emit(),setTimeout((()=>this.hasLoaded=!0),50)};onError=()=>{this.nanoImgError.emit()};onResize=t=>{Object.entries(t.detail).forEach((([t,i])=>{this._srcSet[t].active=!!i}));const i=[];Object.keys(this._srcSet).sort().forEach((t=>{this._srcSet[t].active&&i.push(this._srcSet[t].src)})),this._src=i.length?i.slice(-1)[0]:this.src};removeIO(){this.io&&(this.io.disconnect(),this.io=void 0)}connectedCallback(){this.srcChanged(),this.srcSetChanged(),this.lazyChanged()}componentDidLoad(){this.addIO()}disconnectedCallback(){this.removeIO()}render(){const t=this.loadSrc?{"background-image":`url(${this.loadSrc})`}:{};return s(i,{key:"a9d5cb1d0be8540d7ea690fd13d92b1f5ec614af",class:"nano-img"},s("div",{key:"1f40afc64a5652f53b224403c59b4f108e5eb044",class:"img"},s("div",{key:"7b3a0b8521888092effb1fc675b0c52bce7faa6f",class:"img__loader n-loader-skeleton"},"Loading"),!!this.background&&s("div",{key:"1f4d59fc6ff3e0be42f18d1db4a099a32d099872",class:{loaded:this.hasLoaded,img__bg:!0,"no-height":"image"===this.autoHeight},style:t},s("slot",{key:"d987180d13fa9ef34868c8e962344da9e0f6b876"})),s("img",{key:"f3d603cf35bf0c37c4e1eb530e9a9ea7d7e81beb",class:{img__image:!0,loaded:this.hasLoaded,hide:this.background,"no-height":"content"===this.autoHeight},decoding:"async",src:this.loadSrc,loading:void 0,alt:this.alt,onLoad:this.onLoad,onError:this.loadError}),s("nano-resize-observe",{key:"cf77dadeb8d5b01ef1afff5e6df5eb6aacad13e6",class:"img__observer",onNanoResizeStateChange:this.onResize,states:this.imgStates})))}static get watchers(){return{_src:["_srcChanged"],src:["srcChanged"],srcSet:["srcSetChanged"],lazy:["lazyChanged"]}}};h.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{--padding:0;display:inline-block;object-fit:cover;object-position:center;background-size:cover;background-position:center}:host *{border-radius:inherit}:host([background]:not([background=false])){display:block}.img{position:relative;object-fit:inherit;object-position:inherit;background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit;flex:1 1 100%;display:flex;flex-direction:column;min-block-size:inherit;min-inline-size:inherit;block-size:inherit;inline-size:inherit;max-block-size:inherit;max-inline-size:inherit;aspect-ratio:inherit}.img__loader,.img__observer{position:absolute;inset:0;block-size:100%;inline-size:100%;z-index:-1}.img__image,.img__bg{border-radius:inherit;display:block;opacity:0;transition:0.5s ease opacity, 0.3s ease filter 0.4s;filter:blur(5px);flex:1}.img__image.loaded,.img__bg.loaded{opacity:1;filter:blur(0)}@media not all and (resolution >= 0.001dpcm){@supports (-webkit-appearance: none){.img__image.loaded,.img__bg.loaded{filter:blur(0)}}}.img__image{object-fit:inherit;object-position:inherit;min-block-size:inherit;min-inline-size:inherit;block-size:inherit;inline-size:inherit;max-block-size:inherit;max-inline-size:inherit;aspect-ratio:inherit}.img__image.hide{visibility:hidden}.img__image.hide.no-height{block-size:1px;position:absolute;z-index:-1}.img__bg{background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit;overflow:auto;padding:var(--padding)}.img__bg.no-height{position:absolute;inset:0}";export{d as nano_grid,h as nano_img}
|
4
|
+
import{h as t,a as i,g as e,r as n,c as r}from"./index-D6WdRvhp.js";import{h as s}from"./renderer-BhDJHRB-.js";const o=(()=>{try{return!!new CSSStyleSheet}catch(t){return!1}})(),a=new WeakMap;function c(i,e,n){(function(t){for(const i in t)if(i in t&&Array.isArray(t[i]))return t[i]}(i)||[]).push(t("style",{type:"text/css","constructible-style":e},n))}function l(t,i,e,n){i.__constructableStyle||(i.__constructableStyle={});const r=t[n.cacheKeyProperty];return i.__constructableStyle[r]||(i.__constructableStyle[r]=new CSSStyleSheet,i.__constructableStyle[r].replace(e)),i.__constructableStyle[r]}const h=class{constructor(t){n(this,t)}grids=[];cacheKey;sSize=300;mSize=550;lSize=800;xlSize=1e3;sCols;mCols;lCols;xlCols;xxlCols;sTpl;mTpl;lTpl;xlTpl;xxlTpl;showHelper=!1;constructSizeArray(){this.grids=[],this.sCols&&this.grids.push({cols:this.sCols,breakpoint:0,name:"s",template:this.sTpl}),this.mCols&&this.grids.push({cols:this.mCols,breakpoint:this.sSize,name:"m",template:this.mTpl}),this.lCols&&this.grids.push({cols:this.lCols,breakpoint:this.mSize,name:"l",template:this.lTpl}),this.xlCols&&this.grids.push({cols:this.xlCols,breakpoint:this.lSize,name:"xl",template:this.xlTpl}),this.xxlCols&&this.grids.push({cols:this.xxlCols,breakpoint:this.xlSize,name:"xxl",template:this.xxlTpl}),this.cacheKey=this.grids.map((t=>`${t.cols}-${t.breakpoint}-${t.template||""}`)).join("")+"-helper-"+this.showHelper}styles=()=>`\n ${this.grids.map((t=>`\n @container (min-width: ${Number(t.breakpoint+1)?Number(t.breakpoint)+1+"px":t.breakpoint}) {\n [cache-key="${this.cacheKey}"].grid {\n --current-grid-size: "grid size: ${t.name}";\n ${t.template?`grid-template: ${t.template};`:`grid-template-columns: repeat(${t.cols}, minmax(calc((100% / ${t.cols}) - var(--grid-col-gap)), 1fr));`}\n }\n ${[...Array(t.cols)].map(((i,e)=>{const n=e+1;return`\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-col-start-${n}"],\n ::slotted([grid-states~="${t.name}-col-start-${n}"]) {\n grid-column-start: ${n} !important;\n }\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-col-span-${n}"],\n ::slotted([grid-states~="${t.name}-col-span-${n}"]) {\n grid-column-end: span ${n} !important;\n }\n `})).join("")}\n ${[...Array(24)].map(((i,e)=>{const n=e+1;return`\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-row-start-${n}"],\n ::slotted([grid-states~="${t.name}-row-start-${n}"]) {\n grid-row-start: ${n} !important;\n }\n [cache-key="${this.cacheKey}"].grid > [grid-states~="${t.name}-row-span-${n}"],\n ::slotted([grid-states~="${t.name}-row-span-${n}"]) {\n grid-row-end: span ${n} !important;\n }\n `})).join("")}\n ${this.showHelper?`\n [cache-key="${this.cacheKey}"].grid--helper :nth-child(-n+${t.cols}) {\n display: block !important;\n }\n `:""}\n }\n `)).join("")}\n `.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s{2,}/g," ").replace(/\s*([{}:;,])\s*/g,"$1").replace(/\n/g,"");componentWillLoad(){this.constructSizeArray()}render(){return s(i,{key:"74b98156bf6fbb3bf105135be4f461737d7774ac",class:"nano-grid"},s("div",{key:"dda06ec152c7d25ee0e6090e6c301bc8e5e81aac",part:"grid",class:"grid","cache-key":this.cacheKey},s("slot",{key:"175e120e0198bfad25600316aa8a8becf9390866"})),this.showHelper&&s("div",{key:"773d0ca81af12cc416550578e4df88f08b7af3cd",class:"grid grid--helper",part:"helper","cache-key":this.cacheKey},[...Array(24)].map((()=>s("div",{class:"grid__helper-item"})))))}static get watchers(){return{sTpl:["constructSizeArray"],mTpl:["constructSizeArray"],lTpl:["constructSizeArray"],xlTpl:["constructSizeArray"],xxlTpl:["constructSizeArray"],sSize:["constructSizeArray"],mSize:["constructSizeArray"],lSize:["constructSizeArray"],xlSize:["constructSizeArray"],sCols:["constructSizeArray"],mCols:["constructSizeArray"],lCols:["constructSizeArray"],xlCols:["constructSizeArray"],xxlCols:["constructSizeArray"],showHelper:["constructSizeArray"]}}};(function(t,i,e,n){var r,s=arguments.length,o=s<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,n);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(i,e,o):r(i,e))||o);s>3&&o&&Object.defineProperty(i,e,o)})([function(n={}){return(r,s)=>{n.cacheKeyProperty||(n.cacheKeyProperty=s);const{componentWillLoad:h,render:d,componentWillRender:m}=r;if(h||console.warn(`ConstructibleStyle requires you to have a \`componentWillLoad\` lifecycle method in \`${r.constructor.name}\`. Failure to add this function may cause ConstructibleStyle to fail due to StencilJS build optimizations.`),o){const t=t=>{if(!t[n.cacheKeyProperty]||a.get(t)&&a.get(t)===t[n.cacheKeyProperty])return;a.set(t,t[n.cacheKeyProperty]);const i=e(t),o="function"==typeof t[s]?t[s]():t[s],c=i.shadowRoot||document;c.adoptedStyleSheets=[...c.adoptedStyleSheets||[],l(t,r,o,n)]};r.componentWillLoad=function(){const i=h&&h.call(this);return t(this),i},r.componentWillRender=function(){const i=m&&m.call(this);return t(this),i}}else r.render=function(){const e="function"==typeof this[s]?this[s]():this[s];let n=d.call(this);if(function(t){for(const e in t)if(e in t&&t[e]===i)return!0;return!1}(n))c(n,r.constructor.name,e);else if(n=t(i,null,n),"attachShadow"in HTMLElement.prototype){if(!r.__constructableStyle){const t=document.createElement("style");t.setAttribute("type","text/css"),t.setAttribute("constructible-style",r.constructor.name),t.innerHTML=e,r.__constructableStyle=t,document.head.appendChild(t)}}else c(n,r.constructor.name,e);return n}}}({cacheKeyProperty:"cacheKey"}),function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)}("design:type",Object)],h.prototype,"styles",void 0),h.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{--grid-col-gap:var(--nano-spacing-md);--grid-row-gap:var(--nano-spacing-md);--grid-align-items:start;--grid-justify-items:normal;--current-grid-size:"grid size: s";container-type:inline-size;display:block}:host .grid{display:grid;gap:var(--grid-row-gap) var(--grid-col-gap);block-size:inherit;min-block-size:inherit;align-items:var(--grid-align-items);justify-items:var(--grid-justify-items)}:host([show-helper]:not([show-helper=false])){position:relative}:host([show-helper]:not([show-helper=false])) .grid--helper{position:absolute;inset:0;pointer-events:none;display:grid !important;overflow:hidden}:host([show-helper]:not([show-helper=false])) .grid--helper::before{content:var(--current-grid-size);font-size:30px;position:absolute;inline-size:100%;inset-inline-start:0;text-align:center;inset-block-start:50%;transform:translateY(-50%);color:rgba(0, 0, 0, 0.2);text-transform:uppercase;z-index:99;pointer-events:none}:host([show-helper]:not([show-helper=false])) .grid__helper-item{background:hsla(204, 80%, 72%, 0.25);block-size:100vh;inline-size:100%}';const d=class{constructor(t){n(this,t),this.nanoImgWillLoad=r(this,"nanoImgWillLoad",7),this.nanoImgDidLoad=r(this,"nanoImgDidLoad",7),this.nanoImgError=r(this,"nanoImgError",7)}io;_srcSet={};get host(){return e(this)}loadSrc;loadError;hasLoaded=!1;imgStates=null;_src;_srcChanged(){this.hasLoaded=!1,this.addIO()}alt;src;srcChanged(){this._src=this.src}srcSet;srcSetChanged(){this.srcSet&&(delete this._srcSet,this._srcSet={},this.imgStates=this.srcSet.split(",").map((t=>{const[i,e]=t.split(" ").filter((t=>t.length));return this._srcSet[i]={src:e,active:!1},i})).join(", "))}lazy=!0;lazyChanged(){this.lazy||this.load()}background;autoHeight="content";nanoImgWillLoad;nanoImgDidLoad;nanoImgError;addIO(){this._src&&!this.hasLoaded&&(this.lazy?"undefined"!=typeof window&&"IntersectionObserver"in window?(this.removeIO(),this.io=new IntersectionObserver((t=>{t[0].isIntersecting&&(this.load(),this.removeIO())})),this.io.observe(this.host)):setTimeout((()=>this.load()),200):this.load())}load(){this.loadError=this.onError,this.loadSrc=this._src,this.nanoImgWillLoad.emit()}onLoad=()=>{this.nanoImgDidLoad.emit(),setTimeout((()=>this.hasLoaded=!0),50)};onError=()=>{this.nanoImgError.emit()};onResize=t=>{Object.entries(t.detail).forEach((([t,i])=>{this._srcSet[t].active=!!i}));const i=[];Object.keys(this._srcSet).sort().forEach((t=>{this._srcSet[t].active&&i.push(this._srcSet[t].src)})),this._src=i.length?i.slice(-1)[0]:this.src};removeIO(){this.io&&(this.io.disconnect(),this.io=void 0)}connectedCallback(){this.srcChanged(),this.srcSetChanged(),this.lazyChanged()}componentDidLoad(){this.addIO()}disconnectedCallback(){this.removeIO()}render(){const t=this.loadSrc?{"background-image":`url(${this.loadSrc})`}:{};return s(i,{key:"246b2bd0d05e76d4756a170534b84eeeb47b5692",class:"nano-img"},s("div",{key:"17455932f3f0b6fef46b86f3731d1604295de25d",class:"img"},s("div",{key:"fb07e1f16faf27c6226a313c4bbcc54ccda29643",class:"img__loader n-loader-skeleton"},"Loading"),!!this.background&&s("div",{key:"7e7a83eb7b4a75be00662f8dcd06b9452b4fcc21",class:{loaded:this.hasLoaded,img__bg:!0,"no-height":"image"===this.autoHeight},style:t},s("slot",{key:"6fb65b4a0f745b517c0688da8b3fecae769d2e71"})),s("img",{key:"8872cd76b14e32bfa3051ae1b2953ee2f01bf609",class:{img__image:!0,loaded:this.hasLoaded,hide:this.background,"no-height":"content"===this.autoHeight},decoding:"async",src:this.loadSrc,loading:void 0,alt:this.alt,onLoad:this.onLoad,onError:this.loadError}),s("nano-resize-observe",{key:"677afcbf603e4649a202f3a4d566c73c0fc70e10",class:"img__observer",onNanoResizeStateChange:this.onResize,states:this.imgStates})))}static get watchers(){return{_src:["_srcChanged"],src:["srcChanged"],srcSet:["srcSetChanged"],lazy:["lazyChanged"]}}};d.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{--padding:0;display:inline-block;object-fit:cover;object-position:center;background-size:cover;background-position:center}:host *{border-radius:inherit}:host([background]:not([background=false])){display:block}.img{position:relative;object-fit:inherit;object-position:inherit;background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit;flex:1 1 100%;display:flex;flex-direction:column;min-block-size:inherit;min-inline-size:inherit;block-size:inherit;inline-size:inherit;max-block-size:inherit;max-inline-size:inherit;aspect-ratio:inherit}.img__loader,.img__observer{position:absolute;inset:0;block-size:100%;inline-size:100%;z-index:-1}.img__image,.img__bg{border-radius:inherit;display:block;opacity:0;transition:0.5s ease opacity, 0.3s ease filter 0.4s;filter:blur(5px);flex:1}.img__image.loaded,.img__bg.loaded{opacity:1;filter:blur(0)}@media not all and (resolution >= 0.001dpcm){@supports (-webkit-appearance: none){.img__image.loaded,.img__bg.loaded{filter:blur(0)}}}.img__image{object-fit:inherit;object-position:inherit;min-block-size:inherit;min-inline-size:inherit;block-size:inherit;inline-size:inherit;max-block-size:inherit;max-inline-size:inherit;aspect-ratio:inherit}.img__image.hide{visibility:hidden}.img__image.hide.no-height{block-size:1px;position:absolute;z-index:-1}.img__bg{background-color:inherit;background-position:inherit;background-size:inherit;background-origin:inherit;background-attachment:inherit;background-repeat:inherit;overflow:auto;padding:var(--padding)}.img__bg.no-height{position:absolute;inset:0}";export{h as nano_grid,d as nano_img}
|
@@ -7,16 +7,16 @@ import{r as t,c as i,g as s,e as n,d as e,a as o}from"./index-D6WdRvhp.js";impor
|
|
7
7
|
* measure size of elements
|
8
8
|
* MIT license
|
9
9
|
*/
|
10
|
-
function l(t){const i=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(i)&&i}a.on=function(t,i){if(!t||!i)return;const s=this._events=this._events||{},n=s[t]=s[t]||[];return-1==n.indexOf(i)&&n.push(i),this},a.once=function(t,i){if(!t||!i)return;this.on(t,i);const s=this._onceEvents=this._onceEvents||{};return(s[t]=s[t]||{})[i]=!0,this},a.off=function(t,i){const s=this._events&&this._events[t];if(!s||!s.length)return;const n=s.indexOf(i);return-1!=n&&s.splice(n,1),this},a.emitEvent=function(t,i){let s=this._events&&this._events[t];if(!s||!s.length)return;s=s.slice(0),i=i||[];const n=this._onceEvents&&this._onceEvents[t];for(let e=0;e<s.length;e++){const o=s[e];n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,i)}return this},a.allOff=function(){delete this._events,delete this._onceEvents};const u="undefined"==typeof console?function(){}:function(t){console.error(t)},f=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],d=f.length;function p(t){const i=getComputedStyle(t);return i||u("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),i}let b,y=!1;function g(t){if(function(){if(y)return;y=!0;const t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";const i=document.body||document.documentElement;i.appendChild(t);const s=p(t);b=200==Math.round(l(s.width)),g.isBoxSizeOuter=b,i.removeChild(t)}(),"string"==typeof t&&(t=document.querySelector(t)),!t||"object"!=typeof t||!t.nodeType)return;const i=p(t);if("none"==i.display)return function(){const t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(let i=0;i<d;i++)t[f[i]]=0;return t}();const s={};s.width=t.offsetWidth,s.height=t.offsetHeight;const n=s.isBorderBox="border-box"==i.boxSizing;for(let t=0;t<d;t++){const n=f[t],e=parseFloat(i[n]);s[n]=isNaN(e)?0:e}const e=s.paddingLeft+s.paddingRight,o=s.paddingTop+s.paddingBottom,h=s.marginLeft+s.marginRight,c=s.marginTop+s.marginBottom,r=s.borderLeftWidth+s.borderRightWidth,a=s.borderTopWidth+s.borderBottomWidth,u=n&&b,m=l(i.width);!1!==m&&(s.width=m+(u?0:e+r));const v=l(i.height);return!1!==v&&(s.height=v+(u?0:o+a)),s.innerWidth=s.width-(e+r),s.innerHeight=s.height-(o+a),s.outerWidth=s.width+h,s.outerHeight=s.height+c,s}const m={extend:function(t,i){for(const s in i)t[s]=i[s];return t},docReady:function(t){const i=document.readyState;"complete"==i||"interactive"==i?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},toDashed:function(t){return t.replace(/(.)([A-Z])/g,(function(t,i,s){return i+"-"+s})).toLowerCase()},modulo:function(t,i){return(t%i+i)%i}},v=Array.prototype.slice;m.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?v.call(t):[t]},m.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if((t=t.parentElement).matches(i))return t},m.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},m.handleEvent=function(t){const i="on"+t.type;this[i]&&this[i](t)},m.filterFindElements=function(t,i){t=m.makeArray(t);const s=[];return t.forEach((function(t){if(!(t instanceof HTMLElement))return;if(!i)return void s.push(t);t.matches(i)&&s.push(t);const n=t.querySelectorAll(i);for(let t=0;t<n.length;t++)s.push(n[t])})),s},m.debounceMethod=function(t,i,s){s=s||100;const n=t.prototype[i],e=i+"Timeout";t.prototype[i]=function(...t){clearTimeout(this[e]);const i=this;this[e]=setTimeout((function(){n.apply(i,t),delete i[e]}),s)}};const k=window.console;function w(t,i){this.element=t,this.parent=i,this.create()}m.htmlInit=function(t,i){m.docReady((function(){const s=m.toDashed(i),n="data-"+s,e=document.querySelectorAll("["+n+"]"),o=document.querySelectorAll(".js-"+s),h=m.makeArray(e).concat(m.makeArray(o)),c=n+"-options";h.forEach((function(i){const s=i.getAttribute(n)||i.getAttribute(c);let e;try{e=s&&JSON.parse(s)}catch(t){return void(k&&k.error("Error parsing "+n+" on "+i.className+": "+t))}new t(i,e)}))}))};const x=w.prototype;function S(t){this.parent=t,this.isOriginLeft="left"==t.originSide,this.cells=[],this.outerWidth=0,this.height=0}x.create=function(){this.element.style.position="absolute",this.element.setAttribute("aria-hidden","true"),this.x=0,this.shift=0,Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.setAttribute("tabindex","-1")}))},x.destroy=function(){this.unselect(),this.element.style.position="",this.element.style[this.parent.originSide]=""},x.getSize=function(){this.size=g(this.element)},x.setPosition=function(t){this.x=t,this.updateTarget(),this.renderPosition(t)},x.updateTarget=x.setDefaultTarget=function(){this.target=this.x+this.size["left"==this.parent.originSide?"marginLeft":"marginRight"]+this.size.width*this.parent.cellAlign},x.renderPosition=function(t){this.element.style[this.parent.originSide]=this.parent.getPositionValue(t)},x.select=function(){this.element.classList.add("is-selected"),this.element.removeAttribute("aria-hidden"),Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.removeAttribute("tabindex")}))},x.unselect=function(){this.element.classList.remove("is-selected"),this.element.setAttribute("aria-hidden","true"),Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.setAttribute("tabindex","-1")}))},x.wrapShift=function(t){this.shift=t,this.renderPosition(this.x+this.parent.slideableWidth*t)},x.remove=function(){this.element.parentNode.removeChild(this.element)};const z=S.prototype;z.addCell=function(t){this.cells.push(t),this.outerWidth+=t.size.outerWidth,this.height=Math.max(t.size.outerHeight,this.height),1==this.cells.length&&(this.x=t.x,this.firstMargin=t.size[this.isOriginLeft?"marginLeft":"marginRight"])},z.updateTarget=function(){const t=this.isOriginLeft?"marginRight":"marginLeft",i=this.getLastCell();this.target=this.x+this.firstMargin+(this.outerWidth-(this.firstMargin+(i?i.size[t]:0)))*this.parent.cellAlign},z.getLastCell=function(){return this.cells[this.cells.length-1]},z.select=function(){this.cells.forEach((function(t){t.select()}))},z.unselect=function(){this.cells.forEach((function(t){t.unselect()}))},z.getCellElements=function(){return this.cells.map((function(t){return t.element}))};const C={startAnimation:function(){this.isAnimating||(this.isAnimating=!0,this.restingFrames=0,this.animate())},animate:function(){this.applyDragForce(),this.applySelectedAttraction();const t=this.x;if(this.integratePhysics(),this.positionSlider(),this.settle(t),this.isAnimating){const t=this;requestAnimationFrame((function(){t.animate()}))}},positionSlider:function(){let t=this.x;this.options.wrapAround&&this.cells.length>1&&(t=m.modulo(t,this.slideableWidth),t-=this.slideableWidth,this.shiftWrapCells(t)),this.setTranslateX(t,this.isAnimating),this.dispatchScrollEvent()},setTranslateX:function(t){t+=this.cursorPosition;const i=this.getPositionValue(t=this.options.rightToLeft?-t:t);this.slider.style.transform="translate3d("+i+",0,0)"},dispatchScrollEvent:function(){const t=this.slides[0];if(!t)return;const i=-this.x-t.target;this.dispatchEvent("scroll",null,[i/this.slidesWidth,i])},positionSliderAtSelected:function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},getPositionValue:function(t){return this.options.percentPosition?.01*Math.round(t/this.size.innerWidth*1e4)+"%":Math.round(t)+"px"},settle:function(t){this.isPointerDown||Math.round(100*this.x)!=Math.round(100*t)||this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},shiftWrapCells:function(t){this._shiftCells(this.beforeShiftCells,this.cursorPosition+t,-1),this._shiftCells(this.afterShiftCells,this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition),1)},_shiftCells:function(t,i,s){for(let n=0;n<t.length;n++){const e=t[n];e.wrapShift(i>0?s:0),i-=e.size.outerWidth}},_unshiftCells:function(t){if(t&&t.length)for(let i=0;i<t.length;i++)t[i].wrapShift(0)},integratePhysics:function(){this.x+=this.velocity,this.velocity*=this.getFrictionFactor()},applyForce:function(t){this.velocity+=t},getFrictionFactor:function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},getRestingPosition:function(){return this.x+this.velocity/(1-this.getFrictionFactor())},applyDragForce:function(){this.isDraggable&&this.isPointerDown&&this.applyForce(this.dragX-this.x-this.velocity)},applySelectedAttraction:function(){this.isDraggable&&this.isPointerDown||this.isFreeScrolling||!this.slides.length||this.applyForce((-1*this.selectedSlide.target-this.x)*this.options.selectedAttraction)}},M=window.getComputedStyle,T=window.console;function A(t,i){for(t=m.makeArray(t);t.length;)i.appendChild(t.shift())}let E=0;const P={};function D(t,i){const s=m.getQueryElement(t);if(s){if(this.element=s,this.element.flickityGUID){const t=P[this.element.flickityGUID];if(!P[this.element.flickityGUID])return;return t.option(i),t}this.options=m.extend({},this.constructor.defaults),this.option(i),this._create()}else T&&T.error("Bad element for Flickity: "+(s||t))}D.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},D.createMethods=[];const L=D.prototype;m.extend(L,r.prototype),L._create=function(){const t=this.guid=++E;this.element.flickityGUID=t,P[t]=this,this.selectedIndex=0,this.restingFrames=0,this.x=0,this.velocity=0,this.originSide=this.options.rightToLeft?"right":"left",this.viewport=document.createElement("div"),this.viewport.className="flickity-viewport",this.viewport.part.add("slide-viewport"),this._createSlider(),(this.options.resize||this.options.watchCSS)&&window.addEventListener("resize",this);for(const t in this.options.on)this.on(t,this.options.on[t]);D.createMethods.forEach((function(t){this[t]()}),this),this.options.watchCSS?this.watchCSS():this.activate()},L.option=function(t){m.extend(this.options,t)},L.activate=function(){this.isActive||(this.isActive=!0,this.element.classList.add("flickity-enabled"),this.options.rightToLeft&&this.element.classList.add("flickity-rtl"),this.getSize(),A(this.element.children,this.slider),this.viewport.appendChild(this.slider),this.element.appendChild(this.viewport),this.reloadCells(),this.options.accessibility&&(this.element.tabIndex=0,this.element.addEventListener("keydown",this)),this.emitEvent("activate"),this.selectInitialIndex(),this.isInitActivated=!0,this.dispatchEvent("ready"))},L._createSlider=function(){const t=document.createElement("div");t.className="flickity-slider",t.style[this.originSide]=0,this.slider=t},L._filterFindCellElements=function(t){return m.filterFindElements(t,this.options.cellSelector)},L.reloadCells=function(){let t=this.slider.children;if(this.slider.getRootNode().host){t=[];for(const i of this.slider.getRootNode().host.children)"assignedElements"in i?t=[...t,...i.assignedElements()]:t.push(i)}this.cells=this._makeCells(t),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize()},L._makeCells=function(t){return this._filterFindCellElements(t).map((function(t){return new w(t,this)}),this)},L.getLastCell=function(){return this.cells[this.cells.length-1]},L.getLastSlide=function(){return this.slides[this.slides.length-1]},L.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},L._positionCells=function(t){this.maxCellHeight=(t=t||0)&&this.maxCellHeight||0;let i=0;if(t>0){const s=this.cells[t-1];i=s.x+s.size.outerWidth}const s=this.cells.length;for(let n=t;n<s;n++){const t=this.cells[n];t.setPosition(i),i+=t.size.outerWidth,this.maxCellHeight=Math.max(t.size.outerHeight,this.maxCellHeight)}this.slideableWidth=i,this.updateSlides(),this._containSlides(),this.slidesWidth=s?this.getLastSlide().target-this.slides[0].target:0},L._sizeCells=function(t){t.forEach((function(t){t.getSize()}))},L.updateSlides=function(){if(this.slides=[],!this.cells.length)return;let t=new S(this);this.slides.push(t);const i="left"==this.originSide?"marginRight":"marginLeft",s=this._getCanCellFit();this.cells.forEach((function(n,e){t.cells.length?(s.call(this,e,t.outerWidth-t.firstMargin+(n.size.outerWidth-n.size[i]))||(t.updateTarget(),t=new S(this),this.slides.push(t)),t.addCell(n)):t.addCell(n)}),this),t.updateTarget(),this.updateSelectedSlide()},L._getCanCellFit=function(){const t=this.options.groupCells;if(!t)return function(){return!1};if("number"==typeof t){const i=parseInt(t,10);return function(t){return t%i!=0}}const i="string"==typeof t&&t.match(/^(\d+)%$/),s=i?parseInt(i[1],10)/100:1;return function(t,i){return i<=(this.size.innerWidth+1)*s}},L._init=L.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},L.getSize=function(){this.size=g(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign};const F={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};function R(){}L.setCellAlign=function(){const t=F[this.options.cellAlign];this.cellAlign=t?t[this.originSide]:this.options.cellAlign},L.setGallerySize=function(){this.options.setGallerySize&&(this.viewport.style.height=(this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight)+"px")},L._getWrapShiftCells=function(){if(!this.options.wrapAround)return;this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells);let t=this.cursorPosition;this.beforeShiftCells=this._getGapCells(t,this.cells.length-1,-1),t=this.size.innerWidth-this.cursorPosition,this.afterShiftCells=this._getGapCells(t,0,1)},L._getGapCells=function(t,i,s){const n=[];for(;t>0;){const e=this.cells[i];if(!e)break;n.push(e),i+=s,t-=e.size.outerWidth}return n},L._containSlides=function(){if(!this.options.contain||this.options.wrapAround||!this.cells.length)return;const t=this.options.rightToLeft,i=t?"marginRight":"marginLeft",s=t?"marginLeft":"marginRight",n=this.slideableWidth-this.getLastCell().size[s],e=n<this.size.innerWidth,o=this.cursorPosition+this.cells[0].size[i],h=n-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach((function(t){e?t.target=n*this.cellAlign:(t.target=Math.max(t.target,o),t.target=Math.min(t.target,h))}),this)},L.dispatchEvent=function(t,i,s){const n=i?[i].concat(s):s;this.emitEvent(t,n)},L.select=function(t,i,s){if(!this.isActive)return;if(t=parseInt(t,10),this._wrapSelect(t),(this.options.wrapAround||i)&&(t=m.modulo(t,this.slides.length)),!this.slides[t])return;const n=this.selectedIndex;this.selectedIndex=t,this.updateSelectedSlide(),s?this.positionSliderAtSelected():this.startAnimation(),this.options.adaptiveHeight&&this.setGallerySize(),this.dispatchEvent("select",null,[t]),t!=n&&this.dispatchEvent("change",null,[t]),this.dispatchEvent("cellSelect")},L._wrapSelect=function(t){const i=this.slides.length;if(!(this.options.wrapAround&&i>1))return t;const s=m.modulo(t,i),n=Math.abs(s-this.selectedIndex),e=Math.abs(s+i-this.selectedIndex),o=Math.abs(s-i-this.selectedIndex);!this.isDragSelect&&e<n?t+=i:!this.isDragSelect&&o<n&&(t-=i),t<0?this.x-=this.slideableWidth:t>=i&&(this.x+=this.slideableWidth)},L.previous=function(t,i){this.select(this.selectedIndex-1,t,i)},L.next=function(t,i){this.select(this.selectedIndex+1,t,i)},L.updateSelectedSlide=function(){const t=this.slides[this.selectedIndex];t&&(this.unselectSelectedSlide(),this.selectedSlide=t,t.select(),this.selectedCells=t.cells,this.selectedElements=t.getCellElements(),this.selectedCell=t.cells[0],this.selectedElement=this.selectedElements[0])},L.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},L.selectInitialIndex=function(){const t=this.options.initialIndex;if(this.isInitActivated)return void this.select(this.selectedIndex,!1,!0);if(t&&"string"==typeof t&&this.queryCell(t))return void this.selectCell(t,!1,!0);let i=0;t&&this.slides[t]&&(i=t),this.select(i,!1,!0)},L.selectCell=function(t,i,s){const n=this.queryCell(t);if(!n)return;const e=this.getCellSlideIndex(n);this.select(e,i,s)},L.getCellSlideIndex=function(t){for(let i=0;i<this.slides.length;i++)if(-1!=this.slides[i].cells.indexOf(t))return i},L.getCell=function(t){for(let i=0;i<this.cells.length;i++){const s=this.cells[i];if(s.element==t)return s}},L.getCells=function(t){t=m.makeArray(t);const i=[];return t.forEach((function(t){const s=this.getCell(t);s&&i.push(s)}),this),i},L.getCellElements=function(){return this.cells.map((function(t){return t.element}))},L.getParentCell=function(t){return this.getCell(t)||(t=m.getParent(t,".flickity-slider > *"),this.getCell(t))},L.getAdjacentCellElements=function(t,i){if(!t)return this.selectedSlide.getCellElements();i=void 0===i?this.selectedIndex:i;const s=this.slides.length;if(1+2*t>=s)return this.getCellElements();let n=[];for(let e=i-t;e<=i+t;e++){const t=this.options.wrapAround?m.modulo(e,s):e,i=this.slides[t];i&&(n=n.concat(i.getCellElements()))}return n},L.queryCell=function(t){if("number"==typeof t)return this.cells[t];if("string"==typeof t){if(t.match(/^[#\.]?[\d\/]/))return;t=this.element.querySelector(t)}return this.getCell(t)},L.uiChange=function(){this.emitEvent("uiChange")},L.childUIPointerDown=function(t){"touchstart"!=t.type&&t.preventDefault(),this.focus()},L.onresize=function(){this.watchCSS(),this.resize()},m.debounceMethod(D,"onresize",150),L.resize=function(){this.isActive&&(this.getSize(),this.options.wrapAround&&(this.x=m.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize"),this.selectCell(this.selectedElements&&this.selectedElements[0],!1,!0))},L.watchCSS=function(){this.options.watchCSS&&(-1!=M(this.element,":after").content.indexOf("flickity")?this.activate():this.deactivate())},L.onkeydown=function(t){const i=document.activeElement&&document.activeElement!=this.element;if(!this.options.accessibility||i)return;const s=D.keyboardHandlers[t.keyCode];s&&s.call(this)},D.keyboardHandlers={37:function(){const t=this.options.rightToLeft?"next":"previous";this.uiChange(),this[t]()},39:function(){const t=this.options.rightToLeft?"previous":"next";this.uiChange(),this[t]()}},L.focus=function(){const t=window.pageYOffset;this.element.focus({preventScroll:!0}),window.pageYOffset!=t&&window.scrollTo(window.pageXOffset,t)},L.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEach((function(t){t.destroy()})),this.element.removeChild(this.viewport),A(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},L.destroy=function(){this.deactivate(),window.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),delete this.element.flickityGUID,delete P[this.guid]},m.extend(L,C),D.data=function(t){const i=(t=m.getQueryElement(t))&&t.flickityGUID;return i&&P[i]},m.htmlInit(D,"flickity"),D.Cell=w,D.Slide=S;const O=R.prototype=Object.create(r.prototype);O.bindStartEvent=function(t){this._bindStartEvent(t,!0)},O.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},O._bindStartEvent=function(t,i){i=void 0===i||i;let s="mousedown";"ontouchstart"in window?s="touchstart":window.PointerEvent&&(s="pointerdown"),t[i?"addEventListener":"removeEventListener"](s,this)},O.handleEvent=function(t){const i="on"+t.type;this[i]&&this[i](t)},O.getTouch=function(t){for(let i=0;i<t.length;i++){const s=t[i];if(s.identifier==this.pointerIdentifier)return s}},O.onmousedown=function(t){const i=t.button;i&&0!==i&&1!==i||this._pointerDown(t,t)},O.ontouchstart=function(t){this._pointerDown(t,t.changedTouches[0])},O.onpointerdown=function(t){this._pointerDown(t,t)},O._pointerDown=function(t,i){t.button||this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=void 0!==i.pointerId?i.pointerId:i.identifier,this.pointerDown(t,i))},O.pointerDown=function(t,i){this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,i])};const j={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]};
|
10
|
+
function l(t){const i=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(i)&&i}a.on=function(t,i){if(!t||!i)return;const s=this._events=this._events||{},n=s[t]=s[t]||[];return-1==n.indexOf(i)&&n.push(i),this},a.once=function(t,i){if(!t||!i)return;this.on(t,i);const s=this._onceEvents=this._onceEvents||{};return(s[t]=s[t]||{})[i]=!0,this},a.off=function(t,i){const s=this._events&&this._events[t];if(!s||!s.length)return;const n=s.indexOf(i);return-1!=n&&s.splice(n,1),this},a.emitEvent=function(t,i){let s=this._events&&this._events[t];if(!s||!s.length)return;s=s.slice(0),i=i||[];const n=this._onceEvents&&this._onceEvents[t];for(let e=0;e<s.length;e++){const o=s[e];n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,i)}return this},a.allOff=function(){delete this._events,delete this._onceEvents};const u="undefined"==typeof console?function(){}:function(t){console.error(t)},f=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],d=f.length;function p(t){const i=getComputedStyle(t);return i||u("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),i}let b,y=!1;function g(t){if(function(){if(y)return;y=!0;const t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style.boxSizing="border-box";const i=document.body||document.documentElement;i.appendChild(t);const s=p(t);b=200==Math.round(l(s.width)),g.isBoxSizeOuter=b,i.removeChild(t)}(),"string"==typeof t&&(t=document.querySelector(t)),!t||"object"!=typeof t||!t.nodeType)return;const i=p(t);if("none"==i.display)return function(){const t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(let i=0;i<d;i++)t[f[i]]=0;return t}();const s={};s.width=t.offsetWidth,s.height=t.offsetHeight;const n=s.isBorderBox="border-box"==i.boxSizing;for(let t=0;t<d;t++){const n=f[t],e=parseFloat(i[n]);s[n]=isNaN(e)?0:e}const e=s.paddingLeft+s.paddingRight,o=s.paddingTop+s.paddingBottom,h=s.marginLeft+s.marginRight,c=s.marginTop+s.marginBottom,r=s.borderLeftWidth+s.borderRightWidth,a=s.borderTopWidth+s.borderBottomWidth,u=n&&b,m=l(i.width);!1!==m&&(s.width=m+(u?0:e+r));const v=l(i.height);return!1!==v&&(s.height=v+(u?0:o+a)),s.innerWidth=s.width-(e+r),s.innerHeight=s.height-(o+a),s.outerWidth=s.width+h,s.outerHeight=s.height+c,s}const m={extend:function(t,i){for(const s in i)t[s]=i[s];return t},docReady:function(t){const i=document.readyState;"complete"==i||"interactive"==i?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},toDashed:function(t){return t.replace(/(.)([A-Z])/g,(function(t,i,s){return i+"-"+s})).toLowerCase()},modulo:function(t,i){return(t%i+i)%i}},v=Array.prototype.slice;m.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?v.call(t):[t]},m.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if((t=t.parentElement).matches(i))return t},m.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},m.handleEvent=function(t){const i="on"+t.type;this[i]&&this[i](t)},m.filterFindElements=function(t,i){t=m.makeArray(t);const s=[];return t.forEach((function(t){if(!(t instanceof HTMLElement))return;if(!i)return void s.push(t);t.matches(i)&&s.push(t);const n=t.querySelectorAll(i);for(let t=0;t<n.length;t++)s.push(n[t])})),s},m.debounceMethod=function(t,i,s){s=s||100;const n=t.prototype[i],e=i+"Timeout";t.prototype[i]=function(...t){clearTimeout(this[e]);const i=this;this[e]=setTimeout((function(){n.apply(i,t),delete i[e]}),s)}};const k=window.console;function w(t,i){this.element=t,this.parent=i,this.create()}m.htmlInit=function(t,i){m.docReady((function(){const s=m.toDashed(i),n="data-"+s,e=document.querySelectorAll("["+n+"]"),o=document.querySelectorAll(".js-"+s),h=m.makeArray(e).concat(m.makeArray(o)),c=n+"-options";h.forEach((function(i){const s=i.getAttribute(n)||i.getAttribute(c);let e;try{e=s&&JSON.parse(s)}catch(t){return void(k&&k.error("Error parsing "+n+" on "+i.className+": "+t))}new t(i,e)}))}))};const x=w.prototype;function S(t){this.parent=t,this.isOriginLeft="left"==t.originSide,this.cells=[],this.outerWidth=0,this.height=0}x.create=function(){this.element.style.position="absolute",this.element.setAttribute("aria-hidden","true"),this.x=0,this.shift=0,Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.setAttribute("tabindex","-1")}))},x.destroy=function(){this.unselect(),this.element.style.position="",this.element.style[this.parent.originSide]=""},x.getSize=function(){this.size=g(this.element)},x.setPosition=function(t){this.x=t,this.updateTarget(),this.renderPosition(t)},x.updateTarget=x.setDefaultTarget=function(){this.target=this.x+this.size["left"==this.parent.originSide?"marginLeft":"marginRight"]+this.size.width*this.parent.cellAlign},x.renderPosition=function(t){this.element.style[this.parent.originSide]=this.parent.getPositionValue(t)},x.select=function(){this.element.classList.add("is-selected"),this.element.removeAttribute("aria-hidden"),Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.removeAttribute("tabindex")}))},x.unselect=function(){this.element.classList.remove("is-selected"),this.element.setAttribute("aria-hidden","true"),Array.from(this.element.querySelectorAll("*")).forEach((t=>{t.setAttribute("tabindex","-1")}))},x.wrapShift=function(t){this.shift=t,this.renderPosition(this.x+this.parent.slideableWidth*t)},x.remove=function(){this.element.parentNode.removeChild(this.element)};const z=S.prototype;z.addCell=function(t){this.cells.push(t),this.outerWidth+=t.size.outerWidth,this.height=Math.max(t.size.outerHeight,this.height),1==this.cells.length&&(this.x=t.x,this.firstMargin=t.size[this.isOriginLeft?"marginLeft":"marginRight"])},z.updateTarget=function(){const t=this.isOriginLeft?"marginRight":"marginLeft",i=this.getLastCell();this.target=this.x+this.firstMargin+(this.outerWidth-(this.firstMargin+(i?i.size[t]:0)))*this.parent.cellAlign},z.getLastCell=function(){return this.cells[this.cells.length-1]},z.select=function(){this.cells.forEach((function(t){t.select()}))},z.unselect=function(){this.cells.forEach((function(t){t.unselect()}))},z.getCellElements=function(){return this.cells.map((function(t){return t.element}))};const C={startAnimation:function(){this.isAnimating||(this.isAnimating=!0,this.restingFrames=0,this.animate())},animate:function(){this.applyDragForce(),this.applySelectedAttraction();const t=this.x;if(this.integratePhysics(),this.positionSlider(),this.settle(t),this.isAnimating){const t=this;requestAnimationFrame((function(){t.animate()}))}},positionSlider:function(){let t=this.x;this.options.wrapAround&&this.cells.length>1&&(t=m.modulo(t,this.slideableWidth),t-=this.slideableWidth,this.shiftWrapCells(t)),this.setTranslateX(t,this.isAnimating),this.dispatchScrollEvent()},setTranslateX:function(t){t+=this.cursorPosition;const i=this.getPositionValue(t=this.options.rightToLeft?-t:t);this.slider.style.transform="translate3d("+i+",0,0)"},dispatchScrollEvent:function(){const t=this.slides[0];if(!t)return;const i=-this.x-t.target;this.dispatchEvent("scroll",null,[i/this.slidesWidth,i])},positionSliderAtSelected:function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},getPositionValue:function(t){return this.options.percentPosition?.01*Math.round(t/this.size.innerWidth*1e4)+"%":Math.round(t)+"px"},settle:function(t){this.isPointerDown||Math.round(100*this.x)!=Math.round(100*t)||this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},shiftWrapCells:function(t){this._shiftCells(this.beforeShiftCells,this.cursorPosition+t,-1),this._shiftCells(this.afterShiftCells,this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition),1)},_shiftCells:function(t,i,s){for(let n=0;n<t.length;n++){const e=t[n];e.wrapShift(i>0?s:0),i-=e.size.outerWidth}},_unshiftCells:function(t){if(t&&t.length)for(let i=0;i<t.length;i++)t[i].wrapShift(0)},integratePhysics:function(){this.x+=this.velocity,this.velocity*=this.getFrictionFactor()},applyForce:function(t){this.velocity+=t},getFrictionFactor:function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},getRestingPosition:function(){return this.x+this.velocity/(1-this.getFrictionFactor())},applyDragForce:function(){this.isDraggable&&this.isPointerDown&&this.applyForce(this.dragX-this.x-this.velocity)},applySelectedAttraction:function(){this.isDraggable&&this.isPointerDown||this.isFreeScrolling||!this.slides.length||this.applyForce((-1*this.selectedSlide.target-this.x)*this.options.selectedAttraction)}},M=window.getComputedStyle,T=window.console;function A(t,i){for(t=m.makeArray(t);t.length;)i.appendChild(t.shift())}let D=0;const E={};function P(t,i){const s=m.getQueryElement(t);if(s){if(this.element=s,this.element.flickityGUID){const t=E[this.element.flickityGUID];if(!E[this.element.flickityGUID])return;return t.option(i),t}this.options=m.extend({},this.constructor.defaults),this.option(i),this._create()}else T&&T.error("Bad element for Flickity: "+(s||t))}P.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},P.createMethods=[];const F=P.prototype;m.extend(F,r.prototype),F._create=function(){const t=this.guid=++D;this.element.flickityGUID=t,E[t]=this,this.selectedIndex=0,this.restingFrames=0,this.x=0,this.velocity=0,this.originSide=this.options.rightToLeft?"right":"left",this.viewport=document.createElement("div"),this.viewport.className="flickity-viewport",this.viewport.part.add("slide-viewport"),this._createSlider(),(this.options.resize||this.options.watchCSS)&&window.addEventListener("resize",this);for(const t in this.options.on)this.on(t,this.options.on[t]);P.createMethods.forEach((function(t){this[t]()}),this),this.options.watchCSS?this.watchCSS():this.activate()},F.option=function(t){m.extend(this.options,t)},F.activate=function(){this.isActive||(this.isActive=!0,this.element.classList.add("flickity-enabled"),this.options.rightToLeft&&this.element.classList.add("flickity-rtl"),this.getSize(),A(this.element.children,this.slider),this.viewport.appendChild(this.slider),this.element.appendChild(this.viewport),this.reloadCells(),this.options.accessibility&&(this.element.tabIndex=0,this.element.addEventListener("keydown",this)),this.emitEvent("activate"),this.selectInitialIndex(),this.isInitActivated=!0,this.dispatchEvent("ready"))},F._createSlider=function(){const t=document.createElement("div");t.className="flickity-slider",t.style[this.originSide]=0,this.slider=t},F._filterFindCellElements=function(t){return m.filterFindElements(t,this.options.cellSelector)},F.reloadCells=function(){let t=this.slider.children;if(this.slider.getRootNode().host){t=[];for(const i of this.slider.getRootNode().host.children)"assignedElements"in i?t=[...t,...i.assignedElements()]:t.push(i)}this.cells=this._makeCells(t),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize()},F._makeCells=function(t){return this._filterFindCellElements(t).map((function(t){return new w(t,this)}),this)},F.getLastCell=function(){return this.cells[this.cells.length-1]},F.getLastSlide=function(){return this.slides[this.slides.length-1]},F.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},F._positionCells=function(t){this.maxCellHeight=(t=t||0)&&this.maxCellHeight||0;let i=0;if(t>0){const s=this.cells[t-1];i=s.x+s.size.outerWidth}const s=this.cells.length;for(let n=t;n<s;n++){const t=this.cells[n];t.setPosition(i),i+=t.size.outerWidth,this.maxCellHeight=Math.max(t.size.outerHeight,this.maxCellHeight)}this.slideableWidth=i,this.updateSlides(),this._containSlides(),this.slidesWidth=s?this.getLastSlide().target-this.slides[0].target:0},F._sizeCells=function(t){t.forEach((function(t){t.getSize()}))},F.updateSlides=function(){if(this.slides=[],!this.cells.length)return;let t=new S(this);this.slides.push(t);const i="left"==this.originSide?"marginRight":"marginLeft",s=this._getCanCellFit();this.cells.forEach((function(n,e){t.cells.length?(s.call(this,e,t.outerWidth-t.firstMargin+(n.size.outerWidth-n.size[i]))||(t.updateTarget(),t=new S(this),this.slides.push(t)),t.addCell(n)):t.addCell(n)}),this),t.updateTarget(),this.updateSelectedSlide()},F._getCanCellFit=function(){const t=this.options.groupCells;if(!t)return function(){return!1};if("number"==typeof t){const i=parseInt(t,10);return function(t){return t%i!=0}}const i="string"==typeof t&&t.match(/^(\d+)%$/),s=i?parseInt(i[1],10)/100:1;return function(t,i){return i<=(this.size.innerWidth+1)*s}},F._init=F.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},F.getSize=function(){this.size=g(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign};const L={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};function R(){}F.setCellAlign=function(){const t=L[this.options.cellAlign];this.cellAlign=t?t[this.originSide]:this.options.cellAlign},F.setGallerySize=function(){this.options.setGallerySize&&(this.viewport.style.height=(this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight)+"px")},F._getWrapShiftCells=function(){if(!this.options.wrapAround)return;this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells);let t=this.cursorPosition;this.beforeShiftCells=this._getGapCells(t,this.cells.length-1,-1),t=this.size.innerWidth-this.cursorPosition,this.afterShiftCells=this._getGapCells(t,0,1)},F._getGapCells=function(t,i,s){const n=[];for(;t>0;){const e=this.cells[i];if(!e)break;n.push(e),i+=s,t-=e.size.outerWidth}return n},F._containSlides=function(){if(!this.options.contain||this.options.wrapAround||!this.cells.length)return;const t=this.options.rightToLeft,i=t?"marginRight":"marginLeft",s=t?"marginLeft":"marginRight",n=this.slideableWidth-this.getLastCell().size[s],e=n<this.size.innerWidth,o=this.cursorPosition+this.cells[0].size[i],h=n-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach((function(t){e?t.target=n*this.cellAlign:(t.target=Math.max(t.target,o),t.target=Math.min(t.target,h))}),this)},F.dispatchEvent=function(t,i,s){const n=i?[i].concat(s):s;this.emitEvent(t,n)},F.select=function(t,i,s){if(!this.isActive)return;if(t=parseInt(t,10),this._wrapSelect(t),(this.options.wrapAround||i)&&(t=m.modulo(t,this.slides.length)),!this.slides[t])return;const n=this.selectedIndex;this.selectedIndex=t,this.updateSelectedSlide(),s?this.positionSliderAtSelected():this.startAnimation(),this.options.adaptiveHeight&&this.setGallerySize(),this.dispatchEvent("select",null,[t]),t!=n&&this.dispatchEvent("change",null,[t]),this.dispatchEvent("cellSelect")},F._wrapSelect=function(t){const i=this.slides.length;if(!(this.options.wrapAround&&i>1))return t;const s=m.modulo(t,i),n=Math.abs(s-this.selectedIndex),e=Math.abs(s+i-this.selectedIndex),o=Math.abs(s-i-this.selectedIndex);!this.isDragSelect&&e<n?t+=i:!this.isDragSelect&&o<n&&(t-=i),t<0?this.x-=this.slideableWidth:t>=i&&(this.x+=this.slideableWidth)},F.previous=function(t,i){this.select(this.selectedIndex-1,t,i)},F.next=function(t,i){this.select(this.selectedIndex+1,t,i)},F.updateSelectedSlide=function(){const t=this.slides[this.selectedIndex];t&&(this.unselectSelectedSlide(),this.selectedSlide=t,t.select(),this.selectedCells=t.cells,this.selectedElements=t.getCellElements(),this.selectedCell=t.cells[0],this.selectedElement=this.selectedElements[0])},F.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},F.selectInitialIndex=function(){const t=this.options.initialIndex;if(this.isInitActivated)return void this.select(this.selectedIndex,!1,!0);if(t&&"string"==typeof t&&this.queryCell(t))return void this.selectCell(t,!1,!0);let i=0;t&&this.slides[t]&&(i=t),this.select(i,!1,!0)},F.selectCell=function(t,i,s){const n=this.queryCell(t);if(!n)return;const e=this.getCellSlideIndex(n);this.select(e,i,s)},F.getCellSlideIndex=function(t){for(let i=0;i<this.slides.length;i++)if(-1!=this.slides[i].cells.indexOf(t))return i},F.getCell=function(t){for(let i=0;i<this.cells.length;i++){const s=this.cells[i];if(s.element==t)return s}},F.getCells=function(t){t=m.makeArray(t);const i=[];return t.forEach((function(t){const s=this.getCell(t);s&&i.push(s)}),this),i},F.getCellElements=function(){return this.cells.map((function(t){return t.element}))},F.getParentCell=function(t){return this.getCell(t)||(t=m.getParent(t,".flickity-slider > *"),this.getCell(t))},F.getAdjacentCellElements=function(t,i){if(!t)return this.selectedSlide.getCellElements();i=void 0===i?this.selectedIndex:i;const s=this.slides.length;if(1+2*t>=s)return this.getCellElements();let n=[];for(let e=i-t;e<=i+t;e++){const t=this.options.wrapAround?m.modulo(e,s):e,i=this.slides[t];i&&(n=n.concat(i.getCellElements()))}return n},F.queryCell=function(t){if("number"==typeof t)return this.cells[t];if("string"==typeof t){if(t.match(/^[#\.]?[\d\/]/))return;t=this.element.querySelector(t)}return this.getCell(t)},F.uiChange=function(){this.emitEvent("uiChange")},F.childUIPointerDown=function(t){"touchstart"!=t.type&&t.preventDefault(),this.focus()},F.onresize=function(){this.watchCSS(),this.resize()},m.debounceMethod(P,"onresize",150),F.resize=function(){this.isActive&&(this.getSize(),this.options.wrapAround&&(this.x=m.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize"),this.selectCell(this.selectedElements&&this.selectedElements[0],!1,!0))},F.watchCSS=function(){this.options.watchCSS&&(-1!=M(this.element,":after").content.indexOf("flickity")?this.activate():this.deactivate())},F.onkeydown=function(t){const i=document.activeElement&&document.activeElement!=this.element;if(!this.options.accessibility||i)return;const s=P.keyboardHandlers[t.keyCode];s&&s.call(this)},P.keyboardHandlers={37:function(){const t=this.options.rightToLeft?"next":"previous";this.uiChange(),this[t]()},39:function(){const t=this.options.rightToLeft?"previous":"next";this.uiChange(),this[t]()}},F.focus=function(){const t=window.pageYOffset;this.element.focus({preventScroll:!0}),window.pageYOffset!=t&&window.scrollTo(window.pageXOffset,t)},F.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEach((function(t){t.destroy()})),this.element.removeChild(this.viewport),A(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},F.destroy=function(){this.deactivate(),window.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),delete this.element.flickityGUID,delete E[this.guid]},m.extend(F,C),P.data=function(t){const i=(t=m.getQueryElement(t))&&t.flickityGUID;return i&&E[i]},m.htmlInit(P,"flickity"),P.Cell=w,P.Slide=S;const O=R.prototype=Object.create(r.prototype);O.bindStartEvent=function(t){this._bindStartEvent(t,!0)},O.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},O._bindStartEvent=function(t,i){i=void 0===i||i;let s="mousedown";"ontouchstart"in window?s="touchstart":window.PointerEvent&&(s="pointerdown"),t[i?"addEventListener":"removeEventListener"](s,this)},O.handleEvent=function(t){const i="on"+t.type;this[i]&&this[i](t)},O.getTouch=function(t){for(let i=0;i<t.length;i++){const s=t[i];if(s.identifier==this.pointerIdentifier)return s}},O.onmousedown=function(t){const i=t.button;i&&0!==i&&1!==i||this._pointerDown(t,t)},O.ontouchstart=function(t){this._pointerDown(t,t.changedTouches[0])},O.onpointerdown=function(t){this._pointerDown(t,t)},O._pointerDown=function(t,i){t.button||this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=void 0!==i.pointerId?i.pointerId:i.identifier,this.pointerDown(t,i))},O.pointerDown=function(t,i){this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,i])};const j={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]};
|
11
11
|
/*!
|
12
12
|
* Unidragger v2.4.0
|
13
13
|
* Draggable base class
|
14
14
|
* MIT license
|
15
15
|
*/
|
16
|
-
function
|
16
|
+
function N(){}O._bindPostStartEvents=function(t){if(!t)return;const i=j[t.type];i.forEach((function(t){window.addEventListener(t,this)}),this),this._boundPointerEvents=i},O._unbindPostStartEvents=function(){this._boundPointerEvents&&(this._boundPointerEvents.forEach((function(t){window.removeEventListener(t,this)}),this),delete this._boundPointerEvents)},O.onmousemove=function(t){this._pointerMove(t,t)},O.onpointermove=function(t){t.pointerId==this.pointerIdentifier&&this._pointerMove(t,t)},O.ontouchmove=function(t){const i=this.getTouch(t.changedTouches);i&&this._pointerMove(t,i)},O._pointerMove=function(t,i){this.pointerMove(t,i)},O.pointerMove=function(t,i){this.emitEvent("pointerMove",[t,i])},O.onmouseup=function(t){this._pointerUp(t,t)},O.onpointerup=function(t){t.pointerId==this.pointerIdentifier&&this._pointerUp(t,t)},O.ontouchend=function(t){const i=this.getTouch(t.changedTouches);i&&this._pointerUp(t,i)},O._pointerUp=function(t,i){this._pointerDone(),this.pointerUp(t,i)},O.pointerUp=function(t,i){this.emitEvent("pointerUp",[t,i])},O._pointerDone=function(){this._pointerReset(),this._unbindPostStartEvents(),this.pointerDone()},O._pointerReset=function(){this.isPointerDown=!1,delete this.pointerIdentifier},O.pointerDone=
|
17
17
|
/*!
|
18
18
|
* Unipointer v2.4.0
|
19
19
|
* base class for doing one thing with pointer event
|
20
20
|
* MIT license
|
21
21
|
*/
|
22
|
-
function(){},O.onpointercancel=function(t){t.pointerId==this.pointerIdentifier&&this._pointerCancel(t,t)},O.ontouchcancel=function(t){const i=this.getTouch(t.changedTouches);i&&this._pointerCancel(t,i)},O._pointerCancel=function(t,i){this._pointerDone(),this.pointerCancel(t,i)},O.pointerCancel=function(t,i){this.emitEvent("pointerCancel",[t,i])},R.getPointerPoint=function(t){return{x:t.pageX,y:t.pageY}};const N=B.prototype=Object.create(R.prototype);N.bindHandles=function(){this._bindHandles(!0)},N.unbindHandles=function(){this._bindHandles(!1)},N._bindHandles=function(t){const i=(t=void 0===t||t)?"addEventListener":"removeEventListener",s=t?this._touchActionValue:"";for(let n=0;n<this.handles.length;n++){const e=this.handles[n];this._bindStartEvent(e,t),e[i]("click",this),window.PointerEvent&&(e.style.touchAction=s)}},N._touchActionValue="none",N.pointerDown=function(t,i){this.okayPointerDown(t)&&(this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY},t.preventDefault(),this.pointerDownBlur(),this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,i]))};const I={TEXTAREA:!0,INPUT:!0,SELECT:!0,OPTION:!0},W={radio:!0,checkbox:!0,button:!0,submit:!0,image:!0,file:!0};N.okayPointerDown=function(t){const i=!I[t.target.nodeName]||W[t.target.type];return i||this._pointerReset(),i},N.pointerDownBlur=function(){const t=document.activeElement;t&&t.blur&&t!=document.body&&t.blur()},N.pointerMove=function(t,i){const s=this._dragPointerMove(t,i);this.emitEvent("pointerMove",[t,i,s]),this._dragMove(t,i,s)},N._dragPointerMove=function(t,i){const s={x:i.pageX-this.pointerDownPointer.pageX,y:i.pageY-this.pointerDownPointer.pageY};return!this.isDragging&&this.hasDragStarted(s)&&this._dragStart(t,i),s},N.hasDragStarted=function(t){return Math.abs(t.x)>3||Math.abs(t.y)>3},N.pointerUp=function(t,i){this.emitEvent("pointerUp",[t,i]),this._dragPointerUp(t,i)},N._dragPointerUp=function(t,i){this.isDragging?this._dragEnd(t,i):this._staticClick(t,i)},N._dragStart=function(t,i){this.isDragging=!0,this.isPreventingClicks=!0,this.dragStart(t,i)},N.dragStart=function(t,i){this.emitEvent("dragStart",[t,i])},N._dragMove=function(t,i,s){this.isDragging&&this.dragMove(t,i,s)},N.dragMove=function(t,i,s){t.preventDefault(),this.emitEvent("dragMove",[t,i,s])},N._dragEnd=function(t,i){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(t,i)},N.dragEnd=function(t,i){this.emitEvent("dragEnd",[t,i])},N.onclick=function(t){this.isPreventingClicks&&t.preventDefault()},N._staticClick=function(t,i){this.isIgnoringMouseUp&&"mouseup"==t.type||(this.staticClick(t,i),"mouseup"!=t.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},N.staticClick=function(t,i){this.emitEvent("staticClick",[t,i])},B.getPointerPoint=R.getPointerPoint;const U=D;(()=>{m.extend(D.defaults,{draggable:">1",dragThreshold:3}),D.createMethods.push("_createDrag");const t=D.prototype;m.extend(t,B.prototype),t._touchActionValue="pan-y";const i="createTouch"in document;let s=!1;t._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable),i&&!s&&(window.addEventListener("touchmove",(function(){})),s=!0)},t.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},t.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},t.updateDraggable=function(){this.isDraggable=">1"==this.options.draggable?this.slides.length>1:this.options.draggable,this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},t.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},t.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},t._uiChangeDrag=function(){delete this.isFreeScrolling},t.pointerDown=function(t,i){this.isDraggable?this.okayPointerDown(t)&&(this._pointerDownPreventDefault(t),this.pointerDownFocus(t),document.activeElement!=this.element&&this.pointerDownBlur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=e(),window.addEventListener("scroll",this),this._pointerDownDefault(t,i)):this._pointerDownDefault(t,i)},t._pointerDownDefault=function(t,i){this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY},this._bindPostStartEvents(t),this.dispatchEvent("pointerDown",t,[i])};const n={INPUT:!0,TEXTAREA:!0,SELECT:!0};function e(){return{x:window.scrollX,y:window.scrollY}}t.pointerDownFocus=function(t){n[t.target.nodeName]||this.focus()},t._pointerDownPreventDefault=function(t){"touchstart"==t.type||"touch"==t.pointerType||n[t.target.nodeName]||t.preventDefault()},t.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold},t.pointerUp=function(t,i){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[i]),this._dragPointerUp(t,i)},t.pointerDone=function(){window.removeEventListener("scroll",this),delete this.pointerDownScroll},t.dragStart=function(t,i){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),window.removeEventListener("scroll",this),this.dispatchEvent("dragStart",t,[i]))},t.pointerMove=function(t,i){const s=this._dragPointerMove(t,i);this.dispatchEvent("pointerMove",t,[i,s]),this._dragMove(t,i,s)},t.dragMove=function(t,i,s){if(!this.isDraggable)return;t.preventDefault(),this.previousDragX=this.dragX;const n=this.options.rightToLeft?-1:1;this.options.wrapAround&&(s.x=s.x%this.slideableWidth);let e=this.dragStartPosition+s.x*n;if(!this.options.wrapAround&&this.slides.length){const t=Math.max(-this.slides[0].target,this.dragStartPosition);e=e>t?.5*(e+t):e;const i=Math.min(-this.getLastSlide().target,this.dragStartPosition);e=e<i?.5*(e+i):e}this.dragX=e,this.dragMoveTime=new Date,this.dispatchEvent("dragMove",t,[i,s])},t.dragEnd=function(t,i){if(!this.isDraggable)return;this.options.freeScroll&&(this.isFreeScrolling=!0);let s=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){const t=this.getRestingPosition();this.isFreeScrolling=-t>this.slides[0].target&&-t<this.getLastSlide().target}else this.options.freeScroll||s!=this.selectedIndex||(s+=this.dragEndBoostSelect());delete this.previousDragX,this.isDragSelect=this.options.wrapAround,this.select(s),delete this.isDragSelect,this.dispatchEvent("dragEnd",t,[i])},t.dragEndRestingSelect=function(){const t=this.getRestingPosition(),i=Math.abs(this.getSlideDistance(-t,this.selectedIndex)),s=this._getClosestResting(t,i,1),n=this._getClosestResting(t,i,-1);return s.distance<n.distance?s.index:n.index},t._getClosestResting=function(t,i,s){let n=this.selectedIndex,e=1/0;const o=this.options.contain&&!this.options.wrapAround?function(t,i){return t<=i}:function(t,i){return t<i};for(;o(i,e)&&(n+=s,e=i,null!==(i=this.getSlideDistance(-t,n)));)i=Math.abs(i);return{distance:e,index:n-s}},t.getSlideDistance=function(t,i){const s=this.slides.length,n=this.options.wrapAround&&s>1,e=n?m.modulo(i,s):i,o=this.slides[e];if(!o)return null;const h=n?this.slideableWidth*Math.floor(i/s):0;return t-(o.target+h)},t.dragEndBoostSelect=function(){if(void 0===this.previousDragX||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;const t=this.getSlideDistance(-this.dragX,this.selectedIndex),i=this.previousDragX-this.dragX;return t>0&&i>0?1:t<0&&i<0?-1:0},t.staticClick=function(t,i){const s=this.getParentCell(t.target),n=s&&s.element,e=s&&this.cells.indexOf(s);this.dispatchEvent("staticClick",t,[i,n,e])},t.onscroll=function(){const t=e(),i=this.pointerDownScroll.y-t.y;(Math.abs(this.pointerDownScroll.x-t.x)>3||Math.abs(i)>3)&&this._pointerDone()}})(),(()=>{function t(t,i){this.direction=t,this.parent=i,this.parentElement=this.parent.element.shadowRoot||this.parent.element,this._create()}(t.prototype=Object.create(R.prototype))._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction,this.isLeft=this.direction==(this.parent.options.rightToLeft?1:-1);const t=this.element=document.createElement("button");t.className="flickity-button flickity-prev-next-button",t.part.add("navigation-button"),this.isPrevious?(t.classList.add("previous"),t.part.add("navigation-button--previous")):(t.classList.add("next"),t.part.add("navigation-button--next")),t.setAttribute("type","button"),this.disable(),t.setAttribute("aria-label",this.isPrevious?"Previous":"Next");const i=document.createElement("slot");i.name=this.isPrevious?"previous-icon":"next-icon",t.appendChild(i),i.addEventListener("slotchange",(()=>{i.assignedElements({flatten:!0}).forEach((t=>{t.removeAttribute("hidden")}))}));const s=document.createElement("span");s.className="button-icon "+(this.isPrevious?"button-icon--previous":"button-icon--next"),s.part.add("navigation-icon"),i.appendChild(s),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},t.prototype.activate=function(){this.bindStartEvent(this.element),this.element.addEventListener("click",this),this.parentElement.appendChild(this.element)},t.prototype.deactivate=function(){this.parentElement.removeChild(this.element),this.unbindStartEvent(this.element),this.element.removeEventListener("click",this)},t.prototype.handleEvent=m.handleEvent,t.prototype.onclick=function(){this.isEnabled&&(this.parent.uiChange(),this.parent[this.isPrevious?"previous":"next"]())},t.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},t.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},t.prototype.update=function(){const t=this.parent.slides;this.parent.options.wrapAround&&t.length>1?this.enable():this[this.parent.selectedIndex==(this.isPrevious?0:t.length?t.length-1:0)?"disable":"enable"]()},t.prototype.destroy=function(){this.deactivate(),this.allOff()},m.extend(D.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),D.createMethods.push("_createPrevNextButtons");const i=D.prototype;i._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new t(-1,this),this.nextButton=new t(1,this),this.on("activate",this.activatePrevNextButtons))},i.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},i.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},D.PrevNextButton=t})(),(()=>{function t(t){this.parent=t,this.state="stopped",this.onVisibilityChange=this.visibilityChange.bind(this),this.onVisibilityPlay=this.visibilityPlay.bind(this)}(t.prototype=Object.create(r.prototype)).play=function(){"playing"!=this.state&&(document.hidden?document.addEventListener("visibilitychange",this.onVisibilityPlay):(this.state="playing",document.addEventListener("visibilitychange",this.onVisibilityChange),this.tick()))},t.prototype.tick=function(){if("playing"!=this.state)return;let t=this.parent.options.autoPlay;t="number"==typeof t?t:3e3;const i=this;this.clear(),this.timeout=setTimeout((function(){i.parent.next(!0),i.tick()}),t)},t.prototype.stop=function(){this.state="stopped",this.clear(),document.removeEventListener("visibilitychange",this.onVisibilityChange)},t.prototype.clear=function(){clearTimeout(this.timeout)},t.prototype.pause=function(){"playing"==this.state&&(this.state="paused",this.clear())},t.prototype.unpause=function(){"paused"==this.state&&this.play()},t.prototype.visibilityChange=function(){this[document.hidden?"pause":"unpause"]()},t.prototype.visibilityPlay=function(){this.play(),document.removeEventListener("visibilitychange",this.onVisibilityPlay)},m.extend(D.defaults,{pauseAutoPlayOnHover:!0}),D.createMethods.push("_createPlayer");const i=D.prototype;i._createPlayer=function(){this.player=new t(this),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)},i.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),this.element.addEventListener("mouseenter",this))},i.playPlayer=function(){this.player.play()},i.stopPlayer=function(){this.player.stop()},i.pausePlayer=function(){this.player.pause()},i.unpausePlayer=function(){this.player.unpause()},i.deactivatePlayer=function(){this.player.stop(),this.element.removeEventListener("mouseenter",this)},i.onmouseenter=function(){this.options.pauseAutoPlayOnHover&&(this.player.pause(),this.element.addEventListener("mouseleave",this))},i.onmouseleave=function(){this.player.unpause(),this.element.removeEventListener("mouseleave",this)},D.Player=t})();const _=class{constructor(s){t(this,s),this.nanoSlidesDidLoad=i(this,"nanoSlidesDidLoad",7),this.nanoSlidesReady=i(this,"nanoSlidesReady",7),this.nanoSlidesSelect=i(this,"nanoSlidesSelect",7),this.nanoSlidesChange=i(this,"nanoSlidesChange",7),this.nanoSlidesScroll=i(this,"nanoSlidesScroll",7),this.nanoSlidesTransitionEnd=i(this,"nanoSlidesTransitionEnd",7),this.nanoSlidesDragStart=i(this,"nanoSlidesDragStart",7),this.nanoSlidesDragMove=i(this,"nanoSlidesDragMove",7),this.nanoSlidesDragEnd=i(this,"nanoSlidesDragEnd",7),this.nanoSlidesTap=i(this,"nanoSlidesTap",7),this.nanoSlidesFullscreenChange=i(this,"nanoSlidesFullscreenChange",7)}flickityEl;flickityReady=!1;mutationO;resizeO;readyflickity;flickity=new Promise((t=>{this.readyflickity=t}));syncflickity;childrenEles;hasFullScreenModule=!1;hasLazyLoadModule=!1;hasDotsModule=!1;hasFadeModule=!1;iCurrentSlide;slidesReady;didInit=!1;get host(){return s(this)}options={};async optionsChanged(){if(this.flickityReady){const t=await this.getflickity(),i=Object.assign(t.options,this.options);await this.loadFlickityModules(i),await this.update()}}navbtns=!1;async navbtnsChanged(){Array.from(this._getRoot().querySelectorAll(".flickity-prev-next-button")).forEach((t=>{t.hidden=!this.navbtns}))}pager=!1;async pagerChanged(){const t=this._getRoot().querySelector(".flickity-page-dots");t&&(t.hidden=!this.pager)}fullscreenbtn=!1;async fullscreenBtnChanged(){const t=this._getRoot().querySelector(".flickity-fullscreen-button");t&&(t.hidden=!this.fullscreenbtn)}fullscreen=!1;async fullscreenChanged(t,i){const s=await this.getflickity();this.fullscreen?s.viewFullscreen():void 0!==i&&s.exitFullscreen()}animation="scroll";async animationChange(t,i){const[s,n]=await Promise.all([this.getflickity(),q(this.host)]);if(n.forEach((t=>{t.style.left=void 0})),"parallax"===i&&(s.off("scroll",this.parallax),n.forEach(((t,i)=>{this.childrenEles&&this.childrenEles[i]&&(this.childrenEles[i].style.transform=void 0)})),this.update()),"function"==typeof i&&s.off("scroll",i),"function"==typeof this.animation)return this.options={fade:!1,percentPosition:!0},void s.on("scroll",this.animation);switch(this.animation){case"fade":this.options={fade:!0,percentPosition:!0};break;case"parallax":this.options={fade:!1,percentPosition:!0},s.on("scroll",this.parallax);break;default:this.options={fade:!1,percentPosition:!0}}}currentSlide=0;currentSlideChange(){this.currentSlide!==this.iCurrentSlide&&this.slideTo(this.currentSlide)}internalSlideChange(){this.currentSlide=this.iCurrentSlide}autoplay=!1;async autoPlayChange(){await this.stopAutoplay(),this.autoplay&&("string"==typeof this.autoplay&&(this.autoplay=parseInt(this.autoplay)),this.autoplay>0&&this.startAutoplay(this.autoplay))}ready=!1;nanoSlidesDidLoad;nanoSlidesReady;nanoSlidesSelect;nanoSlidesChange;nanoSlidesScroll;nanoSlidesTransitionEnd;nanoSlidesDragStart;nanoSlidesDragMove;nanoSlidesDragEnd;nanoSlidesTap;nanoSlidesFullscreenChange;async update(){const[t]=await Promise.all([this.getflickity(),q(this.host)]);this.childrenEles=this.host.querySelectorAll(`${h("nano-slide")} > *`),t.reloadCells(),t.resize(),t.reposition()}async slideTo(t,i){(await this.getflickity()).select(t,i)}async slideNext(t,i){(await this.getflickity()).next(i,t)}async slidePrev(t,i){(await this.getflickity()).previous(t,i)}async getActiveIndex(){return(await this.getflickity()).selectedIndex}async length(){return(await this.getflickity()).slides.length}async isEnd(){const t=await this.getflickity();return t.selectedIndex===t.slides.length-1}async isBeginning(){return 0===(await this.getflickity()).selectedIndex}async startAutoplay(t){const i=await this.getflickity();t&&(this.options={autoPlay:t}),setTimeout((()=>i.playPlayer()))}async stopAutoplay(){(await this.getflickity()).stopPlayer()}async lockSwipes(t){const i=await this.getflickity();i.options.draggable=!t,i.updateDraggable()}async getflickity(){return this.flickity}async reload(){this.destroyflickity(),setTimeout((()=>this.initflickity()),20)}_getRoot(){return this.host.shadowRoot?this.host.shadowRoot:this.host}parallax=async()=>{const t=await this.flickity;t.cells.forEach((i=>{let s=t.x;var n;t.options.wrapAround&&t.cells.length>1&&(s=(s%(n=t.slideableWidth)+n)%n,s-=t.slideableWidth);let e=-1*(i.target+s)/3;i.shift<0?e=-1*(i.target-t.slideableWidth+s)/3:i.shift>0&&(e=-1*(i.target+(s+t.slideableWidth))/3),i.element.children[0].style.transform="translate3d("+e+"px, 0, 0)",i.element.style.setProperty("--animation-amount",(3*e/i.size.width*100).toString())}))};handleFullscreen=t=>{this.fullscreen=t,this.nanoSlidesFullscreenChange.emit(t)};handleSlideSelect=t=>{this.iCurrentSlide=t,this.nanoSlidesSelect.emit(t)};destroyflickity(){const t=this.syncflickity;void 0!==t&&(t.destroy(),this.flickity=new Promise((t=>{this.readyflickity=t})),this.flickityReady=!1,this.syncflickity=void 0,this.ready=!1),this.didInit=!1}async loadFlickityModules(t){!this.hasFullScreenModule&&t.fullscreen&&(await import("./fullscreen-CLTOaIQ8.js"),this.hasFullScreenModule=!0),!this.hasLazyLoadModule&&t.lazyLoad&&(await import("./lazyload-CBLyQMEG.js"),this.hasLazyLoadModule=!0),!this.hasDotsModule&&t.pageDots&&(await import("./page-dots-2yJYdWP9.js"),this.hasDotsModule=!0),!this.hasFadeModule&&t.fade&&(await import("./fade-BwtMNpw7.js"),this.hasFadeModule=!0)}async initflickity(){const t=this.normalizeOptions();await this.loadFlickityModules(t),await q(this.host),this.flickityEl=this.flickityEl||this._getRoot().querySelector(".flickity-container"),this.flickityEl&&(this.slidesReady=!0,this.flickityEl.classList.contains("flickity-enabled")&&this.destroyflickity(),this.flickityEl.style.height=this.flickityEl.getBoundingClientRect().height+"px",setTimeout((()=>{this.flickityEl.style.height="";const i=new U(this.flickityEl,t);this.flickityReady=!0,this.syncflickity=i,this.animationChange(),this.navbtnsChanged(),this.pagerChanged(),this.fullscreenChanged(),this.fullscreenBtnChanged(),this.readyflickity(i),this.ready=!0,window.ResizeObserver&&(this.resizeO&&(this.resizeO.disconnect(),this.resizeO=void 0),(this.resizeO=new ResizeObserver((()=>{n((()=>{const t=this.host.shadowRoot.querySelector(".flickity-viewport");e((()=>{t&&(t.style.height=""),i.resize()}))}))}))).observe(this.host))}),100))}normalizeOptions(){const t={cellSelector:h("nano-slide"),contain:!0,prevNextButtons:!0,fullscreen:this.fullscreen,accessibility:!0,imagesLoaded:!0,pageDots:this.pager};"fade"===this.animation&&(t.fade=!0),this.currentSlide>0&&(t.initialIndex=this.currentSlide),this.autoplay&&("string"==typeof this.autoplay&&(this.autoplay=parseInt(this.autoplay)),this.autoplay>0&&(t.autoPlay=this.autoplay));const i={on:{...this.options&&this.options.on?this.options.on:{},ready:()=>{setTimeout((()=>{this.nanoSlidesReady.emit()}),20)},select:this.handleSlideSelect,change:this.nanoSlidesChange.emit,scroll:this.nanoSlidesScroll.emit,settle:()=>requestAnimationFrame((()=>this.nanoSlidesTransitionEnd.emit())),dragStart:()=>requestAnimationFrame((()=>this.nanoSlidesDragStart.emit())),dragMove:()=>requestAnimationFrame((()=>this.nanoSlidesDragMove.emit())),dragEnd:()=>requestAnimationFrame((()=>this.nanoSlidesDragEnd.emit())),staticClick:this.nanoSlidesTap.emit,fullscreenChange:this.handleFullscreen}};return{...t,...i,...this.options}}componentDidLoad(){"undefined"!=typeof window&&window.MutationObserver&&(this.mutationO=new MutationObserver((t=>{t[0].addedNodes[0]&&t[0].addedNodes[0].nodeName.toLowerCase()===h("nano-slide")&&this.flickityReady&&this.update()}))).observe(this.host,{childList:!0,subtree:!0})}componentWillLoad(){this.nanoSlidesDidLoad.emit(),this.didInit||(this.didInit=!0,this.initflickity())}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0),this.resizeO&&(this.resizeO.disconnect(),this.resizeO=void 0),this.destroyflickity()}render(){return c(o,{key:"4f3e88fcb168e5504c1cbb7649eb7233f235dff7",class:"nano-slides"},c("div",{key:"0c80e9c3b733ee41f6b06a473eeef9ab06eae1cd",class:{slideshow:!0,ready:this.ready,"not-ready":!this.ready},part:"base"},c("div",{key:"beae0495f2effa9d6bb5d6a093fd76b50bd3027e",ref:t=>this.flickityEl=t,class:{"flickity-container":!0,"slides-ready":this.slidesReady,"slides-not-ready":!this.slidesReady},part:"slide-container"},c("slot",{key:"89282a60c520a65e2155836ab66f698520b47721"})),c("div",{key:"fd3e6b6fb4d75ceb6002b389e63930d69965d304",class:"ui-extras"},c("slot",{key:"8dfacb9cc08a4fc13f998b9a97e5079640fe5ede",name:"ui"}))))}static get watchers(){return{options:["optionsChanged"],navbtns:["navbtnsChanged"],pager:["pagerChanged"],fullscreenbtn:["fullscreenBtnChanged"],fullscreen:["fullscreenChanged"],animation:["animationChange"],currentSlide:["currentSlideChange"],iCurrentSlide:["internalSlideChange"],autoplay:["autoPlayChange"]}}},q=t=>{const i=Array.from(t.querySelectorAll(h("nano-slide")));let s=i.filter((t=>!t.ready));return s.length?new Promise((n=>{const e=o=>{s=s.filter((t=>t!==o.target)),s.length||(n(i),t.removeEventListener("nanoSlideReady",e),t.removeEventListener("nano-slide-ready",e))};t.addEventListener("nanoSlideReady",e),t.addEventListener("nano-slide-ready",e)})):Promise.resolve(i)};_.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{--dot-color:var(--nano-color-neutral-400);--dot-color-active:var(--nano-color-primary-1000);--navbtns-icon-color:var(--dot-color-active);--navbtns-bg-color:transparent;--navbtns-icon-color-disabled:var(--dot-color-active);--navbtns-bg-color-disabled:transparent;--navbtns-width:1.875rem;--navbtns-height:2.75rem;--fsbtn-icon-color:var(--dot-color-active);--fsbtn-bg-color:transparent;--flip-icon-ltr:0;--flip-icon-rtl:1;display:block;-webkit-user-select:none;user-select:none;overflow:hidden;transition:opacity 0.2s;opacity:0;max-inline-size:100vw}:host:dir(rtl){--flip-icon-ltr:1;--flip-icon-rtl:0}:host([ready]){opacity:1}.slideshow{max-block-size:100%;min-block-size:inherit;block-size:inherit;position:relative}.slideshow.not-ready{inline-size:100%;max-block-size:300px;overflow:hidden}.flickity-container{opacity:0;transition:opacity 0.2s;display:flex;inline-size:fit-content;block-size:fit-content}.not-ready .flickity-container{inline-size:fit-content;block-size:fit-content}.flickity-container.slides-ready{min-block-size:inherit;max-block-size:inherit;block-size:inherit;inline-size:auto}[hidden]{display:none !important}.ui-extras{pointer-events:none;position:absolute;block-size:100%;inline-size:100%;inset-block-start:0;inset-inline-start:0}.ui-extras *{pointer-events:all}/*! Flickity v2.2.1\nhttps://flickity.metafizzy.co\n---------------------------------------------- */.flickity-enabled{position:relative;opacity:1}.flickity-enabled:focus{outline:none}.flickity-viewport{overflow:hidden;position:relative;min-block-size:100%;flex:1}.flickity-slider{position:absolute;inline-size:100%;block-size:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:grabbing}.flickity-button{position:absolute;background:var(--navbtns-bg-color);border:none;color:#333;opacity:0.75}.flickity-button:hover{opacity:1;cursor:pointer}.flickity-button:focus{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}.flickity-button:active{opacity:0.6}.flickity-button:disabled{opacity:0.3;cursor:auto;pointer-events:none;background:var(--navbtns-bg-color-disabled)}.button-icon{display:block}.button-icon::after{content:"";display:block;background-size:cover;inline-size:var(--navbtns-width);block-size:var(--navbtns-height);background-color:var(--navbtns-icon-color);-webkit-mask-image:var(--nano-component-icon-chevron);mask-image:var(--nano-component-icon-chevron);transition:color var(--nano-transition-fast) ease;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;transform-origin:center;margin-inline-start:auto;rotate:calc(180deg * var(--flip-icon-ltr));-webkit-mask-size:cover;mask-size:cover}.button-icon--previous::after{rotate:calc(180deg * var(--flip-icon-rtl))}.flickity-button:disabled .button-icon::after{background-color:var(--navbtns-icon-color-disabled)}.flickity-prev-next-button{inset-block-start:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{inset-inline-start:10px}.flickity-prev-next-button.next{inset-inline-end:10px}.flickity-rtl .flickity-prev-next-button.previous{inset-inline:auto 10px}.flickity-rtl .flickity-prev-next-button.next{inset-inline:10px auto}.flickity-prev-next-button .flickity-button-icon{position:absolute;inset-inline-start:20%;inset-block-start:20%;inline-size:60%;block-size:60%}.flickity-page-dots{position:absolute;inline-size:100%;padding:0;margin:0;text-align:center;line-height:1;z-index:4;display:inline-flex;justify-content:center;inset-block-end:0}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{all:unset;text-indent:200%;white-space:nowrap;overflow:hidden;display:inline-block;display:inline-block;position:relative;inline-size:1.25rem;block-size:0.375rem;margin-block:0;cursor:pointer;padding:calc(var(--nano-spacing-md) / 2)}.flickity-page-dots .dot::after{content:"";position:absolute;inset:0;background:currentcolor;background:var(--dot-color);margin:calc(var(--nano-spacing-md) / 2)}.flickity-page-dots .dot:focus-visible{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset);z-index:1}.flickity-page-dots .dot.is-selected::after{background:var(--dot-color-active)}.flickity-enabled.is-fullscreen{position:fixed;inset-inline-start:0;inset-block-start:0;inline-size:100%;block-size:100%;background:hsla(0, 0%, 0%, 0.9);padding-block-end:35px;z-index:100}.flickity-enabled.is-fullscreen .flickity-page-dots{inset-block-end:45px}html.is-flickity-fullscreen{overflow:hidden}.flickity-fullscreen-button{display:block;inset-inline-end:10px;inset-block-start:10px;inline-size:24px;block-size:24px;border-radius:4px;background:var(--fsbtn-bg-color);fill:var(--fsbtn-icon-color)}.flickity-rtl .flickity-fullscreen-button{inset-inline:10px auto}.flickity-fullscreen-button-exit{display:none}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-exit{display:block}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-view{display:none}.flickity-fullscreen-button .flickity-button-icon{position:absolute;inline-size:16px;block-size:16px;inset-inline-start:4px;inset-block-start:4px}.flickity-enabled.is-fade .flickity-slider>*{pointer-events:none;z-index:0}.flickity-enabled.is-fade .flickity-slider ::slotted(.is-selected){pointer-events:auto;z-index:1}';export{D as F,_ as S,R as U,m as u}
|
22
|
+
function(){},O.onpointercancel=function(t){t.pointerId==this.pointerIdentifier&&this._pointerCancel(t,t)},O.ontouchcancel=function(t){const i=this.getTouch(t.changedTouches);i&&this._pointerCancel(t,i)},O._pointerCancel=function(t,i){this._pointerDone(),this.pointerCancel(t,i)},O.pointerCancel=function(t,i){this.emitEvent("pointerCancel",[t,i])},R.getPointerPoint=function(t){return{x:t.pageX,y:t.pageY}};const B=N.prototype=Object.create(R.prototype);B.bindHandles=function(){this._bindHandles(!0)},B.unbindHandles=function(){this._bindHandles(!1)},B._bindHandles=function(t){const i=(t=void 0===t||t)?"addEventListener":"removeEventListener",s=t?this._touchActionValue:"";for(let n=0;n<this.handles.length;n++){const e=this.handles[n];this._bindStartEvent(e,t),e[i]("click",this),window.PointerEvent&&(e.style.touchAction=s)}},B._touchActionValue="none",B.pointerDown=function(t,i){this.okayPointerDown(t)&&(this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY},t.preventDefault(),this.pointerDownBlur(),this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,i]))};const I={TEXTAREA:!0,INPUT:!0,SELECT:!0,OPTION:!0},W={radio:!0,checkbox:!0,button:!0,submit:!0,image:!0,file:!0};B.okayPointerDown=function(t){const i=!I[t.target.nodeName]||W[t.target.type];return i||this._pointerReset(),i},B.pointerDownBlur=function(){const t=document.activeElement;t&&t.blur&&t!=document.body&&t.blur()},B.pointerMove=function(t,i){const s=this._dragPointerMove(t,i);this.emitEvent("pointerMove",[t,i,s]),this._dragMove(t,i,s)},B._dragPointerMove=function(t,i){const s={x:i.pageX-this.pointerDownPointer.pageX,y:i.pageY-this.pointerDownPointer.pageY};return!this.isDragging&&this.hasDragStarted(s)&&this._dragStart(t,i),s},B.hasDragStarted=function(t){return Math.abs(t.x)>3||Math.abs(t.y)>3},B.pointerUp=function(t,i){this.emitEvent("pointerUp",[t,i]),this._dragPointerUp(t,i)},B._dragPointerUp=function(t,i){this.isDragging?this._dragEnd(t,i):this._staticClick(t,i)},B._dragStart=function(t,i){this.isDragging=!0,this.isPreventingClicks=!0,this.dragStart(t,i)},B.dragStart=function(t,i){this.emitEvent("dragStart",[t,i])},B._dragMove=function(t,i,s){this.isDragging&&this.dragMove(t,i,s)},B.dragMove=function(t,i,s){t.preventDefault(),this.emitEvent("dragMove",[t,i,s])},B._dragEnd=function(t,i){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(t,i)},B.dragEnd=function(t,i){this.emitEvent("dragEnd",[t,i])},B.onclick=function(t){this.isPreventingClicks&&t.preventDefault()},B._staticClick=function(t,i){this.isIgnoringMouseUp&&"mouseup"==t.type||(this.staticClick(t,i),"mouseup"!=t.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},B.staticClick=function(t,i){this.emitEvent("staticClick",[t,i])},N.getPointerPoint=R.getPointerPoint;const q=P;(()=>{m.extend(P.defaults,{draggable:">1",dragThreshold:3}),P.createMethods.push("_createDrag");const t=P.prototype;m.extend(t,N.prototype),t._touchActionValue="pan-y";const i="createTouch"in document;let s=!1;t._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable),i&&!s&&(window.addEventListener("touchmove",(function(){})),s=!0)},t.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},t.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},t.updateDraggable=function(){this.isDraggable=">1"==this.options.draggable?this.slides.length>1:this.options.draggable,this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},t.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},t.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},t._uiChangeDrag=function(){delete this.isFreeScrolling},t.pointerDown=function(t,i){this.isDraggable?this.okayPointerDown(t)&&(this._pointerDownPreventDefault(t),this.pointerDownFocus(t),document.activeElement!=this.element&&this.pointerDownBlur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=e(),window.addEventListener("scroll",this),this._pointerDownDefault(t,i)):this._pointerDownDefault(t,i)},t._pointerDownDefault=function(t,i){this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY},this._bindPostStartEvents(t),this.dispatchEvent("pointerDown",t,[i])};const n={INPUT:!0,TEXTAREA:!0,SELECT:!0};function e(){return{x:window.scrollX,y:window.scrollY}}t.pointerDownFocus=function(t){n[t.target.nodeName]||this.focus()},t._pointerDownPreventDefault=function(t){"touchstart"==t.type||"touch"==t.pointerType||n[t.target.nodeName]||t.preventDefault()},t.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold},t.pointerUp=function(t,i){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[i]),this._dragPointerUp(t,i)},t.pointerDone=function(){window.removeEventListener("scroll",this),delete this.pointerDownScroll},t.dragStart=function(t,i){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),window.removeEventListener("scroll",this),this.dispatchEvent("dragStart",t,[i]))},t.pointerMove=function(t,i){const s=this._dragPointerMove(t,i);this.dispatchEvent("pointerMove",t,[i,s]),this._dragMove(t,i,s)},t.dragMove=function(t,i,s){if(!this.isDraggable)return;t.preventDefault(),this.previousDragX=this.dragX;const n=this.options.rightToLeft?-1:1;this.options.wrapAround&&(s.x=s.x%this.slideableWidth);let e=this.dragStartPosition+s.x*n;if(!this.options.wrapAround&&this.slides.length){const t=Math.max(-this.slides[0].target,this.dragStartPosition);e=e>t?.5*(e+t):e;const i=Math.min(-this.getLastSlide().target,this.dragStartPosition);e=e<i?.5*(e+i):e}this.dragX=e,this.dragMoveTime=new Date,this.dispatchEvent("dragMove",t,[i,s])},t.dragEnd=function(t,i){if(!this.isDraggable)return;this.options.freeScroll&&(this.isFreeScrolling=!0);let s=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){const t=this.getRestingPosition();this.isFreeScrolling=-t>this.slides[0].target&&-t<this.getLastSlide().target}else this.options.freeScroll||s!=this.selectedIndex||(s+=this.dragEndBoostSelect());delete this.previousDragX,this.isDragSelect=this.options.wrapAround,this.select(s),delete this.isDragSelect,this.dispatchEvent("dragEnd",t,[i])},t.dragEndRestingSelect=function(){const t=this.getRestingPosition(),i=Math.abs(this.getSlideDistance(-t,this.selectedIndex)),s=this._getClosestResting(t,i,1),n=this._getClosestResting(t,i,-1);return s.distance<n.distance?s.index:n.index},t._getClosestResting=function(t,i,s){let n=this.selectedIndex,e=1/0;const o=this.options.contain&&!this.options.wrapAround?function(t,i){return t<=i}:function(t,i){return t<i};for(;o(i,e)&&(n+=s,e=i,null!==(i=this.getSlideDistance(-t,n)));)i=Math.abs(i);return{distance:e,index:n-s}},t.getSlideDistance=function(t,i){const s=this.slides.length,n=this.options.wrapAround&&s>1,e=n?m.modulo(i,s):i,o=this.slides[e];if(!o)return null;const h=n?this.slideableWidth*Math.floor(i/s):0;return t-(o.target+h)},t.dragEndBoostSelect=function(){if(void 0===this.previousDragX||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;const t=this.getSlideDistance(-this.dragX,this.selectedIndex),i=this.previousDragX-this.dragX;return t>0&&i>0?1:t<0&&i<0?-1:0},t.staticClick=function(t,i){const s=this.getParentCell(t.target),n=s&&s.element,e=s&&this.cells.indexOf(s);this.dispatchEvent("staticClick",t,[i,n,e])},t.onscroll=function(){const t=e(),i=this.pointerDownScroll.y-t.y;(Math.abs(this.pointerDownScroll.x-t.x)>3||Math.abs(i)>3)&&this._pointerDone()}})(),(()=>{function t(t,i){this.direction=t,this.parent=i,this.parentElement=this.parent.element.shadowRoot||this.parent.element,this._create()}(t.prototype=Object.create(R.prototype))._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction,this.isLeft=this.direction==(this.parent.options.rightToLeft?1:-1);const t=this.element=document.createElement("button");t.className="flickity-button flickity-prev-next-button",t.part.add("navigation-button"),this.isPrevious?(t.classList.add("previous"),t.part.add("navigation-button--previous")):(t.classList.add("next"),t.part.add("navigation-button--next")),t.setAttribute("type","button"),this.disable(),t.setAttribute("aria-label",this.isPrevious?"Previous":"Next");const i=document.createElement("slot");i.name=this.isPrevious?"previous-icon":"next-icon",t.appendChild(i),i.addEventListener("slotchange",(()=>{i.assignedElements({flatten:!0}).forEach((t=>{t.removeAttribute("hidden")}))}));const s=document.createElement("span");s.className="button-icon "+(this.isPrevious?"button-icon--previous":"button-icon--next"),s.part.add("navigation-icon"),i.appendChild(s),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},t.prototype.activate=function(){this.bindStartEvent(this.element),this.element.addEventListener("click",this),this.parentElement.appendChild(this.element)},t.prototype.deactivate=function(){this.parentElement.removeChild(this.element),this.unbindStartEvent(this.element),this.element.removeEventListener("click",this)},t.prototype.handleEvent=m.handleEvent,t.prototype.onclick=function(){this.isEnabled&&(this.parent.uiChange(),this.parent[this.isPrevious?"previous":"next"]())},t.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},t.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},t.prototype.update=function(){const t=this.parent.slides;this.parent.options.wrapAround&&t.length>1?this.enable():this[this.parent.selectedIndex==(this.isPrevious?0:t.length?t.length-1:0)?"disable":"enable"]()},t.prototype.destroy=function(){this.deactivate(),this.allOff()},m.extend(P.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),P.createMethods.push("_createPrevNextButtons");const i=P.prototype;i._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new t(-1,this),this.nextButton=new t(1,this),this.on("activate",this.activatePrevNextButtons))},i.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},i.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},P.PrevNextButton=t})(),(()=>{function t(t){this.parent=t,this.state="stopped",this.onVisibilityChange=this.visibilityChange.bind(this),this.onVisibilityPlay=this.visibilityPlay.bind(this)}(t.prototype=Object.create(r.prototype)).play=function(){"playing"!=this.state&&(document.hidden?document.addEventListener("visibilitychange",this.onVisibilityPlay):(this.state="playing",document.addEventListener("visibilitychange",this.onVisibilityChange),this.tick()))},t.prototype.tick=function(){if("playing"!=this.state)return;let t=this.parent.options.autoPlay;t="number"==typeof t?t:3e3;const i=this;this.clear(),this.timeout=setTimeout((function(){i.parent.next(!0),i.tick()}),t)},t.prototype.stop=function(){this.state="stopped",this.clear(),document.removeEventListener("visibilitychange",this.onVisibilityChange)},t.prototype.clear=function(){clearTimeout(this.timeout)},t.prototype.pause=function(){"playing"==this.state&&(this.state="paused",this.clear())},t.prototype.unpause=function(){"paused"==this.state&&this.play()},t.prototype.visibilityChange=function(){this[document.hidden?"pause":"unpause"]()},t.prototype.visibilityPlay=function(){this.play(),document.removeEventListener("visibilitychange",this.onVisibilityPlay)},m.extend(P.defaults,{pauseAutoPlayOnHover:!0}),P.createMethods.push("_createPlayer");const i=P.prototype;i._createPlayer=function(){this.player=new t(this),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)},i.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),this.element.addEventListener("mouseenter",this))},i.playPlayer=function(){this.player.play()},i.stopPlayer=function(){this.player.stop()},i.pausePlayer=function(){this.player.pause()},i.unpausePlayer=function(){this.player.unpause()},i.deactivatePlayer=function(){this.player.stop(),this.element.removeEventListener("mouseenter",this)},i.onmouseenter=function(){this.options.pauseAutoPlayOnHover&&(this.player.pause(),this.element.addEventListener("mouseleave",this))},i.onmouseleave=function(){this.player.unpause(),this.element.removeEventListener("mouseleave",this)},P.Player=t})();const U=class{constructor(s){t(this,s),this.nanoSlidesDidLoad=i(this,"nanoSlidesDidLoad",7),this.nanoSlidesReady=i(this,"nanoSlidesReady",7),this.nanoSlidesSelect=i(this,"nanoSlidesSelect",7),this.nanoSlidesChange=i(this,"nanoSlidesChange",7),this.nanoSlidesScroll=i(this,"nanoSlidesScroll",7),this.nanoSlidesTransitionEnd=i(this,"nanoSlidesTransitionEnd",7),this.nanoSlidesDragStart=i(this,"nanoSlidesDragStart",7),this.nanoSlidesDragMove=i(this,"nanoSlidesDragMove",7),this.nanoSlidesDragEnd=i(this,"nanoSlidesDragEnd",7),this.nanoSlidesTap=i(this,"nanoSlidesTap",7),this.nanoSlidesFullscreenChange=i(this,"nanoSlidesFullscreenChange",7)}flickityEl;flickityReady=!1;mutationO;resizeO;readyflickity;flickity=new Promise((t=>{this.readyflickity=t}));syncflickity;childrenEles;hasFullScreenModule=!1;hasLazyLoadModule=!1;hasDotsModule=!1;hasFadeModule=!1;iCurrentSlide;slidesReady;didInit=!1;get host(){return s(this)}options={};async optionsChanged(){if(this.flickityReady){const t=await this.getflickity(),i=Object.assign(t.options,this.options);await this.loadFlickityModules(i),await this.update()}}navbtns=!1;async navbtnsChanged(){Array.from(this._getRoot().querySelectorAll(".flickity-prev-next-button")).forEach((t=>{t.hidden=!this.navbtns}))}pager=!1;async pagerChanged(){const t=this._getRoot().querySelector(".flickity-page-dots");t&&(t.hidden=!this.pager)}fullscreenbtn=!1;async fullscreenBtnChanged(){const t=this._getRoot().querySelector(".flickity-fullscreen-button");t&&(t.hidden=!this.fullscreenbtn)}fullscreen=!1;async fullscreenChanged(t,i){const s=await this.getflickity();this.fullscreen?s.viewFullscreen():void 0!==i&&s.exitFullscreen()}animation="scroll";async animationChange(t,i){const[s,n]=await Promise.all([this.getflickity(),X(this.host)]);if(n.forEach((t=>{t.style.left=void 0})),"parallax"===i&&(s.off("scroll",this.parallax),n.forEach(((t,i)=>{this.childrenEles&&this.childrenEles[i]&&(this.childrenEles[i].style.transform=void 0)})),this.update()),"function"==typeof i&&s.off("scroll",i),"function"==typeof this.animation)return this.updateOptions({fade:!1,percentPosition:!0}),void s.on("scroll",this.animation);switch(this.animation){case"fade":this.updateOptions({fade:!0,percentPosition:!0});break;case"parallax":this.updateOptions({fade:!1,percentPosition:!0}),s.on("scroll",this.parallax);break;default:this.updateOptions({fade:!1,percentPosition:!0})}}updateOptions(t){this.options={...this.options,...t}}currentSlide=0;currentSlideChange(){this.currentSlide!==this.iCurrentSlide&&this.slideTo(this.currentSlide)}internalSlideChange(){this.currentSlide=this.iCurrentSlide}autoplay=!1;async autoPlayChange(){await this.stopAutoplay(),this.autoplay&&("string"==typeof this.autoplay&&(this.autoplay=parseInt(this.autoplay)),this.autoplay>0&&this.startAutoplay(this.autoplay))}ready=!1;nanoSlidesDidLoad;nanoSlidesReady;nanoSlidesSelect;nanoSlidesChange;nanoSlidesScroll;nanoSlidesTransitionEnd;nanoSlidesDragStart;nanoSlidesDragMove;nanoSlidesDragEnd;nanoSlidesTap;nanoSlidesFullscreenChange;async update(){const[t]=await Promise.all([this.getflickity(),X(this.host)]);this.childrenEles=this.host.querySelectorAll(`${h("nano-slide")} > *`),t.reloadCells(),t.resize(),t.reposition()}async slideTo(t,i){(await this.getflickity()).select(t,i)}async slideNext(t,i){(await this.getflickity()).next(i,t)}async slidePrev(t,i){(await this.getflickity()).previous(t,i)}async getActiveIndex(){return(await this.getflickity()).selectedIndex}async length(){return(await this.getflickity()).slides.length}async isEnd(){const t=await this.getflickity();return t.selectedIndex===t.slides.length-1}async isBeginning(){return 0===(await this.getflickity()).selectedIndex}async startAutoplay(t){const i=await this.getflickity();t&&(this.options={autoPlay:t}),setTimeout((()=>i.playPlayer()))}async stopAutoplay(){(await this.getflickity()).stopPlayer()}async lockSwipes(t){const i=await this.getflickity();i.options.draggable=!t,i.updateDraggable()}async getflickity(){return this.flickity}async reload(){this.destroyflickity(),setTimeout((()=>this.initflickity()),20)}_getRoot(){return this.host.shadowRoot?this.host.shadowRoot:this.host}parallax=async()=>{const t=await this.flickity;t.cells.forEach((i=>{let s=t.x;var n;t.options.wrapAround&&t.cells.length>1&&(s=(s%(n=t.slideableWidth)+n)%n,s-=t.slideableWidth);let e=-1*(i.target+s)/3;i.shift<0?e=-1*(i.target-t.slideableWidth+s)/3:i.shift>0&&(e=-1*(i.target+(s+t.slideableWidth))/3),i.element.children[0].style.transform="translate3d("+e+"px, 0, 0)",i.element.style.setProperty("--animation-amount",(3*e/i.size.width*100).toString())}))};handleFullscreen=t=>{this.fullscreen=t,this.nanoSlidesFullscreenChange.emit(t)};handleSlideSelect=t=>{this.iCurrentSlide=t,this.nanoSlidesSelect.emit(t)};destroyflickity(){const t=this.syncflickity;void 0!==t&&(t.destroy(),this.flickity=new Promise((t=>{this.readyflickity=t})),this.flickityReady=!1,this.syncflickity=void 0,this.ready=!1),this.didInit=!1}async loadFlickityModules(t){!this.hasFullScreenModule&&t.fullscreen&&(await import("./fullscreen-C0Rg1tXP.js"),this.hasFullScreenModule=!0),!this.hasLazyLoadModule&&t.lazyLoad&&(await import("./lazyload-BGGkN269.js"),this.hasLazyLoadModule=!0),!this.hasDotsModule&&t.pageDots&&(await import("./page-dots-D9sLGqee.js"),this.hasDotsModule=!0),!this.hasFadeModule&&t.fade&&(await import("./fade-DJjEJ3OV.js"),this.hasFadeModule=!0)}async initflickity(){const t=this.normalizeOptions();await this.loadFlickityModules(t),await X(this.host),this.flickityEl=this.flickityEl||this._getRoot().querySelector(".flickity-container"),this.flickityEl&&(this.slidesReady=!0,this.flickityEl.classList.contains("flickity-enabled")&&this.destroyflickity(),this.flickityEl.style.height=this.flickityEl.getBoundingClientRect().height+"px",setTimeout((()=>{this.flickityEl.style.height="";const i=new q(this.flickityEl,t);this.flickityReady=!0,this.syncflickity=i,this.animationChange(),this.navbtnsChanged(),this.pagerChanged(),this.fullscreenChanged(),this.fullscreenBtnChanged(),this.readyflickity(i),this.ready=!0,window.ResizeObserver&&(this.resizeO&&(this.resizeO.disconnect(),this.resizeO=void 0),(this.resizeO=new ResizeObserver((()=>{n((()=>{const t=this.host.shadowRoot.querySelector(".flickity-viewport");e((()=>{t&&(t.style.height=""),i.resize()}))}))}))).observe(this.host))}),100))}normalizeOptions(){const t={cellSelector:h("nano-slide"),contain:!0,prevNextButtons:!0,fullscreen:this.fullscreen,accessibility:!0,imagesLoaded:!0,pageDots:this.pager};"fade"===this.animation&&(t.fade=!0),this.currentSlide>0&&(t.initialIndex=this.currentSlide),this.autoplay&&("string"==typeof this.autoplay&&(this.autoplay=parseInt(this.autoplay)),this.autoplay>0&&(t.autoPlay=this.autoplay));const i={on:{...this.options&&this.options.on?this.options.on:{},ready:()=>{setTimeout((()=>{this.nanoSlidesReady.emit()}),20)},select:this.handleSlideSelect,change:this.nanoSlidesChange.emit,scroll:this.nanoSlidesScroll.emit,settle:()=>requestAnimationFrame((()=>this.nanoSlidesTransitionEnd.emit())),dragStart:()=>requestAnimationFrame((()=>this.nanoSlidesDragStart.emit())),dragMove:()=>requestAnimationFrame((()=>this.nanoSlidesDragMove.emit())),dragEnd:()=>requestAnimationFrame((()=>this.nanoSlidesDragEnd.emit())),staticClick:this.nanoSlidesTap.emit,fullscreenChange:this.handleFullscreen}};return{...t,...i,...this.options}}componentDidLoad(){"undefined"!=typeof window&&window.MutationObserver&&(this.mutationO=new MutationObserver((t=>{t[0].addedNodes[0]&&t[0].addedNodes[0].nodeName.toLowerCase()===h("nano-slide")&&this.flickityReady&&this.update()}))).observe(this.host,{childList:!0,subtree:!0})}componentWillLoad(){this.nanoSlidesDidLoad.emit(),this.didInit||(this.didInit=!0,this.initflickity())}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0),this.resizeO&&(this.resizeO.disconnect(),this.resizeO=void 0),this.destroyflickity()}render(){return c(o,{key:"42935259126aea21edcf5ecb256d0c1fbbde543a",class:"nano-slides"},c("div",{key:"933ffba7ee7036d4a8e7fddac8396eaf6b53ad9f",class:{slideshow:!0,ready:this.ready,"not-ready":!this.ready},part:"base"},c("div",{key:"5cd48261734c266f25f83cf63b60300c94868d52",ref:t=>this.flickityEl=t,class:{"flickity-container":!0,"slides-ready":this.slidesReady,"slides-not-ready":!this.slidesReady},part:"slide-container"},c("slot",{key:"b04069a6bdbc76261a431b22660d012c25a8fb14"})),c("div",{key:"978e708ec781ff7aadc3928560f704669c60c1ab",class:"ui-extras"},c("slot",{key:"fd930c490857b9fab6b088015178151003f00f62",name:"ui"}))))}static get watchers(){return{options:["optionsChanged"],navbtns:["navbtnsChanged"],pager:["pagerChanged"],fullscreenbtn:["fullscreenBtnChanged"],fullscreen:["fullscreenChanged"],animation:["animationChange"],currentSlide:["currentSlideChange"],iCurrentSlide:["internalSlideChange"],autoplay:["autoPlayChange"]}}},X=t=>{const i=Array.from(t.querySelectorAll(h("nano-slide")));let s=i.filter((t=>!t.ready));return s.length?new Promise((n=>{const e=o=>{s=s.filter((t=>t!==o.target)),s.length||(n(i),t.removeEventListener("nanoSlideReady",e),t.removeEventListener("nano-slide-ready",e))};t.addEventListener("nanoSlideReady",e),t.addEventListener("nano-slide-ready",e)})):Promise.resolve(i)};U.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{--dot-color:var(--nano-color-neutral-400);--dot-color-active:var(--nano-color-primary-1000);--navbtns-icon-color:var(--dot-color-active);--navbtns-bg-color:transparent;--navbtns-icon-color-disabled:var(--dot-color-active);--navbtns-bg-color-disabled:transparent;--navbtns-width:1.875rem;--navbtns-height:2.75rem;--fsbtn-icon-color:var(--dot-color-active);--fsbtn-bg-color:transparent;--flip-icon-ltr:0;--flip-icon-rtl:1;display:block;-webkit-user-select:none;user-select:none;overflow:hidden;transition:opacity 0.2s;opacity:0;max-inline-size:100vw}:host:dir(rtl){--flip-icon-ltr:1;--flip-icon-rtl:0}:host([ready]){opacity:1}.slideshow{max-block-size:100%;min-block-size:inherit;block-size:inherit;position:relative}.slideshow.not-ready{inline-size:100%;max-block-size:300px;overflow:hidden}.flickity-container{opacity:0;transition:opacity 0.2s;display:flex;inline-size:fit-content;block-size:fit-content}.not-ready .flickity-container{inline-size:fit-content;block-size:fit-content}.flickity-container.slides-ready{min-block-size:inherit;max-block-size:inherit;block-size:inherit;inline-size:auto}[hidden]{display:none !important}.ui-extras{pointer-events:none;position:absolute;block-size:100%;inline-size:100%;inset-block-start:0;inset-inline-start:0}.ui-extras *{pointer-events:all}/*! Flickity v2.2.1\nhttps://flickity.metafizzy.co\n---------------------------------------------- */.flickity-enabled{position:relative;opacity:1}.flickity-enabled:focus{outline:none}.flickity-viewport{overflow:hidden;position:relative;min-block-size:100%;flex:1}.flickity-slider{position:absolute;inline-size:100%;block-size:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:grabbing}.flickity-button{position:absolute;background:var(--navbtns-bg-color);border:none;color:#333;opacity:0.75}.flickity-button:hover{opacity:1;cursor:pointer}.flickity-button:focus{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}.flickity-button:active{opacity:0.6}.flickity-button:disabled{opacity:0.3;cursor:auto;pointer-events:none;background:var(--navbtns-bg-color-disabled)}.button-icon{display:block}.button-icon::after{content:"";display:block;background-size:cover;inline-size:var(--navbtns-width);block-size:var(--navbtns-height);background-color:var(--navbtns-icon-color);-webkit-mask-image:var(--nano-component-icon-chevron);mask-image:var(--nano-component-icon-chevron);transition:color var(--nano-transition-fast) ease;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;transform-origin:center;margin-inline-start:auto;rotate:calc(180deg * var(--flip-icon-ltr));-webkit-mask-size:cover;mask-size:cover}.button-icon--previous::after{rotate:calc(180deg * var(--flip-icon-rtl))}.flickity-button:disabled .button-icon::after{background-color:var(--navbtns-icon-color-disabled)}.flickity-prev-next-button{inset-block-start:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{inset-inline-start:10px}.flickity-prev-next-button.next{inset-inline-end:10px}.flickity-rtl .flickity-prev-next-button.previous{inset-inline:auto 10px}.flickity-rtl .flickity-prev-next-button.next{inset-inline:10px auto}.flickity-prev-next-button .flickity-button-icon{position:absolute;inset-inline-start:20%;inset-block-start:20%;inline-size:60%;block-size:60%}.flickity-page-dots{position:absolute;inline-size:100%;padding:0;margin:0;text-align:center;line-height:1;z-index:4;display:inline-flex;justify-content:center;inset-block-end:0}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{all:unset;text-indent:200%;white-space:nowrap;overflow:hidden;display:inline-block;display:inline-block;position:relative;inline-size:1.25rem;block-size:0.375rem;margin-block:0;cursor:pointer;padding:calc(var(--nano-spacing-md) / 2)}.flickity-page-dots .dot::after{content:"";position:absolute;inset:0;background:currentcolor;background:var(--dot-color);margin:calc(var(--nano-spacing-md) / 2)}.flickity-page-dots .dot:focus-visible{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset);z-index:1}.flickity-page-dots .dot.is-selected::after{background:var(--dot-color-active)}.flickity-enabled.is-fullscreen{position:fixed;inset-inline-start:0;inset-block-start:0;inline-size:100%;block-size:100%;background:hsla(0, 0%, 0%, 0.9);padding-block-end:35px;z-index:100}.flickity-enabled.is-fullscreen .flickity-page-dots{inset-block-end:45px}html.is-flickity-fullscreen{overflow:hidden}.flickity-fullscreen-button{display:block;inset-inline-end:10px;inset-block-start:10px;inline-size:24px;block-size:24px;border-radius:4px;background:var(--fsbtn-bg-color);fill:var(--fsbtn-icon-color)}.flickity-rtl .flickity-fullscreen-button{inset-inline:10px auto}.flickity-fullscreen-button-exit{display:none}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-exit{display:block}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-view{display:none}.flickity-fullscreen-button .flickity-button-icon{position:absolute;inline-size:16px;block-size:16px;inset-inline-start:4px;inset-block-start:4px}.flickity-enabled.is-fade .flickity-slider>*{pointer-events:none;z-index:0}.flickity-enabled.is-fade .flickity-slider ::slotted(.is-selected){pointer-events:auto;z-index:1}';export{P as F,U as S,R as U,m as u}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
export{S as nano_slides}from"./nano-slides-
|
4
|
+
export{S as nano_slides}from"./nano-slides-B1zM-u4Y.js";import"./index-D6WdRvhp.js";import"./renderer-BhDJHRB-.js";
|
@@ -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,U as s}from"./nano-slides-
|
4
|
+
import{F as t,u as i,U as s}from"./nano-slides-B1zM-u4Y.js";import"./index-D6WdRvhp.js";import"./renderer-BhDJHRB-.js";function h(t){this.parent=t,this.parentElement=this.parent.element.shadowRoot||this.parent.element,this._create()}(h.prototype=Object.create(s.prototype))._create=function(){this.holder=document.createElement("div"),this.holder.className="flickity-page-dots",this.holder.part.add("pagination"),this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},h.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.parentElement.appendChild(this.holder)},h.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.parentElement.removeChild(this.holder)},h.prototype.setDots=function(){const t=this.parent.slides.length-this.dots.length;t>0?this.addDots(t):t<0&&this.removeDots(-t)},h.prototype.addDots=function(t){const i=document.createDocumentFragment(),s=[],h=this.dots.length,n=h+t;for(let t=h;t<n;t++){const h=document.createElement("button");h.classList.add("dot"),h.innerText=`Go to slide ${t+1}`,i.appendChild(h),s.push(h)}this.holder.appendChild(i),this.dots=this.dots.concat(s)},h.prototype.removeDots=function(t){this.dots.splice(this.dots.length-t,t).forEach((function(t){this.holder.removeChild(t)}),this)},h.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.classList.remove("is-selected"),this.selectedDot.part.remove("pagination-item--active"),this.selectedDot.removeAttribute("aria-current")),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.classList.add("is-selected"),this.selectedDot.part.add("pagination-item--active"),this.selectedDot.setAttribute("aria-current","step"))},h.prototype.onTap=h.prototype.onClick=function(t){const i=t.target;if("BUTTON"!=i.nodeName)return;this.parent.uiChange();const s=this.dots.indexOf(i);this.parent.select(s)},h.prototype.destroy=function(){this.deactivate(),this.allOff()},t.PageDots=h,i.extend(t.defaults,{pageDots:!0}),t.createMethods.push("_createPageDots");const n=t.prototype;n._createPageDots=function(){this.options.pageDots&&(this.pageDots=new h(this),this.on("activate",this.activatePageDots),this.on("select",this.updateSelectedPageDots),this.on("cellChange",this.updatePageDots),this.on("resize",this.updatePageDots),this.on("deactivate",this.deactivatePageDots))},n.activatePageDots=function(){this.pageDots.activate()},n.updateSelectedPageDots=function(){this.pageDots.updateSelected()},n.updatePageDots=function(){this.pageDots.setDots()},n.deactivatePageDots=function(){this.pageDots.deactivate()},t.PageDots=h;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{c as t}from"./nano-data-table-
|
4
|
+
import{c as t}from"./nano-data-table-TfPKf5LE.js";import"./index-D6WdRvhp.js";import"./renderer-BhDJHRB-.js";import"./math-BEqsTfVK.js";import"./throttle-C93FMm2Z.js";import"./scroll-CRQg8Vf0.js";import"./dom-dabRzt7p.js";import"./index-BC1-owN1.js";const r="table.worker",o="stencil.table.worker",e=new URL("table.worker-BTF0UXAd.js",import.meta.url).href;let s;try{s=t(e,r,o)}catch(p){const i=new Blob(['importScripts("'+e+'")'],{type:"text/javascript"}),m=URL.createObjectURL(i);s=t(m,r,o),URL.revokeObjectURL(m)}export{s as worker,o as workerMsgId,r as workerName,e as workerPath}
|
@@ -1,6 +1,10 @@
|
|
1
1
|
import { EventEmitter, ComponentInterface } from '../../stencil-public-runtime';
|
2
2
|
/**
|
3
|
-
*
|
3
|
+
* Utilities for displaying images; standard or background.
|
4
|
+
*
|
5
|
+
* @status deprecated
|
6
|
+
* @version 1.0.0
|
7
|
+
*
|
4
8
|
* @slot - Main slot. Only relevant with `<nano-img background>`
|
5
9
|
*/
|
6
10
|
export declare class Img implements ComponentInterface {
|