-
Notifications
You must be signed in to change notification settings - Fork 0
/
172-es5.0e6f52c80518854b63c6.js
1 lines (1 loc) · 17.7 KB
/
172-es5.0e6f52c80518854b63c6.js
1
!function(){function t(t,r){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,r){if(!t)return;if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}(t))||r&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){l=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function h(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),s=new C(n||[]);return o(a,"_invoke",{value:L(t,r,s)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var d="suspendedStart",p="executing",v="completed",g={};function y(){}function m(){}function b(){}var w={};h(w,s,function(){return this});var x=Object.getPrototypeOf,k=x&&x(x(D([])));k&&k!==n&&i.call(k,s)&&(w=k);var E=b.prototype=y.prototype=Object.create(w);function S(t){["next","throw","return"].forEach(function(e){h(t,e,function(t){return this._invoke(e,t)})})}function H(t,e){function r(n,o,a,s){var l=f(t[n],t,o);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==typeof h&&i.call(h,"__await")?e.resolve(h.__await).then(function(t){r("next",t,a,s)},function(t){r("throw",t,a,s)}):e.resolve(h).then(function(t){c.value=t,a(c)},function(t){return r("throw",t,a,s)})}s(l.arg)}var n;o(this,"_invoke",{value:function(t,i){function o(){return new e(function(e,n){r(t,i,e,n)})}return n=n?n.then(o,o):o()}})}function L(e,r,n){var i=d;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var l=I(s,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var c=f(e,r,n);if("normal"===c.type){if(i=n.done?v:"suspendedYield",c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function I(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,I(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=f(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function D(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function r(){for(;++n<e.length;)if(i.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(typeof e+" is not iterable")}return m.prototype=b,o(E,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:m,configurable:!0}),m.displayName=h(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,h(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},S(H.prototype),h(H.prototype,l,function(){return this}),e.AsyncIterator=H,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new H(u(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(E),h(E,c,"Generator"),h(E,s,function(){return this}),h(E,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=D,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function n(t,e,r,n,i,o,a){try{var s=t[o](a),l=s.value}catch(c){return void r(c)}s.done?e(l):Promise.resolve(l).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise(function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,l,"next",t)}function l(t){n(a,i,o,s,l,"throw",t)}s(void 0)})}}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function a(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(self.webpackChunkv2x_frontend=self.webpackChunkv2x_frontend||[]).push([[172],{172:function(e,n,a){"use strict";a.r(n),a.d(n,{ion_virtual_scroll:function(){return f}});var s=a(1429),l=a(1444),c=function(t,e){var r=h(t,e);return r&&null!==t.ownerDocument?t.ownerDocument.importNode(r.content,!0).children[0]:null},h=function(t,e){switch(e){case"item":return t.querySelector("template:not([name])");case"header":return t.querySelector("template[name=header]");case"footer":return t.querySelector("template[name=footer]")}},u=function(t,e,r,n,i,o,a,s,l,c,h,u){for(var f=[],d=u+h,p=h;p<d;p++){var v=t[p];if(i){var g=i(v,p,t);null!=g&&f.push({i:c++,type:"header",value:g,index:p,height:r?r(g,p):a,reads:r?0:2,visible:!!r})}if(f.push({i:c++,type:"item",value:v,index:p,height:e?e(v,p):l,reads:e?0:2,visible:!!e}),o){var y=o(v,p,t);null!=y&&f.push({i:c++,type:"footer",value:y,index:p,height:n?n(y,p):s,reads:n?0:2,visible:!!n})}}return f},f=function(){function e(t){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(0,s.r)(this,t),this.range={offset:0,length:0},this.viewportHeight=0,this.cells=[],this.virtualDom=[],this.isEnabled=!1,this.viewportOffset=0,this.currentScrollTop=0,this.indexDirty=0,this.lastItemLen=0,this.totalHeight=0,this.approxItemHeight=45,this.approxHeaderHeight=30,this.approxFooterHeight=30,this.onScroll=function(){r.updateVirtualScroll()}}var n,a,h,f,p,v;return n=e,a=[{key:"itemsChanged",value:function(){this.calcCells(),this.updateVirtualScroll()}},{key:"componentWillLoad",value:function(){console.warn("[Deprecation Warning]: ion-virtual-scroll has been deprecated and will be removed in Ionic Framework v7.0. See https://ionicframework.com/docs/angular/virtual-scroll for migration steps.")}},{key:"connectedCallback",value:(v=i(r().mark(function t(){var e;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=this.el.closest("ion-content"))){t.next=10;break}return t.next=4,e.getScrollElement();case 4:this.scrollEl=t.sent,this.contentEl=e,this.calcCells(),this.updateState(),t.next=11;break;case 10:console.error("<ion-virtual-scroll> must be used inside an <ion-content>");case 11:case"end":return t.stop()}},t,this)})),function(){return v.apply(this,arguments)})},{key:"componentDidUpdate",value:function(){this.updateState()}},{key:"disconnectedCallback",value:function(){this.scrollEl=void 0}},{key:"onResize",value:function(){this.calcCells(),this.updateVirtualScroll()}},{key:"positionForItem",value:function(t){return Promise.resolve(function(t,e,r){var n=e.find(function(e){return"item"===e.type&&e.index===t});return n?r[n.i]:-1}(t,this.cells,this.getHeightIndex()))}},{key:"checkRange",value:(p=i(r().mark(function t(e){var n,i,o,a,s=arguments;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:-1,this.items){t.next=3;break}return t.abrupt("return");case 3:i=-1===n?this.items.length-e:n,o=function(t,e){return 0===e?0:e===(t.length>0?t[t.length-1].index:0)+1?t.length:t.findIndex(function(t){return t.index===e})}(this.cells,e),a=u(this.items,this.itemHeight,this.headerHeight,this.footerHeight,this.headerFn,this.footerFn,this.approxHeaderHeight,this.approxFooterHeight,this.approxItemHeight,o,e,i),this.cells=function(t,e,r){if(0===r&&e.length>=t.length)return e;for(var n=0;n<e.length;n++)t[n+r]=e[n];return t}(this.cells,a,o),this.lastItemLen=this.items.length,this.indexDirty=Math.max(e-1,0),this.scheduleUpdate();case 5:case"end":return t.stop()}},t,this)})),function(t){return p.apply(this,arguments)})},{key:"checkEnd",value:(f=i(r().mark(function t(){return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:this.items&&this.checkRange(this.lastItemLen);case 1:case"end":return t.stop()}},t,this)})),function(){return f.apply(this,arguments)})},{key:"updateVirtualScroll",value:function(){this.isEnabled&&this.scrollEl&&(this.timerUpdate&&(clearTimeout(this.timerUpdate),this.timerUpdate=void 0),(0,s.f)(this.readVS.bind(this)),(0,s.c)(this.writeVS.bind(this)))}},{key:"readVS",value:function(){for(var t=this.contentEl,e=this.scrollEl,r=0,n=this.el;null!==n&&n!==t;)r+=n.offsetTop,n=n.offsetParent;this.viewportOffset=r,e&&(this.viewportHeight=e.offsetHeight,this.currentScrollTop=e.scrollTop)}},{key:"writeVS",value:function(){var e,r,n=this.indexDirty,i=(e=this.currentScrollTop-this.viewportOffset,r=this.viewportHeight,{top:Math.max(e-100,0),bottom:e+r+100}),o=this.getHeightIndex(),a=function(t,e,r){for(var n=e.top,i=e.bottom,o=0;o<t.length&&!(t[o]>n);o++);for(var a=Math.max(o-2-1,0);o<t.length&&!(t[o]>=i);o++);return{offset:a,length:Math.min(o+2,t.length)-a}}(o,i);(function(t,e,r){return t<=r.offset+r.length||e.offset!==r.offset||e.length!==r.length})(n,this.range,a)&&(this.range=a,function(e,r,n,i){var o,a=t(e);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.change=0,s.d=!0}}catch(g){a.e(g)}finally{a.f()}for(var l=[],c=i.offset+i.length,h=function(){var t=n[u],i=e.find(function(e){return e.d&&e.cell===t});if(i){var o=r[u];o!==i.top&&(i.top=o,i.change=1),i.d=!1}else l.push(t)},u=i.offset;u<c;u++)h();for(var f=e.filter(function(t){return t.d}),d=function(){var t=v[p],n=f.find(function(e){return e.d&&e.cell.type===t.type}),i=t.i;n?(n.d=!1,n.change=2,n.cell=t,n.top=r[i]):e.push({d:!1,cell:t,visible:!0,change:2,top:r[i]})},p=0,v=l;p<v.length;p++)d();e.filter(function(t){return t.d&&-9999!==t.top}).forEach(function(t){t.change=1,t.top=-9999})}(this.virtualDom,o,this.cells,a),this.nodeRender?function(t,e,r,n){for(var i,o,a=Array.from(t.children).filter(function(t){return"TEMPLATE"!==t.tagName}),s=a.length,l=0;l<r.length;l++){var h=r[l],u=h.cell;if(2===h.change){if(l<s)e(o=a[l],u,l);else{var f=c(t,u.type);(o=null!==(i=e(f,u,l))&&void 0!==i?i:f).classList.add("virtual-item"),t.appendChild(o)}o.$ionCell=u}else o=a[l];0!==h.change&&(o.style.transform="translate3d(0,".concat(h.top,"px,0)"));var d=u.visible;h.visible!==d&&(d?o.classList.remove("virtual-loading"):o.classList.add("virtual-loading"),h.visible=d),u.reads>0&&(n(u,o),u.reads--)}}(this.el,this.nodeRender,this.virtualDom,this.updateCellHeight.bind(this)):this.domRender?this.domRender(this.virtualDom):this.renderItem&&(0,s.j)(this))}},{key:"updateCellHeight",value:function(t,e){var r=this,n=function(){if(e.$ionCell===t){var n=window.getComputedStyle(e),i=e.offsetHeight+parseFloat(n.getPropertyValue("margin-bottom"));r.setCellHeight(t,i)}};e?(0,l.c)(e,n):n()}},{key:"setCellHeight",value:function(t,e){var r=t.i;t===this.cells[r]&&(t.height===e&&!0===t.visible||(t.visible=!0,t.height=e,this.indexDirty=Math.min(this.indexDirty,r),this.scheduleUpdate()))}},{key:"scheduleUpdate",value:function(){var t=this;clearTimeout(this.timerUpdate),this.timerUpdate=setTimeout(function(){return t.updateVirtualScroll()},100)}},{key:"updateState",value:function(){var t=!!(this.scrollEl&&this.cells.length>0);t!==this.isEnabled&&(this.enableScrollEvents(t),t&&this.updateVirtualScroll())}},{key:"calcCells",value:function(){this.items&&(this.lastItemLen=this.items.length,this.cells=u(this.items,this.itemHeight,this.headerHeight,this.footerHeight,this.headerFn,this.footerFn,this.approxHeaderHeight,this.approxFooterHeight,this.approxItemHeight,0,0,this.lastItemLen),this.indexDirty=0)}},{key:"getHeightIndex",value:function(){return this.indexDirty!==1/0&&this.calcHeightIndex(this.indexDirty),this.heightIndex}},{key:"calcHeightIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.heightIndex=function(t,e){if(!t)return new Uint32Array(e);if(t.length===e)return t;if(e>t.length){var r=new Uint32Array(e);return r.set(t),r}return t.subarray(0,e)}(this.heightIndex,this.cells.length),this.totalHeight=function(t,e,r){for(var n=t[r],i=r;i<t.length;i++)t[i]=n,n+=e[i].height;return n}(this.heightIndex,this.cells,t),this.indexDirty=1/0}},{key:"enableScrollEvents",value:function(t){var e=this;this.rmEvent&&(this.rmEvent(),this.rmEvent=void 0);var r=this.scrollEl;r&&(this.isEnabled=t,r.addEventListener("scroll",this.onScroll),this.rmEvent=function(){r.removeEventListener("scroll",e.onScroll)})}},{key:"renderVirtualNode",value:function(t){var e=t.cell,r=e.type,n=e.value,i=e.index;switch(r){case"item":return this.renderItem(n,i);case"header":return this.renderHeader(n,i);case"footer":return this.renderFooter(n,i)}}},{key:"render",value:function(){var t=this;return(0,s.h)(s.H,{style:{height:"".concat(this.totalHeight,"px")}},this.renderItem&&(0,s.h)(d,{dom:this.virtualDom},this.virtualDom.map(function(e){return t.renderVirtualNode(e)})))}},{key:"el",get:function(){return(0,s.i)(this)}}],h=[{key:"watchers",get:function(){return{itemHeight:["itemsChanged"],headerHeight:["itemsChanged"],footerHeight:["itemsChanged"],items:["itemsChanged"]}}}],a&&o(n.prototype,a),h&&o(n,h),Object.defineProperty(n,"prototype",{writable:!1}),e}(),d=function(t,e,r){var n=t.dom;return r.map(e,function(t,e){var r=n[e],i=t.vattrs||{},o=i.class||"";return o+="virtual-item ",r.visible||(o+="virtual-loading"),Object.assign(Object.assign({},t),{vattrs:Object.assign(Object.assign({},i),{class:o,style:Object.assign(Object.assign({},i.style),{transform:"translate3d(0,".concat(r.top,"px,0)")})})})})};f.style="ion-virtual-scroll{display:block;position:relative;width:100%;contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}ion-virtual-scroll>.virtual-loading{opacity:0}ion-virtual-scroll>.virtual-item{position:absolute !important;top:0 !important;right:0 !important;left:0 !important;-webkit-transition-duration:0ms;transition-duration:0ms;will-change:transform}"}}])}();