{"ast":null,"code":"import _asyncToGenerator from \"F:/workspace/202226701027/huinongbao-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\n/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';\nimport { a as findClosestIonContent, d as disableContentScrollY, r as resetContentScrollY } from './index8.js';\nimport { m as isEndSide } from './helpers.js';\nimport { w as watchForOptions } from './watch-options.js';\nimport { b as getIonMode } from './ionic-global.js';\nconst itemSlidingCss = \"ion-item-sliding{display:block;position:relative;width:100%;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}ion-item-sliding .item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.item-sliding-active-slide .item{position:relative;-webkit-transition:-webkit-transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1);transition:-webkit-transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1);transition:transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1);transition:transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1), -webkit-transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1);opacity:1;z-index:2;pointer-events:none;will-change:transform}.item-sliding-closing ion-item-options{pointer-events:none}.item-sliding-active-swipe-end .item-options-end .item-option-expandable{padding-left:100%;-ms-flex-order:1;order:1;-webkit-transition-duration:0.6s;transition-duration:0.6s;-webkit-transition-property:padding-left;transition-property:padding-left}:host-context([dir=rtl]) .item-sliding-active-swipe-end .item-options-end .item-option-expandable{-ms-flex-order:-1;order:-1}[dir=rtl] .item-sliding-active-swipe-end .item-options-end .item-option-expandable{-ms-flex-order:-1;order:-1}@supports selector(:dir(rtl)){.item-sliding-active-swipe-end .item-options-end .item-option-expandable:dir(rtl){-ms-flex-order:-1;order:-1}}.item-sliding-active-swipe-start .item-options-start .item-option-expandable{padding-right:100%;-ms-flex-order:-1;order:-1;-webkit-transition-duration:0.6s;transition-duration:0.6s;-webkit-transition-property:padding-right;transition-property:padding-right}:host-context([dir=rtl]) .item-sliding-active-swipe-start .item-options-start .item-option-expandable{-ms-flex-order:1;order:1}[dir=rtl] .item-sliding-active-swipe-start .item-options-start .item-option-expandable{-ms-flex-order:1;order:1}@supports selector(:dir(rtl)){.item-sliding-active-swipe-start .item-options-start .item-option-expandable:dir(rtl){-ms-flex-order:1;order:1}}\";\nconst IonItemSlidingStyle0 = itemSlidingCss;\nconst SWIPE_MARGIN = 30;\nconst ELASTIC_FACTOR = 0.55;\nlet openSlidingItem;\nconst ItemSliding = /*@__PURE__*/proxyCustomElement(class ItemSliding extends HTMLElement {\n constructor() {\n super();\n this.__registerHost();\n this.ionDrag = createEvent(this, \"ionDrag\", 7);\n this.item = null;\n this.openAmount = 0;\n this.initialOpenAmount = 0;\n this.optsWidthRightSide = 0;\n this.optsWidthLeftSide = 0;\n this.sides = 0 /* ItemSide.None */;\n this.optsDirty = true;\n this.contentEl = null;\n this.initialContentScrollY = true;\n this.state = 2 /* SlidingState.Disabled */;\n this.disabled = false;\n }\n disabledChanged() {\n if (this.gesture) {\n this.gesture.enable(!this.disabled);\n }\n }\n connectedCallback() {\n var _this = this;\n return _asyncToGenerator(function* () {\n const {\n el\n } = _this;\n _this.item = el.querySelector('ion-item');\n _this.contentEl = findClosestIonContent(el);\n /**\n * The MutationObserver needs to be added before we\n * call updateOptions below otherwise we may miss\n * ion-item-option elements that are added to the DOM\n * while updateOptions is running and before the MutationObserver\n * has been initialized.\n */\n _this.mutationObserver = watchForOptions(el, 'ion-item-option', /*#__PURE__*/_asyncToGenerator(function* () {\n yield _this.updateOptions();\n }));\n yield _this.updateOptions();\n _this.gesture = (yield import('./index3.js')).createGesture({\n el,\n gestureName: 'item-swipe',\n gesturePriority: 100,\n threshold: 5,\n canStart: ev => _this.canStart(ev),\n onStart: () => _this.onStart(),\n onMove: ev => _this.onMove(ev),\n onEnd: ev => _this.onEnd(ev)\n });\n _this.disabledChanged();\n })();\n }\n disconnectedCallback() {\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n this.item = null;\n this.leftOptions = this.rightOptions = undefined;\n if (openSlidingItem === this.el) {\n openSlidingItem = undefined;\n }\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n this.mutationObserver = undefined;\n }\n }\n /**\n * Get the amount the item is open in pixels.\n */\n getOpenAmount() {\n return Promise.resolve(this.openAmount);\n }\n /**\n * Get the ratio of the open amount of the item compared to the width of the options.\n * If the number returned is positive, then the options on the right side are open.\n * If the number returned is negative, then the options on the left side are open.\n * If the absolute value of the number is greater than 1, the item is open more than\n * the width of the options.\n */\n getSlidingRatio() {\n return Promise.resolve(this.getSlidingRatioSync());\n }\n /**\n * Open the sliding item.\n *\n * @param side The side of the options to open. If a side is not provided, it will open the first set of options it finds within the item.\n */\n open(side) {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n var _a;\n /**\n * It is possible for the item to be added to the DOM\n * after the item-sliding component was created. As a result,\n * if this.item is null, then we should attempt to\n * query for the ion-item again.\n * However, if the item is already defined then\n * we do not query for it again.\n */\n const item = _this2.item = (_a = _this2.item) !== null && _a !== void 0 ? _a : _this2.el.querySelector('ion-item');\n if (item === null) {\n return;\n }\n const optionsToOpen = _this2.getOptions(side);\n if (!optionsToOpen) {\n return;\n }\n /**\n * If side is not set, we need to infer the side\n * so we know which direction to move the options\n */\n if (side === undefined) {\n side = optionsToOpen === _this2.leftOptions ? 'start' : 'end';\n }\n // In RTL we want to switch the sides\n side = isEndSide(side) ? 'end' : 'start';\n const isStartOpen = _this2.openAmount < 0;\n const isEndOpen = _this2.openAmount > 0;\n /**\n * If a side is open and a user tries to\n * re-open the same side, we should not do anything\n */\n if (isStartOpen && optionsToOpen === _this2.leftOptions) {\n return;\n }\n if (isEndOpen && optionsToOpen === _this2.rightOptions) {\n return;\n }\n _this2.closeOpened();\n _this2.state = 4 /* SlidingState.Enabled */;\n requestAnimationFrame(() => {\n _this2.calculateOptsWidth();\n const width = side === 'end' ? _this2.optsWidthRightSide : -_this2.optsWidthLeftSide;\n openSlidingItem = _this2.el;\n _this2.setOpenAmount(width, false);\n _this2.state = side === 'end' ? 8 /* SlidingState.End */ : 16 /* SlidingState.Start */;\n });\n })();\n }\n /**\n * Close the sliding item. Items can also be closed from the [List](./list).\n */\n close() {\n var _this3 = this;\n return _asyncToGenerator(function* () {\n _this3.setOpenAmount(0, true);\n })();\n }\n /**\n * Close all of the sliding items in the list. Items can also be closed from the [List](./list).\n */\n closeOpened() {\n return _asyncToGenerator(function* () {\n if (openSlidingItem !== undefined) {\n openSlidingItem.close();\n openSlidingItem = undefined;\n return true;\n }\n return false;\n })();\n }\n /**\n * Given an optional side, return the ion-item-options element.\n *\n * @param side This side of the options to get. If a side is not provided it will\n * return the first one available.\n */\n getOptions(side) {\n if (side === undefined) {\n return this.leftOptions || this.rightOptions;\n } else if (side === 'start') {\n return this.leftOptions;\n } else {\n return this.rightOptions;\n }\n }\n updateOptions() {\n var _this4 = this;\n return _asyncToGenerator(function* () {\n const options = _this4.el.querySelectorAll('ion-item-options');\n let sides = 0;\n // Reset left and right options in case they were removed\n _this4.leftOptions = _this4.rightOptions = undefined;\n for (let i = 0; i < options.length; i++) {\n const item = options.item(i);\n /**\n * We cannot use the componentOnReady helper\n * util here since we need to wait for all of these items\n * to be ready before we set `this.sides` and `this.optsDirty`.\n */\n // eslint-disable-next-line custom-rules/no-component-on-ready-method\n const option = item.componentOnReady !== undefined ? yield item.componentOnReady() : item;\n const side = isEndSide(option.side) ? 'end' : 'start';\n if (side === 'start') {\n _this4.leftOptions = option;\n sides |= 1 /* ItemSide.Start */;\n } else {\n _this4.rightOptions = option;\n sides |= 2 /* ItemSide.End */;\n }\n }\n _this4.optsDirty = true;\n _this4.sides = sides;\n })();\n }\n canStart(gesture) {\n /**\n * If very close to start of the screen\n * do not open left side so swipe to go\n * back will still work.\n */\n const rtl = document.dir === 'rtl';\n const atEdge = rtl ? window.innerWidth - gesture.startX < 15 : gesture.startX < 15;\n if (atEdge) {\n return false;\n }\n const selected = openSlidingItem;\n if (selected && selected !== this.el) {\n this.closeOpened();\n }\n return !!(this.rightOptions || this.leftOptions);\n }\n onStart() {\n /**\n * We need to query for the ion-item\n * every time the gesture starts. Developers\n * may toggle ion-item elements via *ngIf.\n */\n this.item = this.el.querySelector('ion-item');\n const {\n contentEl\n } = this;\n if (contentEl) {\n this.initialContentScrollY = disableContentScrollY(contentEl);\n }\n openSlidingItem = this.el;\n if (this.tmr !== undefined) {\n clearTimeout(this.tmr);\n this.tmr = undefined;\n }\n if (this.openAmount === 0) {\n this.optsDirty = true;\n this.state = 4 /* SlidingState.Enabled */;\n }\n this.initialOpenAmount = this.openAmount;\n if (this.item) {\n this.item.style.transition = 'none';\n }\n }\n onMove(gesture) {\n if (this.optsDirty) {\n this.calculateOptsWidth();\n }\n let openAmount = this.initialOpenAmount - gesture.deltaX;\n switch (this.sides) {\n case 2 /* ItemSide.End */:\n openAmount = Math.max(0, openAmount);\n break;\n case 1 /* ItemSide.Start */:\n openAmount = Math.min(0, openAmount);\n break;\n case 3 /* ItemSide.Both */:\n break;\n case 0 /* ItemSide.None */:\n return;\n default:\n console.warn('invalid ItemSideFlags value', this.sides);\n break;\n }\n let optsWidth;\n if (openAmount > this.optsWidthRightSide) {\n optsWidth = this.optsWidthRightSide;\n openAmount = optsWidth + (openAmount - optsWidth) * ELASTIC_FACTOR;\n } else if (openAmount < -this.optsWidthLeftSide) {\n optsWidth = -this.optsWidthLeftSide;\n openAmount = optsWidth + (openAmount - optsWidth) * ELASTIC_FACTOR;\n }\n this.setOpenAmount(openAmount, false);\n }\n onEnd(gesture) {\n const {\n contentEl,\n initialContentScrollY\n } = this;\n if (contentEl) {\n resetContentScrollY(contentEl, initialContentScrollY);\n }\n const velocity = gesture.velocityX;\n let restingPoint = this.openAmount > 0 ? this.optsWidthRightSide : -this.optsWidthLeftSide;\n // Check if the drag didn't clear the buttons mid-point\n // and we aren't moving fast enough to swipe open\n const isResetDirection = this.openAmount > 0 === !(velocity < 0);\n const isMovingFast = Math.abs(velocity) > 0.3;\n const isOnCloseZone = Math.abs(this.openAmount) < Math.abs(restingPoint / 2);\n if (swipeShouldReset(isResetDirection, isMovingFast, isOnCloseZone)) {\n restingPoint = 0;\n }\n const state = this.state;\n this.setOpenAmount(restingPoint, true);\n if ((state & 32 /* SlidingState.SwipeEnd */) !== 0 && this.rightOptions) {\n this.rightOptions.fireSwipeEvent();\n } else if ((state & 64 /* SlidingState.SwipeStart */) !== 0 && this.leftOptions) {\n this.leftOptions.fireSwipeEvent();\n }\n }\n calculateOptsWidth() {\n this.optsWidthRightSide = 0;\n if (this.rightOptions) {\n this.rightOptions.style.display = 'flex';\n this.optsWidthRightSide = this.rightOptions.offsetWidth;\n this.rightOptions.style.display = '';\n }\n this.optsWidthLeftSide = 0;\n if (this.leftOptions) {\n this.leftOptions.style.display = 'flex';\n this.optsWidthLeftSide = this.leftOptions.offsetWidth;\n this.leftOptions.style.display = '';\n }\n this.optsDirty = false;\n }\n setOpenAmount(openAmount, isFinal) {\n if (this.tmr !== undefined) {\n clearTimeout(this.tmr);\n this.tmr = undefined;\n }\n if (!this.item) {\n return;\n }\n const {\n el\n } = this;\n const style = this.item.style;\n this.openAmount = openAmount;\n if (isFinal) {\n style.transition = '';\n }\n if (openAmount > 0) {\n this.state = openAmount >= this.optsWidthRightSide + SWIPE_MARGIN ? 8 /* SlidingState.End */ | 32 /* SlidingState.SwipeEnd */ : 8 /* SlidingState.End */;\n } else if (openAmount < 0) {\n this.state = openAmount <= -this.optsWidthLeftSide - SWIPE_MARGIN ? 16 /* SlidingState.Start */ | 64 /* SlidingState.SwipeStart */ : 16 /* SlidingState.Start */;\n } else {\n /**\n * The sliding options should not be\n * clickable while the item is closing.\n */\n el.classList.add('item-sliding-closing');\n /**\n * Item sliding cannot be interrupted\n * while closing the item. If it did,\n * it would allow the item to get into an\n * inconsistent state where multiple\n * items are then open at the same time.\n */\n if (this.gesture) {\n this.gesture.enable(false);\n }\n this.tmr = setTimeout(() => {\n this.state = 2 /* SlidingState.Disabled */;\n this.tmr = undefined;\n if (this.gesture) {\n this.gesture.enable(!this.disabled);\n }\n el.classList.remove('item-sliding-closing');\n }, 600);\n openSlidingItem = undefined;\n style.transform = '';\n return;\n }\n style.transform = `translate3d(${-openAmount}px,0,0)`;\n this.ionDrag.emit({\n amount: openAmount,\n ratio: this.getSlidingRatioSync()\n });\n }\n getSlidingRatioSync() {\n if (this.openAmount > 0) {\n return this.openAmount / this.optsWidthRightSide;\n } else if (this.openAmount < 0) {\n return this.openAmount / this.optsWidthLeftSide;\n } else {\n return 0;\n }\n }\n render() {\n const mode = getIonMode(this);\n return h(Host, {\n key: '47a3edd2ef2080ed9cfc2784277dea09785c7dc4',\n class: {\n [mode]: true,\n 'item-sliding-active-slide': this.state !== 2 /* SlidingState.Disabled */,\n 'item-sliding-active-options-end': (this.state & 8 /* SlidingState.End */) !== 0,\n 'item-sliding-active-options-start': (this.state & 16 /* SlidingState.Start */) !== 0,\n 'item-sliding-active-swipe-end': (this.state & 32 /* SlidingState.SwipeEnd */) !== 0,\n 'item-sliding-active-swipe-start': (this.state & 64 /* SlidingState.SwipeStart */) !== 0\n }\n });\n }\n get el() {\n return this;\n }\n static get watchers() {\n return {\n \"disabled\": [\"disabledChanged\"]\n };\n }\n static get style() {\n return IonItemSlidingStyle0;\n }\n}, [0, \"ion-item-sliding\", {\n \"disabled\": [4],\n \"state\": [32],\n \"getOpenAmount\": [64],\n \"getSlidingRatio\": [64],\n \"open\": [64],\n \"close\": [64],\n \"closeOpened\": [64]\n}, undefined, {\n \"disabled\": [\"disabledChanged\"]\n}]);\nconst swipeShouldReset = (isResetDirection, isMovingFast, isOnResetZone) => {\n // The logic required to know when the sliding item should close (openAmount=0)\n // depends on three booleans (isResetDirection, isMovingFast, isOnResetZone)\n // and it ended up being too complicated to be written manually without errors\n // so the truth table is attached below: (0=false, 1=true)\n // isResetDirection | isMovingFast | isOnResetZone || shouldClose\n // 0 | 0 | 0 || 0\n // 0 | 0 | 1 || 1\n // 0 | 1 | 0 || 0\n // 0 | 1 | 1 || 0\n // 1 | 0 | 0 || 0\n // 1 | 0 | 1 || 1\n // 1 | 1 | 0 || 1\n // 1 | 1 | 1 || 1\n // The resulting expression was generated by resolving the K-map (Karnaugh map):\n return !isMovingFast && isOnResetZone || isResetDirection && isMovingFast;\n};\nfunction defineCustomElement$1() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"ion-item-sliding\"];\n components.forEach(tagName => {\n switch (tagName) {\n case \"ion-item-sliding\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, ItemSliding);\n }\n break;\n }\n });\n}\nconst IonItemSliding = ItemSliding;\nconst defineCustomElement = defineCustomElement$1;\nexport { IonItemSliding, defineCustomElement };","map":{"version":3,"names":["proxyCustomElement","HTMLElement","createEvent","h","Host","a","findClosestIonContent","d","disableContentScrollY","r","resetContentScrollY","m","isEndSide","w","watchForOptions","b","getIonMode","itemSlidingCss","IonItemSlidingStyle0","SWIPE_MARGIN","ELASTIC_FACTOR","openSlidingItem","ItemSliding","constructor","__registerHost","ionDrag","item","openAmount","initialOpenAmount","optsWidthRightSide","optsWidthLeftSide","sides","optsDirty","contentEl","initialContentScrollY","state","disabled","disabledChanged","gesture","enable","connectedCallback","_this","_asyncToGenerator","el","querySelector","mutationObserver","updateOptions","createGesture","gestureName","gesturePriority","threshold","canStart","ev","onStart","onMove","onEnd","disconnectedCallback","destroy","undefined","leftOptions","rightOptions","disconnect","getOpenAmount","Promise","resolve","getSlidingRatio","getSlidingRatioSync","open","side","_this2","_a","optionsToOpen","getOptions","isStartOpen","isEndOpen","closeOpened","requestAnimationFrame","calculateOptsWidth","width","setOpenAmount","close","_this3","_this4","options","querySelectorAll","i","length","option","componentOnReady","rtl","document","dir","atEdge","window","innerWidth","startX","selected","tmr","clearTimeout","style","transition","deltaX","Math","max","min","console","warn","optsWidth","velocity","velocityX","restingPoint","isResetDirection","isMovingFast","abs","isOnCloseZone","swipeShouldReset","fireSwipeEvent","display","offsetWidth","isFinal","classList","add","setTimeout","remove","transform","emit","amount","ratio","render","mode","key","class","watchers","isOnResetZone","defineCustomElement$1","customElements","components","forEach","tagName","get","define","IonItemSliding","defineCustomElement"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@ionic/core/components/ion-item-sliding.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';\nimport { a as findClosestIonContent, d as disableContentScrollY, r as resetContentScrollY } from './index8.js';\nimport { m as isEndSide } from './helpers.js';\nimport { w as watchForOptions } from './watch-options.js';\nimport { b as getIonMode } from './ionic-global.js';\n\nconst itemSlidingCss = \"ion-item-sliding{display:block;position:relative;width:100%;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}ion-item-sliding .item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.item-sliding-active-slide .item{position:relative;-webkit-transition:-webkit-transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1);transition:-webkit-transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1);transition:transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1);transition:transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1), -webkit-transform 500ms cubic-bezier(0.36, 0.66, 0.04, 1);opacity:1;z-index:2;pointer-events:none;will-change:transform}.item-sliding-closing ion-item-options{pointer-events:none}.item-sliding-active-swipe-end .item-options-end .item-option-expandable{padding-left:100%;-ms-flex-order:1;order:1;-webkit-transition-duration:0.6s;transition-duration:0.6s;-webkit-transition-property:padding-left;transition-property:padding-left}:host-context([dir=rtl]) .item-sliding-active-swipe-end .item-options-end .item-option-expandable{-ms-flex-order:-1;order:-1}[dir=rtl] .item-sliding-active-swipe-end .item-options-end .item-option-expandable{-ms-flex-order:-1;order:-1}@supports selector(:dir(rtl)){.item-sliding-active-swipe-end .item-options-end .item-option-expandable:dir(rtl){-ms-flex-order:-1;order:-1}}.item-sliding-active-swipe-start .item-options-start .item-option-expandable{padding-right:100%;-ms-flex-order:-1;order:-1;-webkit-transition-duration:0.6s;transition-duration:0.6s;-webkit-transition-property:padding-right;transition-property:padding-right}:host-context([dir=rtl]) .item-sliding-active-swipe-start .item-options-start .item-option-expandable{-ms-flex-order:1;order:1}[dir=rtl] .item-sliding-active-swipe-start .item-options-start .item-option-expandable{-ms-flex-order:1;order:1}@supports selector(:dir(rtl)){.item-sliding-active-swipe-start .item-options-start .item-option-expandable:dir(rtl){-ms-flex-order:1;order:1}}\";\nconst IonItemSlidingStyle0 = itemSlidingCss;\n\nconst SWIPE_MARGIN = 30;\nconst ELASTIC_FACTOR = 0.55;\nlet openSlidingItem;\nconst ItemSliding = /*@__PURE__*/ proxyCustomElement(class ItemSliding extends HTMLElement {\n constructor() {\n super();\n this.__registerHost();\n this.ionDrag = createEvent(this, \"ionDrag\", 7);\n this.item = null;\n this.openAmount = 0;\n this.initialOpenAmount = 0;\n this.optsWidthRightSide = 0;\n this.optsWidthLeftSide = 0;\n this.sides = 0 /* ItemSide.None */;\n this.optsDirty = true;\n this.contentEl = null;\n this.initialContentScrollY = true;\n this.state = 2 /* SlidingState.Disabled */;\n this.disabled = false;\n }\n disabledChanged() {\n if (this.gesture) {\n this.gesture.enable(!this.disabled);\n }\n }\n async connectedCallback() {\n const { el } = this;\n this.item = el.querySelector('ion-item');\n this.contentEl = findClosestIonContent(el);\n /**\n * The MutationObserver needs to be added before we\n * call updateOptions below otherwise we may miss\n * ion-item-option elements that are added to the DOM\n * while updateOptions is running and before the MutationObserver\n * has been initialized.\n */\n this.mutationObserver = watchForOptions(el, 'ion-item-option', async () => {\n await this.updateOptions();\n });\n await this.updateOptions();\n this.gesture = (await import('./index3.js')).createGesture({\n el,\n gestureName: 'item-swipe',\n gesturePriority: 100,\n threshold: 5,\n canStart: (ev) => this.canStart(ev),\n onStart: () => this.onStart(),\n onMove: (ev) => this.onMove(ev),\n onEnd: (ev) => this.onEnd(ev),\n });\n this.disabledChanged();\n }\n disconnectedCallback() {\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n this.item = null;\n this.leftOptions = this.rightOptions = undefined;\n if (openSlidingItem === this.el) {\n openSlidingItem = undefined;\n }\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n this.mutationObserver = undefined;\n }\n }\n /**\n * Get the amount the item is open in pixels.\n */\n getOpenAmount() {\n return Promise.resolve(this.openAmount);\n }\n /**\n * Get the ratio of the open amount of the item compared to the width of the options.\n * If the number returned is positive, then the options on the right side are open.\n * If the number returned is negative, then the options on the left side are open.\n * If the absolute value of the number is greater than 1, the item is open more than\n * the width of the options.\n */\n getSlidingRatio() {\n return Promise.resolve(this.getSlidingRatioSync());\n }\n /**\n * Open the sliding item.\n *\n * @param side The side of the options to open. If a side is not provided, it will open the first set of options it finds within the item.\n */\n async open(side) {\n var _a;\n /**\n * It is possible for the item to be added to the DOM\n * after the item-sliding component was created. As a result,\n * if this.item is null, then we should attempt to\n * query for the ion-item again.\n * However, if the item is already defined then\n * we do not query for it again.\n */\n const item = (this.item = (_a = this.item) !== null && _a !== void 0 ? _a : this.el.querySelector('ion-item'));\n if (item === null) {\n return;\n }\n const optionsToOpen = this.getOptions(side);\n if (!optionsToOpen) {\n return;\n }\n /**\n * If side is not set, we need to infer the side\n * so we know which direction to move the options\n */\n if (side === undefined) {\n side = optionsToOpen === this.leftOptions ? 'start' : 'end';\n }\n // In RTL we want to switch the sides\n side = isEndSide(side) ? 'end' : 'start';\n const isStartOpen = this.openAmount < 0;\n const isEndOpen = this.openAmount > 0;\n /**\n * If a side is open and a user tries to\n * re-open the same side, we should not do anything\n */\n if (isStartOpen && optionsToOpen === this.leftOptions) {\n return;\n }\n if (isEndOpen && optionsToOpen === this.rightOptions) {\n return;\n }\n this.closeOpened();\n this.state = 4 /* SlidingState.Enabled */;\n requestAnimationFrame(() => {\n this.calculateOptsWidth();\n const width = side === 'end' ? this.optsWidthRightSide : -this.optsWidthLeftSide;\n openSlidingItem = this.el;\n this.setOpenAmount(width, false);\n this.state = side === 'end' ? 8 /* SlidingState.End */ : 16 /* SlidingState.Start */;\n });\n }\n /**\n * Close the sliding item. Items can also be closed from the [List](./list).\n */\n async close() {\n this.setOpenAmount(0, true);\n }\n /**\n * Close all of the sliding items in the list. Items can also be closed from the [List](./list).\n */\n async closeOpened() {\n if (openSlidingItem !== undefined) {\n openSlidingItem.close();\n openSlidingItem = undefined;\n return true;\n }\n return false;\n }\n /**\n * Given an optional side, return the ion-item-options element.\n *\n * @param side This side of the options to get. If a side is not provided it will\n * return the first one available.\n */\n getOptions(side) {\n if (side === undefined) {\n return this.leftOptions || this.rightOptions;\n }\n else if (side === 'start') {\n return this.leftOptions;\n }\n else {\n return this.rightOptions;\n }\n }\n async updateOptions() {\n const options = this.el.querySelectorAll('ion-item-options');\n let sides = 0;\n // Reset left and right options in case they were removed\n this.leftOptions = this.rightOptions = undefined;\n for (let i = 0; i < options.length; i++) {\n const item = options.item(i);\n /**\n * We cannot use the componentOnReady helper\n * util here since we need to wait for all of these items\n * to be ready before we set `this.sides` and `this.optsDirty`.\n */\n // eslint-disable-next-line custom-rules/no-component-on-ready-method\n const option = item.componentOnReady !== undefined ? await item.componentOnReady() : item;\n const side = isEndSide(option.side) ? 'end' : 'start';\n if (side === 'start') {\n this.leftOptions = option;\n sides |= 1 /* ItemSide.Start */;\n }\n else {\n this.rightOptions = option;\n sides |= 2 /* ItemSide.End */;\n }\n }\n this.optsDirty = true;\n this.sides = sides;\n }\n canStart(gesture) {\n /**\n * If very close to start of the screen\n * do not open left side so swipe to go\n * back will still work.\n */\n const rtl = document.dir === 'rtl';\n const atEdge = rtl ? window.innerWidth - gesture.startX < 15 : gesture.startX < 15;\n if (atEdge) {\n return false;\n }\n const selected = openSlidingItem;\n if (selected && selected !== this.el) {\n this.closeOpened();\n }\n return !!(this.rightOptions || this.leftOptions);\n }\n onStart() {\n /**\n * We need to query for the ion-item\n * every time the gesture starts. Developers\n * may toggle ion-item elements via *ngIf.\n */\n this.item = this.el.querySelector('ion-item');\n const { contentEl } = this;\n if (contentEl) {\n this.initialContentScrollY = disableContentScrollY(contentEl);\n }\n openSlidingItem = this.el;\n if (this.tmr !== undefined) {\n clearTimeout(this.tmr);\n this.tmr = undefined;\n }\n if (this.openAmount === 0) {\n this.optsDirty = true;\n this.state = 4 /* SlidingState.Enabled */;\n }\n this.initialOpenAmount = this.openAmount;\n if (this.item) {\n this.item.style.transition = 'none';\n }\n }\n onMove(gesture) {\n if (this.optsDirty) {\n this.calculateOptsWidth();\n }\n let openAmount = this.initialOpenAmount - gesture.deltaX;\n switch (this.sides) {\n case 2 /* ItemSide.End */:\n openAmount = Math.max(0, openAmount);\n break;\n case 1 /* ItemSide.Start */:\n openAmount = Math.min(0, openAmount);\n break;\n case 3 /* ItemSide.Both */:\n break;\n case 0 /* ItemSide.None */:\n return;\n default:\n console.warn('invalid ItemSideFlags value', this.sides);\n break;\n }\n let optsWidth;\n if (openAmount > this.optsWidthRightSide) {\n optsWidth = this.optsWidthRightSide;\n openAmount = optsWidth + (openAmount - optsWidth) * ELASTIC_FACTOR;\n }\n else if (openAmount < -this.optsWidthLeftSide) {\n optsWidth = -this.optsWidthLeftSide;\n openAmount = optsWidth + (openAmount - optsWidth) * ELASTIC_FACTOR;\n }\n this.setOpenAmount(openAmount, false);\n }\n onEnd(gesture) {\n const { contentEl, initialContentScrollY } = this;\n if (contentEl) {\n resetContentScrollY(contentEl, initialContentScrollY);\n }\n const velocity = gesture.velocityX;\n let restingPoint = this.openAmount > 0 ? this.optsWidthRightSide : -this.optsWidthLeftSide;\n // Check if the drag didn't clear the buttons mid-point\n // and we aren't moving fast enough to swipe open\n const isResetDirection = this.openAmount > 0 === !(velocity < 0);\n const isMovingFast = Math.abs(velocity) > 0.3;\n const isOnCloseZone = Math.abs(this.openAmount) < Math.abs(restingPoint / 2);\n if (swipeShouldReset(isResetDirection, isMovingFast, isOnCloseZone)) {\n restingPoint = 0;\n }\n const state = this.state;\n this.setOpenAmount(restingPoint, true);\n if ((state & 32 /* SlidingState.SwipeEnd */) !== 0 && this.rightOptions) {\n this.rightOptions.fireSwipeEvent();\n }\n else if ((state & 64 /* SlidingState.SwipeStart */) !== 0 && this.leftOptions) {\n this.leftOptions.fireSwipeEvent();\n }\n }\n calculateOptsWidth() {\n this.optsWidthRightSide = 0;\n if (this.rightOptions) {\n this.rightOptions.style.display = 'flex';\n this.optsWidthRightSide = this.rightOptions.offsetWidth;\n this.rightOptions.style.display = '';\n }\n this.optsWidthLeftSide = 0;\n if (this.leftOptions) {\n this.leftOptions.style.display = 'flex';\n this.optsWidthLeftSide = this.leftOptions.offsetWidth;\n this.leftOptions.style.display = '';\n }\n this.optsDirty = false;\n }\n setOpenAmount(openAmount, isFinal) {\n if (this.tmr !== undefined) {\n clearTimeout(this.tmr);\n this.tmr = undefined;\n }\n if (!this.item) {\n return;\n }\n const { el } = this;\n const style = this.item.style;\n this.openAmount = openAmount;\n if (isFinal) {\n style.transition = '';\n }\n if (openAmount > 0) {\n this.state =\n openAmount >= this.optsWidthRightSide + SWIPE_MARGIN\n ? 8 /* SlidingState.End */ | 32 /* SlidingState.SwipeEnd */\n : 8 /* SlidingState.End */;\n }\n else if (openAmount < 0) {\n this.state =\n openAmount <= -this.optsWidthLeftSide - SWIPE_MARGIN\n ? 16 /* SlidingState.Start */ | 64 /* SlidingState.SwipeStart */\n : 16 /* SlidingState.Start */;\n }\n else {\n /**\n * The sliding options should not be\n * clickable while the item is closing.\n */\n el.classList.add('item-sliding-closing');\n /**\n * Item sliding cannot be interrupted\n * while closing the item. If it did,\n * it would allow the item to get into an\n * inconsistent state where multiple\n * items are then open at the same time.\n */\n if (this.gesture) {\n this.gesture.enable(false);\n }\n this.tmr = setTimeout(() => {\n this.state = 2 /* SlidingState.Disabled */;\n this.tmr = undefined;\n if (this.gesture) {\n this.gesture.enable(!this.disabled);\n }\n el.classList.remove('item-sliding-closing');\n }, 600);\n openSlidingItem = undefined;\n style.transform = '';\n return;\n }\n style.transform = `translate3d(${-openAmount}px,0,0)`;\n this.ionDrag.emit({\n amount: openAmount,\n ratio: this.getSlidingRatioSync(),\n });\n }\n getSlidingRatioSync() {\n if (this.openAmount > 0) {\n return this.openAmount / this.optsWidthRightSide;\n }\n else if (this.openAmount < 0) {\n return this.openAmount / this.optsWidthLeftSide;\n }\n else {\n return 0;\n }\n }\n render() {\n const mode = getIonMode(this);\n return (h(Host, { key: '47a3edd2ef2080ed9cfc2784277dea09785c7dc4', class: {\n [mode]: true,\n 'item-sliding-active-slide': this.state !== 2 /* SlidingState.Disabled */,\n 'item-sliding-active-options-end': (this.state & 8 /* SlidingState.End */) !== 0,\n 'item-sliding-active-options-start': (this.state & 16 /* SlidingState.Start */) !== 0,\n 'item-sliding-active-swipe-end': (this.state & 32 /* SlidingState.SwipeEnd */) !== 0,\n 'item-sliding-active-swipe-start': (this.state & 64 /* SlidingState.SwipeStart */) !== 0,\n } }));\n }\n get el() { return this; }\n static get watchers() { return {\n \"disabled\": [\"disabledChanged\"]\n }; }\n static get style() { return IonItemSlidingStyle0; }\n}, [0, \"ion-item-sliding\", {\n \"disabled\": [4],\n \"state\": [32],\n \"getOpenAmount\": [64],\n \"getSlidingRatio\": [64],\n \"open\": [64],\n \"close\": [64],\n \"closeOpened\": [64]\n }, undefined, {\n \"disabled\": [\"disabledChanged\"]\n }]);\nconst swipeShouldReset = (isResetDirection, isMovingFast, isOnResetZone) => {\n // The logic required to know when the sliding item should close (openAmount=0)\n // depends on three booleans (isResetDirection, isMovingFast, isOnResetZone)\n // and it ended up being too complicated to be written manually without errors\n // so the truth table is attached below: (0=false, 1=true)\n // isResetDirection | isMovingFast | isOnResetZone || shouldClose\n // 0 | 0 | 0 || 0\n // 0 | 0 | 1 || 1\n // 0 | 1 | 0 || 0\n // 0 | 1 | 1 || 0\n // 1 | 0 | 0 || 0\n // 1 | 0 | 1 || 1\n // 1 | 1 | 0 || 1\n // 1 | 1 | 1 || 1\n // The resulting expression was generated by resolving the K-map (Karnaugh map):\n return (!isMovingFast && isOnResetZone) || (isResetDirection && isMovingFast);\n};\nfunction defineCustomElement$1() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"ion-item-sliding\"];\n components.forEach(tagName => { switch (tagName) {\n case \"ion-item-sliding\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, ItemSliding);\n }\n break;\n } });\n}\n\nconst IonItemSliding = ItemSliding;\nconst defineCustomElement = defineCustomElement$1;\n\nexport { IonItemSliding, defineCustomElement };\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,kBAAkB,EAAEC,WAAW,EAAEC,WAAW,EAAEC,CAAC,EAAEC,IAAI,QAAQ,+BAA+B;AACrG,SAASC,CAAC,IAAIC,qBAAqB,EAAEC,CAAC,IAAIC,qBAAqB,EAAEC,CAAC,IAAIC,mBAAmB,QAAQ,aAAa;AAC9G,SAASC,CAAC,IAAIC,SAAS,QAAQ,cAAc;AAC7C,SAASC,CAAC,IAAIC,eAAe,QAAQ,oBAAoB;AACzD,SAASC,CAAC,IAAIC,UAAU,QAAQ,mBAAmB;AAEnD,MAAMC,cAAc,GAAG,++DAA++D;AACtgE,MAAMC,oBAAoB,GAAGD,cAAc;AAE3C,MAAME,YAAY,GAAG,EAAE;AACvB,MAAMC,cAAc,GAAG,IAAI;AAC3B,IAAIC,eAAe;AACnB,MAAMC,WAAW,GAAG,aAActB,kBAAkB,CAAC,MAAMsB,WAAW,SAASrB,WAAW,CAAC;EACvFsB,WAAWA,CAAA,EAAG;IACV,KAAK,CAAC,CAAC;IACP,IAAI,CAACC,cAAc,CAAC,CAAC;IACrB,IAAI,CAACC,OAAO,GAAGvB,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;IAC9C,IAAI,CAACwB,IAAI,GAAG,IAAI;IAChB,IAAI,CAACC,UAAU,GAAG,CAAC;IACnB,IAAI,CAACC,iBAAiB,GAAG,CAAC;IAC1B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