{"version":3,"sources":["../node_modules/@ionic/core/dist/esm-es5/ion-infinite-scroll_2.entry.js"],"names":["InfiniteScroll","i","n","this","registerInstance","ionInfinite","createEvent","thrPx","thrPc","didFire","isBusy","isLoading","threshold","disabled","position","onScroll","scrollEl","canStart","t","el","offsetHeight","e","scrollTop","r","scrollHeight","o","s","emit","prototype","thresholdChanged","lastIndexOf","parseFloat","disabledChanged","enableScrollEvents","connectedCallback","__awaiter","__generator","label","closest","getScrollElement","console","error","sent","writeTask","clientHeight","disconnectedCallback","undefined","complete","requestAnimationFrame","readTask","addEventListener","removeEventListener","render","getIonMode","h","Host","class","Object","defineProperty","get","getElement","enumerable","configurable","style","InfiniteScrollContent","componentDidLoad","loadingSpinner","config","name","loadingText","innerHTML","sanitizeDOMString","ios","md"],"mappings":"6GAAA,0JAAsZA,EAAe,WAAW,SAASC,EAAEA,GAAG,IAAIC,EAAEC,KAAKC,YAAiBD,KAAKF,GAAGE,KAAKE,YAAYC,YAAYH,KAAK,cAAc,GAAGA,KAAKI,MAAM,EAAEJ,KAAKK,MAAM,EAAEL,KAAKM,SAAQ,EAAMN,KAAKO,QAAO,EAAMP,KAAKQ,WAAU,EAAMR,KAAKS,UAAU,MAAMT,KAAKU,UAAS,EAAMV,KAAKW,SAAS,SAASX,KAAKY,SAAS,WAAW,IAAId,EAAEC,EAAEc,SAAS,IAAIf,IAAIC,EAAEe,WAAY,OAAO,EAAE,IAAIC,EAAEhB,EAAEiB,GAAGC,aAAa,GAAO,IAAJF,EAAO,OAAO,EAAE,IAAIG,EAAEpB,EAAEqB,UAAcC,EAAEtB,EAAEuB,aAAiBC,EAAExB,EAAEmB,aAAiBM,EAAY,IAAVxB,EAAEM,MAAUiB,EAAEvB,EAAEM,MAAMN,EAAEK,MAAkD,IAAzB,WAAbL,EAAEY,SAAoBS,EAAEL,EAAEG,EAAEK,EAAED,EAAEJ,EAAEH,EAAEQ,GAAO,GAAG,IAAIxB,EAAEO,QAA8D,OAArDP,EAAES,WAAU,E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+D,eAAeC,IAAOR,IAAI,yBAAyBQ,IAAOR,IAAI,UAAc,QAAJ1D,EAAU,QAAQ,eAAeA,EAAE2B,UAAUwB,OAAO,WAAW,IAAInD,EAAMC,EAAEmD,YAAWlD,MAAM,OAAOmD,YAAEC,IAAK,CAACC,OAAOvD,EAAE,GAAGA,EAAEC,IAAG,EAAKD,EAAE,2BAA2BC,IAAG,EAAKD,IAAIqD,YAAE,MAAM,CAACE,MAAM,oBAAoBrD,KAAK+D,gBAAgBZ,YAAE,MAAM,CAACE,MAAM,4BAA4BF,YAAE,cAAc,CAACc,KAAKjE,KAAK+D,kBAAkB/D,KAAKkE,aAAaf,YAAE,MAAM,CAACE,MAAM,wBAAwBc,UAAUC,YAAkBpE,KAAKkE,kBAAyBpE,EAA/oB,GAAopB+D,EAAsBD,MAAM,CAACS,IAAvkH,m7CAAumHC,GAArpE","file":"static/js/46.c2fa83f5.chunk.js","sourcesContent":["import{__awaiter,__generator}from\"tslib\";import{r as registerInstance,e as createEvent,c as writeTask,f as readTask,h,i as getElement,H as Host}from\"./index-7a8b7a1c.js\";import{b as getIonMode,c as config}from\"./ionic-global-63a97a32.js\";import{s as sanitizeDOMString}from\"./index-9e3fe806.js\";var infiniteScrollCss=\"ion-infinite-scroll{display:none;width:100%}.infinite-scroll-enabled{display:block}\";var InfiniteScroll=function(){function i(i){var n=this;registerInstance(this,i);this.ionInfinite=createEvent(this,\"ionInfinite\",7);this.thrPx=0;this.thrPc=0;this.didFire=false;this.isBusy=false;this.isLoading=false;this.threshold=\"15%\";this.disabled=false;this.position=\"bottom\";this.onScroll=function(){var i=n.scrollEl;if(!i||!n.canStart()){return 1}var t=n.el.offsetHeight;if(t===0){return 2}var e=i.scrollTop;var r=i.scrollHeight;var o=i.offsetHeight;var s=n.thrPc!==0?o*n.thrPc:n.thrPx;var l=n.position===\"bottom\"?r-t-e-s-o:e-t-s;if(l<0){if(!n.didFire){n.isLoading=true;n.didFire=true;n.ionInfinite.emit();return 3}}else{n.didFire=false}return 4}}i.prototype.thresholdChanged=function(){var i=this.threshold;if(i.lastIndexOf(\"%\")>-1){this.thrPx=0;this.thrPc=parseFloat(i)/100}else{this.thrPx=parseFloat(i);this.thrPc=0}};i.prototype.disabledChanged=function(){var i=this.disabled;if(i){this.isLoading=false;this.isBusy=false}this.enableScrollEvents(!i)};i.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var i,n;var t=this;return __generator(this,(function(e){switch(e.label){case 0:i=this.el.closest(\"ion-content\");if(!i){console.error(\" must be used inside an \");return[2]}n=this;return[4,i.getScrollElement()];case 1:n.scrollEl=e.sent();this.thresholdChanged();this.disabledChanged();if(this.position===\"top\"){writeTask((function(){if(t.scrollEl){t.scrollEl.scrollTop=t.scrollEl.scrollHeight-t.scrollEl.clientHeight}}))}return[2]}}))}))};i.prototype.disconnectedCallback=function(){this.enableScrollEvents(false);this.scrollEl=undefined};i.prototype.complete=function(){return __awaiter(this,void 0,void 0,(function(){var i,n;var t=this;return __generator(this,(function(e){i=this.scrollEl;if(!this.isLoading||!i){return[2]}this.isLoading=false;if(this.position===\"top\"){this.isBusy=true;n=i.scrollHeight-i.scrollTop;requestAnimationFrame((function(){readTask((function(){var e=i.scrollHeight;var r=e-n;requestAnimationFrame((function(){writeTask((function(){i.scrollTop=r;t.isBusy=false}))}))}))}))}return[2]}))}))};i.prototype.canStart=function(){return!this.disabled&&!this.isBusy&&!!this.scrollEl&&!this.isLoading};i.prototype.enableScrollEvents=function(i){if(this.scrollEl){if(i){this.scrollEl.addEventListener(\"scroll\",this.onScroll)}else{this.scrollEl.removeEventListener(\"scroll\",this.onScroll)}}};i.prototype.render=function(){var i;var n=getIonMode(this);var t=this.disabled;return h(Host,{class:(i={},i[n]=true,i[\"infinite-scroll-loading\"]=this.isLoading,i[\"infinite-scroll-enabled\"]=!t,i)})};Object.defineProperty(i.prototype,\"el\",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(i,\"watchers\",{get:function(){return{threshold:[\"thresholdChanged\"],disabled:[\"disabledChanged\"]}},enumerable:false,configurable:true});return i}();InfiniteScroll.style=infiniteScrollCss;var infiniteScrollContentIosCss=\"ion-infinite-scroll-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;min-height:84px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.infinite-loading{margin-left:0;margin-right:0;margin-top:0;margin-bottom:32px;display:none;width:100%}.infinite-loading-text{margin-left:32px;margin-right:32px;margin-top:4px;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.infinite-loading-text{margin-left:unset;margin-right:unset;-webkit-margin-start:32px;margin-inline-start:32px;-webkit-margin-end:32px;margin-inline-end:32px}}.infinite-scroll-loading ion-infinite-scroll-content>.infinite-loading{display:block}.infinite-scroll-content-ios .infinite-loading-text{color:var(--ion-color-step-600, #666666)}.infinite-scroll-content-ios .infinite-loading-spinner .spinner-lines-ios line,.infinite-scroll-content-ios .infinite-loading-spinner .spinner-lines-small-ios line,.infinite-scroll-content-ios .infinite-loading-spinner .spinner-crescent circle{stroke:var(--ion-color-step-600, #666666)}.infinite-scroll-content-ios .infinite-loading-spinner .spinner-bubbles circle,.infinite-scroll-content-ios .infinite-loading-spinner .spinner-circles circle,.infinite-scroll-content-ios .infinite-loading-spinner .spinner-dots circle{fill:var(--ion-color-step-600, #666666)}\";var infiniteScrollContentMdCss=\"ion-infinite-scroll-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;min-height:84px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.infinite-loading{margin-left:0;margin-right:0;margin-top:0;margin-bottom:32px;display:none;width:100%}.infinite-loading-text{margin-left:32px;margin-right:32px;margin-top:4px;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.infinite-loading-text{margin-left:unset;margin-right:unset;-webkit-margin-start:32px;margin-inline-start:32px;-webkit-margin-end:32px;margin-inline-end:32px}}.infinite-scroll-loading ion-infinite-scroll-content>.infinite-loading{display:block}.infinite-scroll-content-md .infinite-loading-text{color:var(--ion-color-step-600, #666666)}.infinite-scroll-content-md .infinite-loading-spinner .spinner-lines-md line,.infinite-scroll-content-md .infinite-loading-spinner .spinner-lines-small-md line,.infinite-scroll-content-md .infinite-loading-spinner .spinner-crescent circle{stroke:var(--ion-color-step-600, #666666)}.infinite-scroll-content-md .infinite-loading-spinner .spinner-bubbles circle,.infinite-scroll-content-md .infinite-loading-spinner .spinner-circles circle,.infinite-scroll-content-md .infinite-loading-spinner .spinner-dots circle{fill:var(--ion-color-step-600, #666666)}\";var InfiniteScrollContent=function(){function i(i){registerInstance(this,i)}i.prototype.componentDidLoad=function(){if(this.loadingSpinner===undefined){var i=getIonMode(this);this.loadingSpinner=config.get(\"infiniteLoadingSpinner\",config.get(\"spinner\",i===\"ios\"?\"lines\":\"crescent\"))}};i.prototype.render=function(){var i;var n=getIonMode(this);return h(Host,{class:(i={},i[n]=true,i[\"infinite-scroll-content-\"+n]=true,i)},h(\"div\",{class:\"infinite-loading\"},this.loadingSpinner&&h(\"div\",{class:\"infinite-loading-spinner\"},h(\"ion-spinner\",{name:this.loadingSpinner})),this.loadingText&&h(\"div\",{class:\"infinite-loading-text\",innerHTML:sanitizeDOMString(this.loadingText)})))};return i}();InfiniteScrollContent.style={ios:infiniteScrollContentIosCss,md:infiniteScrollContentMdCss};export{InfiniteScroll as ion_infinite_scroll,InfiniteScrollContent as ion_infinite_scroll_content};"],"sourceRoot":""}