var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,a){function o(t){try{d(n.next(t))}catch(t){a(t)}}function s(t){try{d(n["throw"](t))}catch(t){a(t)}}function d(t){t.done?i(t.value):r(t.value).then(o,s)}d((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,r,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return d([t,e])}}function d(s){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(i=0)),i)try{if(n=1,r&&(a=s[0]&2?r["return"]:s[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;if(r=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]t){return true}if(i&&i.year1;r((function(){t.scrollLeft=n.clientWidth*(m(e.el)?-1:1);var i=function(i){var r=t.getBoundingClientRect();var a=t.scrollLeft<=2?n:o;var s=a.getBoundingClientRect();if(Math.abs(s.x-r.x)>2)return;var d=e.forceRenderDate;if(d!==undefined){return{month:d.month,year:d.year,day:d.day}}if(a===n){return A(i)}else if(a===o){return D(i)}else{return}};var s=function(){if(d){t.style.removeProperty("pointer-events");l=false}var n=i(e.workingParts);if(!n)return;var o=n.month,s=n.day,c=n.year;if(Tt({month:o,year:c,day:null},{minParts:Object.assign(Object.assign({},e.minParts),{day:null}),maxParts:Object.assign(Object.assign({},e.maxParts),{day:null})})){return}t.style.setProperty("overflow","hidden");r((function(){e.setWorkingParts(Object.assign(Object.assign({},e.workingParts),{month:o,day:s,year:c}));t.scrollLeft=a.clientWidth*(m(e.el)?-1:1);t.style.removeProperty("overflow");if(e.resolveForceDateScrolling){e.resolveForceDateScrolling()}}))};var c;var l=false;var h=function(){if(c){clearTimeout(c)}if(!l&&d){t.style.setProperty("pointer-events","none");l=true}c=setTimeout(s,50)};t.addEventListener("scroll",h);e.destroyCalendarListener=function(){t.removeEventListener("scroll",h)}}))};this.destroyInteractionListeners=function(){var t=e,i=t.destroyCalendarListener,n=t.destroyKeyboardMO;if(i!==undefined){i()}if(n!==undefined){n()}};this.processValue=function(t){var i=t!==null&&t!==undefined&&(!Array.isArray(t)||t.length>0);var n=i?L(t):e.defaultParts;var r=e,a=r.minParts,o=r.maxParts,s=r.workingParts,d=r.el;e.warnIfIncorrectValueUsage();if(!n){return}if(i){N(n,a,o)}var c=Array.isArray(n)?n[0]:n;var l=ht(c,a,o);var h=l.month,p=l.day,u=l.year,f=l.hour,m=l.minute;var b=pt(f);if(i){if(Array.isArray(n)){e.activeParts=__spreadArray([],n,true)}else{e.activeParts={month:h,day:p,year:u,hour:f,minute:m,ampm:b}}}else{e.activeParts=[]}var g=h!==undefined&&h!==s.month||u!==undefined&&u!==s.year;var v=d.classList.contains("datetime-ready");var y=e,x=y.isGridStyle,k=y.showMonthAndYear;var w=true;if(Array.isArray(n)){var j=n[0].month;for(var O=0,z=n;O0){this.durationTimeout=setTimeout((function(){return e.dismiss()}),this.duration)}t();return[2]}}))}))};t.prototype.dismiss=function(t,e){return __awaiter(this,void 0,void 0,(function(){var i,n;return __generator(this,(function(r){switch(r.label){case 0:return[4,this.lockController.lock()];case 1:i=r.sent();if(this.durationTimeout){clearTimeout(this.durationTimeout)}return[4,wt(this,t,e,"pickerLeave",Ut,Ut)];case 2:n=r.sent();if(n){this.delegateController.removeViewFromDom()}i();return[2,n]}}))}))};t.prototype.onDidDismiss=function(){return jt(this.el,"ionPickerDidDismiss")};t.prototype.onWillDismiss=function(){return jt(this.el,"ionPickerWillDismiss")};t.prototype.getColumn=function(t){return Promise.resolve(this.columns.find((function(e){return e.name===t})))};t.prototype.buttonClick=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){switch(n.label){case 0:e=t.role;if(vt(e)){return[2,this.dismiss(undefined,e)]}return[4,this.callButtonHandler(t)];case 1:i=n.sent();if(i){return[2,this.dismiss(this.getSelected(),t.role)]}return[2,Promise.resolve()]}}))}))};t.prototype.callButtonHandler=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){switch(i.label){case 0:if(!t)return[3,2];return[4,Ot(t.handler,this.getSelected())];case 1:e=i.sent();if(e===false){return[2,false]}i.label=2;case 2:return[2,true]}}))}))};t.prototype.getSelected=function(){var t={};this.columns.forEach((function(e,i){var n=e.selectedIndex!==undefined?e.options[e.selectedIndex]:undefined;t[e.name]={text:n?n.text:undefined,value:n?n.value:undefined,columnIndex:i}}));return t};t.prototype.render=function(){var t;var e=this;var i=this.htmlAttributes;var n=j(this);return a(o,Object.assign({key:"91d3d127c46d125a2a86222e3002d804ebd8bc84","aria-modal":"true",tabindex:"-1"},i,{style:{zIndex:"".concat(2e4+this.overlayIndex)},class:Object.assign((t={},t[n]=true,t["picker-".concat(n)]=true,t["overlay-hidden"]=true,t),g(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonPickerWillDismiss:this.dispatchCancelHandler}),a("ion-backdrop",{key:"63140c43f7a2e3000076adec0406197cb569f985",visible:this.showBackdrop,tappable:this.backdropDismiss}),a("div",{key:"3e86ec5e61adf40983a1d33ef24f66f4f75307e8",tabindex:"0"}),a("div",{key:"3c3844f369da33e35c9a498d88d1b7e4d686b8ce",class:"picker-wrapper ion-overlay-wrapper",role:"dialog"},a("div",{key:"e03200231976723409505b0c4070e7f596815e50",class:"picker-toolbar"},this.buttons.map((function(t){return a("div",{class:$t(t)},a("button",{type:"button",onClick:function(){return e.buttonClick(t)},class:te(t)},t.text))}))),a("div",{key:"d59de79e8c364376bc16d2edae3672b21443f3fe",class:"picker-columns"},a("div",{key:"e79cb88c5397047bc8c7e71efb4f1a338773e744",class:"picker-above-highlight"}),this.presented&&this.columns.map((function(t){return a("ion-picker-legacy-column",{col:t})})),a("div",{key:"776de64da09485ad1dbf78d4d402e297b94348a6",class:"picker-below-highlight"}))),a("div",{key:"f0aa77e3b467c3fb4950389d27c13769dc913b14",tabindex:"0"}))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}},enumerable:false,configurable:true});return t}());var $t=function(t){var e;return e={},e["picker-toolbar-".concat(t.role)]=t.role!==undefined,e["picker-toolbar-button"]=true,e};var te=function(t){return Object.assign({"picker-button":true,"ion-activatable":true},g(t.cssClass))};Qt.style={ios:Xt,md:Kt};var ee=".picker-col{display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-sizing:content-box;box-sizing:content-box;contain:content}.picker-opts{position:relative;-ms-flex:1;flex:1;max-width:100%}.picker-opt{top:0;display:block;position:absolute;width:100%;border:0;text-align:center;text-overflow:ellipsis;white-space:nowrap;contain:strict;overflow:hidden;will-change:transform}.picker-opt{inset-inline-start:0}.picker-opt.picker-opt-disabled{pointer-events:none}.picker-opt-disabled{opacity:0}.picker-opts-left{-ms-flex-pack:start;justify-content:flex-start}.picker-opts-right{-ms-flex-pack:end;justify-content:flex-end}.picker-opt:active,.picker-opt:focus{outline:none}.picker-prefix{position:relative;-ms-flex:1;flex:1;text-align:end;white-space:nowrap}.picker-suffix{position:relative;-ms-flex:1;flex:1;text-align:start;white-space:nowrap}.picker-col{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:0;padding-bottom:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.picker-prefix,.picker-suffix,.picker-opts{top:77px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:inherit;font-size:20px;line-height:42px;pointer-events:none}.picker-opt{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-transform-origin:center center;transform-origin:center center;height:46px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;color:inherit;font-size:20px;line-height:42px;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}:host-context([dir=rtl]) .picker-opt{-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}[dir=rtl] .picker-opt{-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}@supports selector(:dir(rtl)){.picker-opt:dir(rtl){-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}}";var ie=ee;var ne=".picker-col{display:-ms-flexbox;display:flex;position:relative;-ms-flex:1;flex:1;-ms-flex-pack:center;justify-content:center;height:100%;-webkit-box-sizing:content-box;box-sizing:content-box;contain:content}.picker-opts{position:relative;-ms-flex:1;flex:1;max-width:100%}.picker-opt{top:0;display:block;position:absolute;width:100%;border:0;text-align:center;text-overflow:ellipsis;white-space:nowrap;contain:strict;overflow:hidden;will-change:transform}.picker-opt{inset-inline-start:0}.picker-opt.picker-opt-disabled{pointer-events:none}.picker-opt-disabled{opacity:0}.picker-opts-left{-ms-flex-pack:start;justify-content:flex-start}.picker-opts-right{-ms-flex-pack:end;justify-content:flex-end}.picker-opt:active,.picker-opt:focus{outline:none}.picker-prefix{position:relative;-ms-flex:1;flex:1;text-align:end;white-space:nowrap}.picker-suffix{position:relative;-ms-flex:1;flex:1;text-align:start;white-space:nowrap}.picker-col{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.picker-prefix,.picker-suffix,.picker-opts{top:77px;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;color:inherit;font-size:22px;line-height:42px;pointer-events:none}.picker-opt{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;height:43px;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out;background:transparent;color:inherit;font-size:22px;line-height:42px;-webkit-backface-visibility:hidden;backface-visibility:hidden;pointer-events:auto}.picker-prefix,.picker-suffix,.picker-opt.picker-opt-selected{color:var(--ion-color-primary, #0054e9)}";var re=ne;var ae=t("ion_picker_legacy_column",function(){function t(t){i(this,t);this.ionPickerColChange=n(this,"ionPickerColChange",7);this.optHeight=0;this.rotateFactor=0;this.scaleFactor=1;this.velocity=0;this.y=0;this.noAnimate=true;this.colDidChange=false;this.col=undefined}t.prototype.colChanged=function(){this.colDidChange=true};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,n,r;var a=this;return __generator(this,(function(o){switch(o.label){case 0:t=0;i=.81;n=j(this);if(n==="ios"){t=-.46;i=1}this.rotateFactor=t;this.scaleFactor=i;r=this;return[4,e.import("./p-3e1e14d9.system.js")];case 1:r.gesture=o.sent().createGesture({el:this.el,gestureName:"picker-swipe",gesturePriority:100,threshold:0,passive:false,onStart:function(t){return a.onStart(t)},onMove:function(t){return a.onMove(t)},onEnd:function(t){return a.onEnd(t)}});this.gesture.enable();this.tmrId=setTimeout((function(){a.noAnimate=false;a.refresh(true)}),250);return[2]}}))}))};t.prototype.componentDidLoad=function(){this.onDomChange()};t.prototype.componentDidUpdate=function(){if(this.colDidChange){this.onDomChange(true,false);this.colDidChange=false}};t.prototype.disconnectedCallback=function(){if(this.rafId!==undefined)cancelAnimationFrame(this.rafId);if(this.tmrId)clearTimeout(this.tmrId);if(this.gesture){this.gesture.destroy();this.gesture=undefined}};t.prototype.emitColChange=function(){this.ionPickerColChange.emit(this.col)};t.prototype.setSelected=function(t,e){var i=t>-1?-(t*this.optHeight):0;this.velocity=0;if(this.rafId!==undefined)cancelAnimationFrame(this.rafId);this.update(i,e,true);this.emitColChange()};t.prototype.update=function(t,e,i){if(!this.optsEl){return}var n=0;var r=0;var a=this,o=a.col,s=a.rotateFactor;var d=o.selectedIndex;var c=o.selectedIndex=this.indexForY(-t);var l=e===0?"":e+"ms";var h="scale(".concat(this.scaleFactor,")");var p=this.optsEl.children;for(var u=0;u0?Math.max(this.velocity,1):Math.min(this.velocity,-1);var e=this.y+this.velocity;if(e>this.minY){e=this.minY;this.velocity=0}else if(e1;if(i){this.rafId=requestAnimationFrame((function(){return t.decelerate()}))}else{this.velocity=0;this.emitColChange();Ct()}}else if(this.y%this.optHeight!==0){var n=Math.abs(this.y%this.optHeight);this.velocity=n>this.optHeight/2?1:-1;this.decelerate()}};t.prototype.indexForY=function(t){return Math.min(Math.max(Math.abs(Math.round(t/this.optHeight)),0),this.col.options.length-1)};t.prototype.onStart=function(t){if(t.event.cancelable){t.event.preventDefault()}t.event.stopPropagation();Pt();if(this.rafId!==undefined)cancelAnimationFrame(this.rafId);var e=this.col.options;var i=e.length-1;var n=0;for(var r=0;rthis.minY){e=Math.pow(e,.8);this.bounceFrom=e}else if(e0){this.update(this.minY,100,true);this.emitColChange();return}else if(this.bounceFrom<0){this.update(this.maxY,100,true);this.emitColChange();return}this.velocity=p(-de,t.velocityY*23,de);if(this.velocity===0&&t.deltaY===0){var e=t.event.target.closest(".picker-opt");if(e===null||e===void 0?void 0:e.hasAttribute("opt-index")){this.setSelected(parseInt(e.getAttribute("opt-index"),10),ce)}}else{this.y+=t.deltaY;if(Math.abs(t.velocityY)<.05){var i=t.deltaY>0;var n=Math.abs(this.y)%this.optHeight/this.optHeight;if(i&&n>.5){this.velocity=Math.abs(this.velocity)*-1}else if(!i&&n<=.5){this.velocity=Math.abs(this.velocity)}}this.decelerate()}};t.prototype.refresh=function(t,e){var i;var n=this.col.options.length-1;var r=0;var a=this.col.options;for(var o=0;o