{"version":3,"sources":["webpack:///./node_modules/@ionic/core/dist/esm-es5/theme-18cbe2cc.js","webpack:///./node_modules/@ionic/core/dist/esm-es5/ion-item-option_3-ios.entry.js"],"names":["hostContext","selector","el","closest","createColorClasses","color","_a","length","undefined","getClassList","classes","array","Array","isArray","split","filter","c","map","trim","getClassMap","forEach","SCHEME","openURL","url","ev","direction","router","this","test","document","querySelector","preventDefault","push","openSlidingItem","ItemOption","hostRef","disabled","expandable","type","onClick","target","prototype","render","_b","href","TagType","mode","attrs","download","class","Object","assign","name","defineProperty","get","enumerable","configurable","ItemOptions","class_1","side","ionSwipe","fireSwipeEvent","emit","isEnd","SWIPE_MARGIN","ELASTIC_FACTOR","ItemSliding","class_2","item","openAmount","initialOpenAmount","optsWidthRightSide","optsWidthLeftSide","sides","optsDirty","state","ionDrag","disabledChanged","gesture","setDisabled","connectedCallback","_this","label","updateOptions","sent","createGesture","gestureName","gesturePriority","threshold","canStart","onStart","onMove","onEnd","disconnectedCallback","destroy","leftOptions","rightOptions","getOpenAmount","Promise","resolve","getSlidingRatio","getSlidingRatioSync","open","optionsToOpen","isStartOpen","isEndOpen","getOptions","closeOpened","requestAnimationFrame","calculateOptsWidth","width","setOpenAmount","close","options","i","option","querySelectorAll","componentOnReady","selected","tmr","clearTimeout","style","transition","optsWidth","deltaX","Math","max","min","console","warn","velocity","velocityX","restingPoint","isResetDirection","isMovingFast","abs","isOnCloseZone","swipeShouldReset","display","offsetWidth","isFinal","setTimeout","transform","amount","ratio","isOnResetZone"],"mappings":"kHAAA,wJACIA,EAAc,SAAUC,EAAUC,GAClC,OAAgC,OAAzBA,EAAGC,QAAQF,IAKlBG,EAAqB,SAAUC,GAC/B,IAAIC,EACJ,MAAyB,kBAAVD,GAAsBA,EAAME,OAAS,GAAMD,EAAK,CACvD,aAAa,GAEjBA,EAAG,aAAeD,IAAS,EAC3BC,QAAME,GAEVC,EAAe,SAAUC,GACzB,QAAgBF,IAAZE,EAAuB,CACvB,IAAIC,EAAQC,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BiH,EAAMqB,UAAY,IAVlBnH,KAAKgD,MAASN,IAAgB1C,KAAK6C,kBAAoBR,EACjD,GACA,GAWVyD,EAAMqB,UAAY,gBAAkBzE,EAAa,UACjD1C,KAAKiD,QAAQd,KAAK,CACdiF,OAAQ1E,EACR2E,MAAOrH,KAAK0E,0BAGpBlC,EAAQ1B,UAAU4D,oBAAsB,WACpC,OAAI1E,KAAK0C,WAAa,EACX1C,KAAK0C,WAAa1C,KAAK4C,mBAEzB5C,KAAK0C,WAAa,EAChB1C,KAAK0C,WAAa1C,KAAK6C,kBAGvB,GAGfL,EAAQ1B,UAAUC,OAAS,WACvB,IAAIpC,EACAwC,EAAO,eAAWnB,MACtB,OAAQ,cAAD,CAAG,OAAM,CAAEsB,OAAQ3C,EAAK,GACvBA,EAAGwC,IAAQ,EACXxC,EAAG,6BAA+C,IAAfqB,KAAKgD,MACxCrE,EAAG,mCAAoE,KAAjB,EAAbqB,KAAKgD,OAC9CrE,EAAG,qCAAyE,KAApB,GAAbqB,KAAKgD,OAChDrE,EAAG,iCAAwE,KAAvB,GAAbqB,KAAKgD,OAC5CrE,EAAG,mCAA4E,KAAzB,GAAbqB,KAAKgD,OAC9CrE,MAEZ4C,OAAOG,eAAec,EAAQ1B,UAAW,KAAM,CAC3Ca,IAAK,WAAc,OAAO,eAAW3B,OACrC4B,YAAY,EACZC,cAAc,IAElBN,OAAOG,eAAec,EAAS,WAAY,CACvCb,IAAK,WACD,MAAO,CACH,SAAY,CAAC,qBAGrBC,YAAY,EACZC,cAAc,IAElBN,OAAOG,eAAec,EAAS,QAAS,CACpCb,IAAK,WAAc,MAAO,u/CAC1BC,YAAY,EACZC,cAAc,IAEXW,EA7XqB,GA+X5BsE,EAAmB,SAAUJ,EAAkBC,EAAcW,GAe7D,OAASX,GAAgBW,GAAmBZ,GAAoBC","file":"js/chunk-4bfff9a0.44565b2d.js","sourcesContent":["import { __awaiter, __generator } from \"tslib\";\nvar hostContext = function (selector, el) {\n return el.closest(selector) !== null;\n};\n/**\n * Create the mode and color classes for the component based on the classes passed in\n */\nvar createColorClasses = function (color) {\n var _a;\n return (typeof color === 'string' && color.length > 0) ? (_a = {\n 'ion-color': true\n },\n _a[\"ion-color-\" + color] = true,\n _a) : undefined;\n};\nvar getClassList = function (classes) {\n if (classes !== undefined) {\n var array = Array.isArray(classes) ? classes : classes.split(' ');\n return array\n .filter(function (c) { return c != null; })\n .map(function (c) { return c.trim(); })\n .filter(function (c) { return c !== ''; });\n }\n return [];\n};\nvar getClassMap = function (classes) {\n var map = {};\n getClassList(classes).forEach(function (c) { return map[c] = true; });\n return map;\n};\nvar SCHEME = /^[a-z][a-z0-9+\\-.]*:/;\nvar openURL = function (url, ev, direction) { return __awaiter(void 0, void 0, void 0, function () {\n var router;\n return __generator(this, function (_a) {\n if (url != null && url[0] !== '#' && !SCHEME.test(url)) {\n router = document.querySelector('ion-router');\n if (router) {\n if (ev != null) {\n ev.preventDefault();\n }\n return [2 /*return*/, router.push(url, direction)];\n }\n }\n return [2 /*return*/, false];\n });\n}); };\nexport { createColorClasses as c, getClassMap as g, hostContext as h, openURL as o };\n","import { __awaiter, __generator } from \"tslib\";\nimport { r as registerInstance, c as getIonMode, h, H as Host, e as getElement, d as createEvent } from './core-feeeff0d.js';\nimport './config-3c7f3790.js';\nimport { i as isEndSide } from './helpers-46f4a262.js';\nimport { c as createColorClasses } from './theme-18cbe2cc.js';\nvar ItemOption = /** @class */ (function () {\n function ItemOption(hostRef) {\n registerInstance(this, hostRef);\n /**\n * If `true`, the user cannot interact with the item option.\n */\n this.disabled = false;\n /**\n * If `true`, the option will expand to take up the available width and cover any other options.\n */\n this.expandable = false;\n /**\n * The type of the button.\n */\n this.type = 'button';\n this.onClick = function (ev) {\n var el = ev.target.closest('ion-item-option');\n if (el) {\n ev.preventDefault();\n }\n };\n }\n ItemOption.prototype.render = function () {\n var _a;\n var _b = this, disabled = _b.disabled, expandable = _b.expandable, href = _b.href;\n var TagType = href === undefined ? 'button' : 'a';\n var mode = getIonMode(this);\n var attrs = (TagType === 'button')\n ? { type: this.type }\n : {\n download: this.download,\n href: this.href,\n target: this.target\n };\n return (h(Host, { onClick: this.onClick, class: Object.assign(Object.assign({}, createColorClasses(this.color)), (_a = {}, _a[mode] = true, _a['item-option-disabled'] = disabled, _a['item-option-expandable'] = expandable, _a['ion-activatable'] = true, _a)) }, h(TagType, Object.assign({}, attrs, { class: \"button-native\", disabled: disabled }), h(\"span\", { class: \"button-inner\" }, h(\"slot\", { name: \"top\" }), h(\"div\", { class: \"horizontal-wrapper\" }, h(\"slot\", { name: \"start\" }), h(\"slot\", { name: \"icon-only\" }), h(\"slot\", null), h(\"slot\", { name: \"end\" })), h(\"slot\", { name: \"bottom\" })), mode === 'md' && h(\"ion-ripple-effect\", null))));\n };\n Object.defineProperty(ItemOption.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ItemOption, \"style\", {\n get: function () { return \":host{--background:var(--ion-color-primary,#3880ff);--color:var(--ion-color-primary-contrast,#fff);background:var(--background);color:var(--color);font-family:var(--ion-font-family,inherit)}:host(.in-list.item-options-end:last-child){padding-right:calc(.7em + var(--ion-safe-area-right))}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){:host(.in-list.item-options-end:last-child){padding-right:unset;-webkit-padding-end:calc(.7em + var(--ion-safe-area-right));padding-inline-end:calc(.7em + var(--ion-safe-area-right))}}:host(.in-list.item-options-start:first-child){padding-left:calc(.7em + var(--ion-safe-area-left))}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){:host(.in-list.item-options-start:first-child){padding-left:unset;-webkit-padding-start:calc(.7em + var(--ion-safe-area-left));padding-inline-start:calc(.7em + var(--ion-safe-area-left))}}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}.button-native{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;padding-left:.7em;padding-right:.7em;padding-top:0;padding-bottom:0;display:inline-block;position:relative;width:100%;height:100%;border:0;outline:none;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-sizing:border-box;box-sizing:border-box}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:.7em;padding-inline-start:.7em;-webkit-padding-end:.7em;padding-inline-end:.7em}}.button-inner{-ms-flex-flow:column nowrap;flex-flow:column nowrap;height:100%}.button-inner,.horizontal-wrapper{display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%}.horizontal-wrapper{-ms-flex-flow:row nowrap;flex-flow:row nowrap}::slotted(*){-ms-flex-negative:0;flex-shrink:0}::slotted([slot=start]){margin-left:0;margin-right:5px;margin-top:0;margin-bottom:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){::slotted([slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:5px;margin-inline-end:5px}}::slotted([slot=end]){margin-left:5px;margin-right:0;margin-top:0;margin-bottom:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){::slotted([slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:5px;margin-inline-start:5px;-webkit-margin-end:0;margin-inline-end:0}}::slotted([slot=icon-only]){padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:10px;margin-right:10px;margin-top:0;margin-bottom:0;min-width:.9em;font-size:1.8em}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){::slotted([slot=icon-only]){margin-left:unset;margin-right:unset;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:10px;margin-inline-end:10px}}:host(.item-option-expandable){-ms-flex-negative:0;flex-shrink:0;-webkit-transition-duration:0;transition-duration:0;-webkit-transition-property:none;transition-property:none;-webkit-transition-timing-function:cubic-bezier(.65,.05,.36,1);transition-timing-function:cubic-bezier(.65,.05,.36,1)}:host(.item-option-disabled){pointer-events:none}:host(.item-option-disabled) .button-native{cursor:default;opacity:.5;pointer-events:none}:host{font-size:16px}:host(.activated){background:var(--ion-color-primary-shade,#3171e0)}:host(.ion-color.activated){background:var(--ion-color-shade)}\"; },\n enumerable: true,\n configurable: true\n });\n return ItemOption;\n}());\nvar ItemOptions = /** @class */ (function () {\n function class_1(hostRef) {\n registerInstance(this, hostRef);\n /**\n * The side the option button should be on. Possible values: `\"start\"` and `\"end\"`. If you have multiple `ion-item-options`, a side must be provided for each.\n *\n */\n this.side = 'end';\n this.ionSwipe = createEvent(this, \"ionSwipe\", 7);\n }\n /** @internal */\n class_1.prototype.fireSwipeEvent = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.ionSwipe.emit({\n side: this.side\n });\n return [2 /*return*/];\n });\n });\n };\n class_1.prototype.render = function () {\n var _a;\n var mode = getIonMode(this);\n var isEnd = isEndSide(this.side);\n return (h(Host, { class: (_a = {},\n _a[mode] = true,\n // Used internally for styling\n _a[\"item-options-\" + mode] = true,\n _a['item-options-start'] = !isEnd,\n _a['item-options-end'] = isEnd,\n _a) }));\n };\n Object.defineProperty(class_1.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_1, \"style\", {\n get: function () { return \"ion-item-options{top:0;right:0;-ms-flex-pack:end;justify-content:flex-end;display:none;position:absolute;height:100%;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1}:host-context([dir=rtl]) ion-item-options,[dir=rtl] ion-item-options{-ms-flex-pack:start;justify-content:flex-start}:host-context([dir=rtl]) ion-item-options:not(.item-options-end),[dir=rtl] ion-item-options:not(.item-options-end){right:auto;left:0;-ms-flex-pack:end;justify-content:flex-end}.item-options-start{right:auto;left:0;-ms-flex-pack:start;justify-content:flex-start}:host-context([dir=rtl]) .item-options-start,[dir=rtl] .item-options-start{-ms-flex-pack:end;justify-content:flex-end}.item-options-start ion-item-option:first-child{padding-right:var(--ion-safe-area-left)}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.item-options-start ion-item-option:first-child{padding-right:unset;-webkit-padding-end:var(--ion-safe-area-left);padding-inline-end:var(--ion-safe-area-left)}}.item-options-end ion-item-option:last-child{padding-right:var(--ion-safe-area-right)}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.item-options-end ion-item-option:last-child{padding-right:unset;-webkit-padding-end:var(--ion-safe-area-right);padding-inline-end:var(--ion-safe-area-right)}}:host-context([dir=rtl]) .item-sliding-active-slide.item-sliding-active-options-start ion-item-options:not(.item-options-end),[dir=rtl] .item-sliding-active-slide.item-sliding-active-options-start ion-item-options:not(.item-options-end){width:100%;visibility:visible}.item-sliding-active-slide ion-item-options{display:-ms-flexbox;display:flex;visibility:hidden}.item-sliding-active-slide.item-sliding-active-options-end ion-item-options:not(.item-options-start),.item-sliding-active-slide.item-sliding-active-options-start .item-options-start{width:100%;visibility:visible}.item-options-ios{border-bottom-width:0;border-bottom-style:solid;border-bottom-color:var(--ion-item-border-color,var(--ion-border-color,var(--ion-color-step-250,#c8c7cc)))}.item-options-ios.item-options-end{border-bottom-width:.55px}.list-ios-lines-none .item-options-ios{border-bottom-width:0}.list-ios-lines-full .item-options-ios,.list-ios-lines-inset .item-options-ios.item-options-end{border-bottom-width:.55px}\"; },\n enumerable: true,\n configurable: true\n });\n return class_1;\n}());\nvar SWIPE_MARGIN = 30;\nvar ELASTIC_FACTOR = 0.55;\nvar openSlidingItem;\nvar ItemSliding = /** @class */ (function () {\n function class_2(hostRef) {\n registerInstance(this, hostRef);\n this.item = null;\n this.openAmount = 0;\n this.initialOpenAmount = 0;\n this.optsWidthRightSide = 0;\n this.optsWidthLeftSide = 0;\n this.sides = 0 /* None */;\n this.optsDirty = true;\n this.state = 2 /* Disabled */;\n /**\n * If `true`, the user cannot interact with the sliding item.\n */\n this.disabled = false;\n this.ionDrag = createEvent(this, \"ionDrag\", 7);\n }\n class_2.prototype.disabledChanged = function () {\n if (this.gesture) {\n this.gesture.setDisabled(this.disabled);\n }\n };\n class_2.prototype.connectedCallback = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _a;\n var _this = this;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n this.item = this.el.querySelector('ion-item');\n return [4 /*yield*/, this.updateOptions()];\n case 1:\n _b.sent();\n _a = this;\n return [4 /*yield*/, import('./index-624eea58.js')];\n case 2:\n _a.gesture = (_b.sent()).createGesture({\n el: this.el,\n gestureName: 'item-swipe',\n gesturePriority: 100,\n threshold: 5,\n canStart: function () { return _this.canStart(); },\n onStart: function () { return _this.onStart(); },\n onMove: function (ev) { return _this.onMove(ev); },\n onEnd: function (ev) { return _this.onEnd(ev); },\n });\n this.disabledChanged();\n return [2 /*return*/];\n }\n });\n });\n };\n class_2.prototype.disconnectedCallback = function () {\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 };\n /**\n * Get the amount the item is open in pixels.\n */\n class_2.prototype.getOpenAmount = function () {\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 class_2.prototype.getSlidingRatio = function () {\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 class_2.prototype.open = function (side) {\n return __awaiter(this, void 0, void 0, function () {\n var optionsToOpen, isStartOpen, isEndOpen;\n var _this = this;\n return __generator(this, function (_a) {\n if (this.item === null) {\n return [2 /*return*/];\n }\n optionsToOpen = this.getOptions(side);\n if (!optionsToOpen) {\n return [2 /*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 isStartOpen = this.openAmount < 0;\n 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 [2 /*return*/];\n }\n if (isEndOpen && optionsToOpen === this.rightOptions) {\n return [2 /*return*/];\n }\n this.closeOpened();\n this.state = 4 /* Enabled */;\n requestAnimationFrame(function () {\n _this.calculateOptsWidth();\n var width = (side === 'end') ? _this.optsWidthRightSide : -_this.optsWidthLeftSide;\n openSlidingItem = _this.el;\n _this.setOpenAmount(width, false);\n _this.state = (side === 'end') ? 8 /* End */ : 16 /* Start */;\n });\n return [2 /*return*/];\n });\n });\n };\n /**\n * Close the sliding item. Items can also be closed from the [List](../../list/List).\n */\n class_2.prototype.close = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.setOpenAmount(0, true);\n return [2 /*return*/];\n });\n });\n };\n /**\n * Close all of the sliding items in the list. Items can also be closed from the [List](../../list/List).\n */\n class_2.prototype.closeOpened = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (openSlidingItem !== undefined) {\n openSlidingItem.close();\n openSlidingItem = undefined;\n return [2 /*return*/, true];\n }\n return [2 /*return*/, false];\n });\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 class_2.prototype.getOptions = function (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 class_2.prototype.updateOptions = function () {\n return __awaiter(this, void 0, void 0, function () {\n var options, sides, i, option, side;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n options = this.el.querySelectorAll('ion-item-options');\n sides = 0;\n // Reset left and right options in case they were removed\n this.leftOptions = this.rightOptions = undefined;\n i = 0;\n _a.label = 1;\n case 1:\n if (!(i < options.length)) return [3 /*break*/, 4];\n return [4 /*yield*/, options.item(i).componentOnReady()];\n case 2:\n option = _a.sent();\n side = isEndSide(option.side) ? 'end' : 'start';\n if (side === 'start') {\n this.leftOptions = option;\n sides |= 1 /* Start */;\n }\n else {\n this.rightOptions = option;\n sides |= 2 /* End */;\n }\n _a.label = 3;\n case 3:\n i++;\n return [3 /*break*/, 1];\n case 4:\n this.optsDirty = true;\n this.sides = sides;\n return [2 /*return*/];\n }\n });\n });\n };\n class_2.prototype.canStart = function () {\n var selected = openSlidingItem;\n if (selected && selected !== this.el) {\n this.closeOpened();\n return false;\n }\n return !!(this.rightOptions || this.leftOptions);\n };\n class_2.prototype.onStart = function () {\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 /* Enabled */;\n }\n this.initialOpenAmount = this.openAmount;\n if (this.item) {\n this.item.style.transition = 'none';\n }\n };\n class_2.prototype.onMove = function (gesture) {\n if (this.optsDirty) {\n this.calculateOptsWidth();\n }\n var openAmount = this.initialOpenAmount - gesture.deltaX;\n switch (this.sides) {\n case 2 /* End */:\n openAmount = Math.max(0, openAmount);\n break;\n case 1 /* Start */:\n openAmount = Math.min(0, openAmount);\n break;\n case 3 /* Both */: break;\n case 0 /* None */: return;\n default:\n console.warn('invalid ItemSideFlags value', this.sides);\n break;\n }\n var 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 class_2.prototype.onEnd = function (gesture) {\n var velocity = gesture.velocityX;\n var restingPoint = (this.openAmount > 0)\n ? this.optsWidthRightSide\n : -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 var isResetDirection = (this.openAmount > 0) === !(velocity < 0);\n var isMovingFast = Math.abs(velocity) > 0.3;\n var isOnCloseZone = Math.abs(this.openAmount) < Math.abs(restingPoint / 2);\n if (swipeShouldReset(isResetDirection, isMovingFast, isOnCloseZone)) {\n restingPoint = 0;\n }\n var state = this.state;\n this.setOpenAmount(restingPoint, true);\n if ((state & 32 /* SwipeEnd */) !== 0 && this.rightOptions) {\n this.rightOptions.fireSwipeEvent();\n }\n else if ((state & 64 /* SwipeStart */) !== 0 && this.leftOptions) {\n this.leftOptions.fireSwipeEvent();\n }\n };\n class_2.prototype.calculateOptsWidth = function () {\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 class_2.prototype.setOpenAmount = function (openAmount, isFinal) {\n var _this = this;\n if (this.tmr !== undefined) {\n clearTimeout(this.tmr);\n this.tmr = undefined;\n }\n if (!this.item) {\n return;\n }\n var 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))\n ? 8 /* End */ | 32 /* SwipeEnd */\n : 8 /* End */;\n }\n else if (openAmount < 0) {\n this.state = (openAmount <= (-this.optsWidthLeftSide - SWIPE_MARGIN))\n ? 16 /* Start */ | 64 /* SwipeStart */\n : 16 /* Start */;\n }\n else {\n this.tmr = setTimeout(function () {\n _this.state = 2 /* Disabled */;\n _this.tmr = undefined;\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 class_2.prototype.getSlidingRatioSync = function () {\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 class_2.prototype.render = function () {\n var _a;\n var mode = getIonMode(this);\n return (h(Host, { class: (_a = {},\n _a[mode] = true,\n _a['item-sliding-active-slide'] = (this.state !== 2 /* Disabled */),\n _a['item-sliding-active-options-end'] = (this.state & 8 /* End */) !== 0,\n _a['item-sliding-active-options-start'] = (this.state & 16 /* Start */) !== 0,\n _a['item-sliding-active-swipe-end'] = (this.state & 32 /* SwipeEnd */) !== 0,\n _a['item-sliding-active-swipe-start'] = (this.state & 64 /* SwipeStart */) !== 0,\n _a) }));\n };\n Object.defineProperty(class_2.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_2, \"watchers\", {\n get: function () {\n return {\n \"disabled\": [\"disabledChanged\"]\n };\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_2, \"style\", {\n get: function () { return \"ion-item-sliding{display:block;position:relative;width:100%;overflow:hidden}ion-item-sliding,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 .5s cubic-bezier(.36,.66,.04,1);transition:-webkit-transform .5s cubic-bezier(.36,.66,.04,1);transition:transform .5s cubic-bezier(.36,.66,.04,1);transition:transform .5s cubic-bezier(.36,.66,.04,1),-webkit-transform .5s cubic-bezier(.36,.66,.04,1);opacity:1;z-index:2;pointer-events:none;will-change:transform}.item-sliding-active-swipe-end .item-options-end .item-option-expandable{padding-left:100%;-ms-flex-order:1;order:1;-webkit-transition-duration:.6s;transition-duration:.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,[dir=rtl] .item-sliding-active-swipe-end .item-options-end .item-option-expandable{-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:.6s;transition-duration:.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,[dir=rtl] .item-sliding-active-swipe-start .item-options-start .item-option-expandable{-ms-flex-order:1;order:1}\"; },\n enumerable: true,\n configurable: true\n });\n return class_2;\n}());\nvar swipeShouldReset = function (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};\nexport { ItemOption as ion_item_option, ItemOptions as ion_item_options, ItemSliding as ion_item_sliding };\n"],"sourceRoot":""}