1 line
24 KiB
Plaintext
1 line
24 KiB
Plaintext
{"version":3,"sources":["./node_modules/@ionic/core/dist/esm/ion-toast.entry.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6G;AAChD;AAC9B;AACgC;AACF;AACjB;AAC6F;AACzD;;AAEhF;AACA;AACA;AACA;AACA,wBAAwB,gEAAe;AACvC,2BAA2B,gEAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,IAAI;AAClF;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C;AACA;AACA;AACA,6EAA6E,OAAO;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,gEAAe;AACvC,2BAA2B,gEAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,IAAI;AAC7D;AACA;AACA;AACA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,gEAAe;AACvC,2BAA2B,gEAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,gEAAe;AACvC,2BAA2B,gEAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,iBAAiB,oBAAoB,uBAAuB,kBAAkB,iBAAiB,aAAa,kBAAkB,cAAc,kBAAkB,uBAAuB,OAAO,MAAM,cAAc,kBAAkB,WAAW,YAAY,aAAa,mBAAmB,4CAA4C,eAAe,aAAa,oBAAoB,yBAAyB,WAAW,YAAY,QAAQ,uBAAuB,aAAa,kBAAkB,uBAAuB,gCAAgC,u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BAAsB,yBAAyB,gBAAgB,+FAA+F,cAAc,mBAAmB,oBAAoB,2BAA2B,0BAA0B,yBAAyB,yBAAyB,qBAAqB,yCAAyC,wBAAwB,kBAAkB,iBAAiB,kBAAkB,gBAAgB,mBAAmB,WAAW,YAAY,+FAA+F,wBAAwB,mBAAmB,oBAAoB,0BAA0B,yBAAyB,wBAAwB,wBAAwB,0BAA0B,oBAAoB,wEAAwE,2BAA2B,6EAA6E;;AAEnpJ;AACA;AACA,IAAI,4DAAgB;AACpB,sBAAsB,4DAAW;AACjC,uBAAuB,4DAAW;AAClC,uBAAuB,4DAAW;AAClC,sBAAsB,4DAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,+DAAQ;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,+DAAc;AAClB;AACA;AACA;AACA;AACA;AACA,UAAU,+DAAO;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+DAAO;AAClB;AACA;AACA;AACA;AACA;AACA,WAAW,+DAAW;AACtB;AACA;AACA;AACA;AACA;AACA,WAAW,+DAAW;AACtB;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,QAAQ,+DAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,+DAAQ;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mEAAU;AAC3B;AACA;AACA,6BAA6B,KAAK;AAClC;AACA,YAAY,4DAAC,SAAS,6BAA6B,mBAAmB,4DAAC,YAAY,yGAAyG,EAAE,4DAAC,SAAS,8BAA8B;AACtO,MAAM,4DAAC,cAAc,0FAA0F,6BAA6B,4DAAC,uBAAuB,+EAA+E;AACnP;AACA;AACA;AACA;AACA;AACA,iBAAiB,mEAAU;AAC3B;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA,YAAY,4DAAC,CAAC,oDAAI,GAAG;AACrB,mBAAmB,0BAA0B;AAC7C,OAAO,SAAS,4DAAkB,0CAA0C,eAAe,EAAE,4DAAW,mBAAmB,wCAAwC,uEAAuE,EAAE,4DAAC,SAAS,sBAAsB,EAAE,4DAAC,SAAS,8CAA8C,6CAA6C,4DAAC,SAAS,yBAAyB;AACtZ,MAAM,4DAAC,SAAS,wCAAwC;AACxD,MAAM,4DAAC,SAAS,qDAAqD,4DAAiB,gBAAgB;AACtG;AACA,YAAY,QAAQ,4DAAU,OAAO;AACrC;AACA;AACA,wBAAwB,0HAA0H,YAAY,+EAA+E,EAAE,4DAAW;AAC1P;AACA;AACA;AACA;AACA;;AAE8B","file":"40-es2015.js","sourcesContent":["import { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-e806d1f6.js';\nimport { b as getIonMode } from './ionic-global-9d5c8ee3.js';\nimport './helpers-90f46169.js';\nimport { c as createAnimation } from './animation-54fe0237.js';\nimport { s as sanitizeDOMString } from './index-9e3fe806.js';\nimport './hardware-back-button-389954a0.js';\nimport { i as isCancel, e as prepareOverlay, d as present, f as dismiss, g as eventMethod, s as safeCall } from './overlays-7a1610a2.js';\nimport { g as getClassMap, c as createColorClasses } from './theme-ff3fc52f.js';\n\n/**\n * iOS Toast Enter Animation\n */\nconst iosEnterAnimation = (baseEl, position) => {\n const baseAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n const hostEl = baseEl.host || baseEl;\n const wrapperEl = baseEl.querySelector('.toast-wrapper');\n const bottom = `calc(-10px - var(--ion-safe-area-bottom, 0px))`;\n const top = `calc(10px + var(--ion-safe-area-top, 0px))`;\n wrapperAnimation.addElement(wrapperEl);\n switch (position) {\n case 'top':\n wrapperAnimation.fromTo('transform', 'translateY(-100%)', `translateY(${top})`);\n break;\n case 'middle':\n const topPosition = Math.floor(hostEl.clientHeight / 2 - wrapperEl.clientHeight / 2);\n wrapperEl.style.top = `${topPosition}px`;\n wrapperAnimation.fromTo('opacity', 0.01, 1);\n break;\n default:\n wrapperAnimation.fromTo('transform', 'translateY(100%)', `translateY(${bottom})`);\n break;\n }\n return baseAnimation\n .addElement(hostEl)\n .easing('cubic-bezier(.155,1.105,.295,1.12)')\n .duration(400)\n .addAnimation(wrapperAnimation);\n};\n\n/**\n * iOS Toast Leave Animation\n */\nconst iosLeaveAnimation = (baseEl, position) => {\n const baseAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n const hostEl = baseEl.host || baseEl;\n const wrapperEl = baseEl.querySelector('.toast-wrapper');\n const bottom = `calc(-10px - var(--ion-safe-area-bottom, 0px))`;\n const top = `calc(10px + var(--ion-safe-area-top, 0px))`;\n wrapperAnimation.addElement(wrapperEl);\n switch (position) {\n case 'top':\n wrapperAnimation.fromTo('transform', `translateY(${top})`, 'translateY(-100%)');\n break;\n case 'middle':\n wrapperAnimation.fromTo('opacity', 0.99, 0);\n break;\n default:\n wrapperAnimation.fromTo('transform', `translateY(${bottom})`, 'translateY(100%)');\n break;\n }\n return baseAnimation\n .addElement(hostEl)\n .easing('cubic-bezier(.36,.66,.04,1)')\n .duration(300)\n .addAnimation(wrapperAnimation);\n};\n\n/**\n * MD Toast Enter Animation\n */\nconst mdEnterAnimation = (baseEl, position) => {\n const baseAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n const hostEl = baseEl.host || baseEl;\n const wrapperEl = baseEl.querySelector('.toast-wrapper');\n const bottom = `calc(8px + var(--ion-safe-area-bottom, 0px))`;\n const top = `calc(8px + var(--ion-safe-area-top, 0px))`;\n wrapperAnimation.addElement(wrapperEl);\n switch (position) {\n case 'top':\n wrapperEl.style.top = top;\n wrapperAnimation.fromTo('opacity', 0.01, 1);\n break;\n case 'middle':\n const topPosition = Math.floor(hostEl.clientHeight / 2 - wrapperEl.clientHeight / 2);\n wrapperEl.style.top = `${topPosition}px`;\n wrapperAnimation.fromTo('opacity', 0.01, 1);\n break;\n default:\n wrapperEl.style.bottom = bottom;\n wrapperAnimation.fromTo('opacity', 0.01, 1);\n break;\n }\n return baseAnimation\n .addElement(hostEl)\n .easing('cubic-bezier(.36,.66,.04,1)')\n .duration(400)\n .addAnimation(wrapperAnimation);\n};\n\n/**\n * md Toast Leave Animation\n */\nconst mdLeaveAnimation = (baseEl) => {\n const baseAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n const hostEl = baseEl.host || baseEl;\n const wrapperEl = baseEl.querySelector('.toast-wrapper');\n wrapperAnimation\n .addElement(wrapperEl)\n .fromTo('opacity', 0.99, 0);\n return baseAnimation\n .addElement(hostEl)\n .easing('cubic-bezier(.36,.66,.04,1)')\n .duration(300)\n .addAnimation(wrapperAnimation);\n};\n\nconst toastIosCss = \":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:pre-wrap;left:0;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}:host-context([dir=rtl]){left:unset;right:unset;right:0}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);left:var(--start);right:var(--end);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}[dir=rtl] .toast-wrapper,:host-context([dir=rtl]) .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}.toast-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-content{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.toast-message{-ms-flex:1;flex:1;white-space:var(--white-space)}.toast-button-group{display:-ms-flexbox;display:flex}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon{font-size:1.4em}.toast-button-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-50, #f2f2f2);--border-radius:14px;--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-850, #262626);--max-width:700px;--start:10px;--end:10px;font-size:14px}.toast-wrapper{margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;z-index:10}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.toast-wrapper{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.toast-translucent) .toast-wrapper{background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.toast-wrapper.toast-top{-webkit-transform:translate3d(0, -100%, 0);transform:translate3d(0, -100%, 0);top:0}.toast-wrapper.toast-middle{opacity:0.01}.toast-wrapper.toast-bottom{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);bottom:0}.toast-content{padding-left:15px;padding-right:15px;padding-top:15px;padding-bottom:15px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.toast-content{padding-left:unset;padding-right:unset;-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px}}.toast-header{margin-bottom:2px;font-weight:500}.toast-button{padding-left:15px;padding-right:15px;padding-top:10px;padding-bottom:10px;height:44px;-webkit-transition:background-color, opacity 100ms linear;transition:background-color, opacity 100ms linear;border:0;background-color:transparent;font-family:var(--ion-font-family);font-size:17px;font-weight:500;overflow:hidden}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.toast-button{padding-left:unset;padding-right:unset;-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px}}.toast-button.ion-activated{opacity:0.4}@media (any-hover: hover){.toast-button:hover{opacity:0.6}}\";\n\nconst toastMdCss = \":host{--border-width:0;--border-style:none;--border-color:initial;--box-shadow:none;--min-width:auto;--width:auto;--min-height:auto;--height:auto;--max-height:auto;--white-space:pre-wrap;left:0;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);contain:strict;z-index:1001;pointer-events:none}:host-context([dir=rtl]){left:unset;right:unset;right:0}:host(.overlay-hidden){display:none}:host(.ion-color){--button-color:inherit;color:var(--ion-color-contrast)}:host(.ion-color) .toast-button-cancel{color:inherit}:host(.ion-color) .toast-wrapper{background:var(--ion-color-base)}.toast-wrapper{border-radius:var(--border-radius);left:var(--start);right:var(--end);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}[dir=rtl] .toast-wrapper,:host-context([dir=rtl]) .toast-wrapper{left:unset;right:unset;left:var(--end);right:var(--start)}.toast-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;pointer-events:auto;height:inherit;min-height:inherit;max-height:inherit;contain:content}.toast-content{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}.toast-message{-ms-flex:1;flex:1;white-space:var(--white-space)}.toast-button-group{display:-ms-flexbox;display:flex}.toast-button{border:0;outline:none;color:var(--button-color);z-index:0}.toast-icon{font-size:1.4em}.toast-button-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (any-hover: hover){.toast-button:hover{cursor:pointer}}:host{--background:var(--ion-color-step-800, #333333);--border-radius:4px;--box-shadow:0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12);--button-color:var(--ion-color-primary, #3880ff);--color:var(--ion-color-step-50, #f2f2f2);--max-width:700px;--start:8px;--end:8px;font-size:14px}.toast-wrapper{margin-left:auto;margin-right:auto;margin-top:auto;margin-bottom:auto;display:block;position:absolute;opacity:0.01;z-index:10}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.toast-wrapper{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.toast-content{padding-left:16px;padding-right:16px;padding-top:14px;padding-bottom:14px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.toast-content{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}.toast-header{margin-bottom:2px;font-weight:500;line-height:20px}.toast-message{line-height:20px}.toast-button-group-start{margin-left:8px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.toast-button-group-start{margin-left:unset;-webkit-margin-start:8px;margin-inline-start:8px}}.toast-button-group-end{margin-right:8px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.toast-button-group-end{margin-right:unset;-webkit-margin-end:8px;margin-inline-end:8px}}.toast-button{padding-left:15px;padding-right:15px;padding-top:10px;padding-bottom:10px;position:relative;background-color:transparent;font-family:var(--ion-font-family);font-size:14px;font-weight:500;letter-spacing:0.84px;text-transform:uppercase;overflow:hidden}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.toast-button{padding-left:unset;padding-right:unset;-webkit-padding-start:15px;padding-inline-start:15px;-webkit-padding-end:15px;padding-inline-end:15px}}.toast-button-cancel{color:var(--ion-color-step-100, #e6e6e6)}.toast-button-icon-only{border-radius:50%;padding-left:9px;padding-right:9px;padding-top:9px;padding-bottom:9px;width:36px;height:36px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.toast-button-icon-only{padding-left:unset;padding-right:unset;-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px}}@media (any-hover: hover){.toast-button:hover{background-color:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.08)}.toast-button-cancel:hover{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.08)}}\";\n\nconst Toast = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.didPresent = createEvent(this, \"ionToastDidPresent\", 7);\n this.willPresent = createEvent(this, \"ionToastWillPresent\", 7);\n this.willDismiss = createEvent(this, \"ionToastWillDismiss\", 7);\n this.didDismiss = createEvent(this, \"ionToastDidDismiss\", 7);\n this.presented = false;\n /**\n * How many milliseconds to wait before hiding the toast. By default, it will show\n * until `dismiss()` is called.\n */\n this.duration = 0;\n /**\n * If `true`, the keyboard will be automatically dismissed when the overlay is presented.\n */\n this.keyboardClose = false;\n /**\n * The position of the toast on the screen.\n */\n this.position = 'bottom';\n /**\n * If `true`, the toast will be translucent.\n * Only applies when the mode is `\"ios\"` and the device supports\n * [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).\n */\n this.translucent = false;\n /**\n * If `true`, the toast will animate.\n */\n this.animated = true;\n this.dispatchCancelHandler = (ev) => {\n const role = ev.detail.role;\n if (isCancel(role)) {\n const cancelButton = this.getButtons().find(b => b.role === 'cancel');\n this.callButtonHandler(cancelButton);\n }\n };\n }\n connectedCallback() {\n prepareOverlay(this.el);\n }\n /**\n * Present the toast overlay after it has been created.\n */\n async present() {\n await present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, this.position);\n if (this.duration > 0) {\n this.durationTimeout = setTimeout(() => this.dismiss(undefined, 'timeout'), this.duration);\n }\n }\n /**\n * Dismiss the toast overlay after it has been presented.\n *\n * @param data Any data to emit in the dismiss events.\n * @param role The role of the element that is dismissing the toast.\n * This can be useful in a button handler for determining which button was\n * clicked to dismiss the toast.\n * Some examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`.\n */\n dismiss(data, role) {\n if (this.durationTimeout) {\n clearTimeout(this.durationTimeout);\n }\n return dismiss(this, data, role, 'toastLeave', iosLeaveAnimation, mdLeaveAnimation, this.position);\n }\n /**\n * Returns a promise that resolves when the toast did dismiss.\n */\n onDidDismiss() {\n return eventMethod(this.el, 'ionToastDidDismiss');\n }\n /**\n * Returns a promise that resolves when the toast will dismiss.\n */\n onWillDismiss() {\n return eventMethod(this.el, 'ionToastWillDismiss');\n }\n getButtons() {\n const buttons = this.buttons\n ? this.buttons.map(b => {\n return (typeof b === 'string')\n ? { text: b }\n : b;\n })\n : [];\n return buttons;\n }\n async buttonClick(button) {\n const role = button.role;\n if (isCancel(role)) {\n return this.dismiss(undefined, role);\n }\n const shouldDismiss = await this.callButtonHandler(button);\n if (shouldDismiss) {\n return this.dismiss(undefined, role);\n }\n return Promise.resolve();\n }\n async callButtonHandler(button) {\n if (button && button.handler) {\n // a handler has been provided, execute it\n // pass the handler the values from the inputs\n try {\n const rtn = await safeCall(button.handler);\n if (rtn === false) {\n // if the return value of the handler is false then do not dismiss\n return false;\n }\n }\n catch (e) {\n console.error(e);\n }\n }\n return true;\n }\n renderButtons(buttons, side) {\n if (buttons.length === 0) {\n return;\n }\n const mode = getIonMode(this);\n const buttonGroupsClasses = {\n 'toast-button-group': true,\n [`toast-button-group-${side}`]: true\n };\n return (h(\"div\", { class: buttonGroupsClasses }, buttons.map(b => h(\"button\", { type: \"button\", class: buttonClass(b), tabIndex: 0, onClick: () => this.buttonClick(b), part: \"button\" }, h(\"div\", { class: \"toast-button-inner\" }, b.icon &&\n h(\"ion-icon\", { icon: b.icon, slot: b.text === undefined ? 'icon-only' : undefined, class: \"toast-icon\" }), b.text), mode === 'md' && h(\"ion-ripple-effect\", { type: b.icon !== undefined && b.text === undefined ? 'unbounded' : 'bounded' })))));\n }\n render() {\n const allButtons = this.getButtons();\n const startButtons = allButtons.filter(b => b.side === 'start');\n const endButtons = allButtons.filter(b => b.side !== 'start');\n const mode = getIonMode(this);\n const wrapperClass = {\n 'toast-wrapper': true,\n [`toast-${this.position}`]: true\n };\n return (h(Host, { style: {\n zIndex: `${60000 + this.overlayIndex}`,\n }, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'toast-translucent': this.translucent })), tabindex: \"-1\", onIonToastWillDismiss: this.dispatchCancelHandler }, h(\"div\", { class: wrapperClass }, h(\"div\", { class: \"toast-container\", part: \"container\" }, this.renderButtons(startButtons, 'start'), h(\"div\", { class: \"toast-content\" }, this.header !== undefined &&\n h(\"div\", { class: \"toast-header\", part: \"header\" }, this.header), this.message !== undefined &&\n h(\"div\", { class: \"toast-message\", part: \"message\", innerHTML: sanitizeDOMString(this.message) })), this.renderButtons(endButtons, 'end')))));\n }\n get el() { return getElement(this); }\n};\nconst buttonClass = (button) => {\n return Object.assign({ 'toast-button': true, 'toast-button-icon-only': button.icon !== undefined && button.text === undefined, [`toast-button-${button.role}`]: button.role !== undefined, 'ion-focusable': true, 'ion-activatable': true }, getClassMap(button.cssClass));\n};\nToast.style = {\n ios: toastIosCss,\n md: toastMdCss\n};\n\nexport { Toast as ion_toast };\n"],"sourceRoot":"webpack:///"} |