{"version":3,"sources":["webpack:///./node_modules/@ionic/core/dist/esm/legacy/ion-menu_4-ios.entry.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAY,SAAI;AACiB;AAC8G;AAC7F;AACY;AACL;AACS;AAClE;AACA;AACA,QAAQ,4DAAgB;AACxB;AACA,uBAAuB,qEAAkB,gBAAgB,sBAAsB;AAC/E,oBAAoB,4DAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,4DAAW;AACtC,4BAA4B,4DAAW;AACvC,0BAA0B,4DAAW;AACrC,2BAA2B,4DAAW;AACtC,6BAA6B,4DAAW;AACxC,4BAA4B,4DAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,yBAAyB,4DAAS;AAClC;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAiB;AAChC;AACA;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA,wCAAwC,oDAAM;AAC9C;AACA;AACA,qGAAqG,yBAAyB,EAAE;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,gKAA6B;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,2BAA2B,EAAE;AAClF,sDAAsD,4BAA4B,EAAE;AACpF,kDAAkD,wBAAwB,EAAE;AAC5E,mDAAmD,yBAAyB,EAAE;AAC9E,kDAAkD,wBAAwB,EAAE;AAC5E,yBAAyB;AACzB;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,iCAAiC,8CAA8C;AAC/E;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD,eAAe,+CAAiB;AAChC,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,eAAe,+CAAiB;AAChC;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,eAAe,+CAAiB;AAChC;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;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,YAAY,4DAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4DAAM;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4DAAM;AAClB;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;AACA,mCAAmC,yCAAyC,EAAE;AAC9E;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,QAAQ,4DAAM;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,4DAAM;AACd;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,4DAAM;AACd;AACA;AACA,QAAQ,4DAAM;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,4DAAC,SAAS,0CAA0C,+BAA+B,EAAE,EAAE,EAAE,4DAAC;AACtG,YAAY,4DAAC,kBAAkB,qBAAqB,8BAA8B,EAAE,mEAAmE;AACvJ;AACA;AACA;AACA,0BAA0B,QAAQ,4DAAU,OAAO,EAAE;AACrD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,yCAAyC,QAAQ,4DAAC,CAAC,oDAAI,4CAA4C;AACnG;AACA,0BAA0B,eAAe,cAAc,iBAAiB,iBAAiB,cAAc,kBAAkB,kBAAkB,8CAA8C,OAAO,QAAQ,MAAM,SAAS,aAAa,kBAAkB,eAAe,kBAAkB,cAAc,YAAY,OAAO,WAAW,MAAM,SAAS,2CAA2C,mCAAmC,oBAAoB,aAAa,kBAAkB,0BAA0B,sBAAsB,sBAAsB,8BAA8B,mBAAmB,2BAA2B,2BAA2B,qBAAqB,6BAA6B,6BAA6B,6BAA6B,eAAe,2DAA2D,WAAW,YAAY,UAAU,QAAQ,sDAAsD,8CAA8C,oCAAoC,0BAA0B,WAAW,OAAO,kCAAkC,yBAAyB,QAAQ,UAAU,aAAa,aAAa,YAAY,WAAW,0BAA0B,YAAY,eAAe,yBAAyB,UAAU,+CAA+C,gCAAgC,wBAAwB,0BAA0B,WAAW,yCAAyC,cAAc,eAAe,sCAAsC,OAAO,QAAQ,WAAW,iCAAiC,yBAAyB,kCAAkC,0BAA0B,uCAAuC,yBAAyB,uBAAuB,WAAW,sCAAsC,cAAc,EAAE,EAAE;AAC3wD;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,QAAQ,+CAAiB;AAC3D;AACA,WAAW,iDAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,EAAE;AACH;AACA,wCAAwC,QAAQ,+CAAiB;AACjE;AACA,WAAW,iDAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC,EAAE;AACH;AACA;AACA;AACA,QAAQ,4DAAgB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,QAAQ,+CAAiB;AACnE;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS,EAAE;AACX,oCAAoC,QAAQ,+CAAiB;AAC7D,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS,EAAE;AACX;AACA;AACA,eAAe,+CAAiB;AAChC,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,eAAe,+CAAiB;AAChC,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,mBAAmB,4DAAU;AAC7B,uBAAuB,oDAAM;AAC7B;AACA;AACA;AACA;AACA,gBAAgB,4DAAC,CAAC,oDAAI,GAAG,uIAAuI,wBAAwB,4DAAkB,UAAU,iIAAiI,GAAG,EAAE,4DAAC,2BAA2B,UAAU,kDAAkD,GAAG,4DAAC,eAAe,4DAAC,cAAc,0CAA0C,qBAAqB,4DAAC,uBAAuB,oBAAoB;AAC/jB;AACA;AACA,0BAA0B,eAAe,yBAAyB,6BAA6B,wBAAwB,gBAAgB,mBAAmB,mBAAmB,kBAAkB,qBAAqB,uBAAuB,oBAAoB,mBAAmB,0BAA0B,kBAAkB,eAAe,mCAAmC,oBAAoB,kBAAkB,mBAAmB,oBAAoB,uBAAuB,wBAAwB,sBAAsB,uBAAuB,mBAAmB,oBAAoB,cAAc,cAAc,eAAe,aAAa,gBAAgB,kCAAkC,iCAAiC,+BAA+B,qCAAqC,kCAAkC,mCAAmC,oBAAoB,aAAa,kBAAkB,yBAAyB,qBAAqB,oBAAoB,cAAc,sBAAsB,mBAAmB,qBAAqB,uBAAuB,WAAW,YAAY,SAAS,aAAa,6BAA6B,cAAc,eAAe,yBAAyB,sBAAsB,qBAAqB,iBAAiB,UAAU,wBAAwB,qBAAqB,gBAAgB,6FAA6F,eAAe,mBAAmB,oBAAoB,2CAA2C,0CAA0C,uCAAuC,uCAAuC,SAAS,cAAc,eAAe,aAAa,gBAAgB,eAAe,gBAAgB,cAAc,iBAAiB,oBAAoB,2BAA2B,aAAa,6BAA6B,eAAe,WAAW,oBAAoB,0BAA0B,6BAA6B,mCAAmC,0BAA0B,mCAAmC,qCAAqC,2BAA2B,iCAAiC,4BAA4B,2CAA2C,4CAA4C,MAAM,uEAAuE,oBAAoB,yCAAyC,oBAAoB,kBAAkB,YAAY,eAAe,kBAAkB,WAAW,0BAA0B,cAAc,YAAY,6CAA6C,8CAA8C,EAAE,EAAE;AACnlF;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;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;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,QAAQ,4DAAgB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAiB;AAChC;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAiB;AAChC;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAiB;AAChC;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAiB;AAChC;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAiB;AAChC;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAiB;AAChC;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAiB;AAChC;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAiB;AAChC;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA,8DAA8D,uCAAuC,EAAE;AACvG;AACA;AACA;AACA;AACA;AACA,0EAA0E,wBAAwB,EAAE;AACpG;AACA;AACA;AACA;AACA,0EAA0E,0BAA0B,EAAE;AACtG;AACA,yDAAyD,oBAAoB,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAiB;AAChC,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAiB;AAChC,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAiB;AAChC,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+CAAiB;AAChC,mBAAmB,iDAAmB;AACtC;AACA;AACA,aAAa;AACb,SAAS;AACT;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;AACA;AACA,kCAAkC,sCAAsC,EAAE;AAC1E,mCAAmC,0BAA0B,EAAE;AAC/D;AACA;AACA,eAAe,+CAAiB;AAChC;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,eAAe,+CAAiB;AAChC;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,wKAA6B;AAC1E,sDAAsD,oDAAoD,EAAE;AAC5G;AACA;AACA,6BAA6B,oDAAM;AACnC;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,uCAAuC,kBAAkB,EAAE;AAC3D;AACA;AACA,+CAA+C,gBAAgB,EAAE;AACjE;AACA;AACA,gDAAgD,yBAAyB,EAAE;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gCAAgC,EAAE;AACpE;AACA;AACA,0BAA0B,uBAAuB,gCAAgC,wBAAwB,mBAAmB,eAAe,8BAA8B,0BAA0B,oBAAoB,0BAA0B,+CAA+C,uCAAuC,mCAAmC,8CAA8C,sCAAsC,gDAAgD,6EAA6E,qEAAqE,EAAE,EAAE;AACpoB;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA,QAAQ,4DAAgB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,QAAQ,+CAAiB;AACnE;AACA,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS,EAAE;AACX,oCAAoC,QAAQ,+CAAiB;AAC7D,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS,EAAE;AACX;AACA;AACA,eAAe,+CAAiB;AAChC,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,eAAe,+CAAiB;AAChC,mBAAmB,iDAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,mBAAmB,4DAAU;AAC7B;AACA,gBAAgB,4DAAC,CAAC,oDAAI,GAAG,8EAA8E;AACvG;AACA;AACA,qBAAqB,EAAE,4DAAC;AACxB;AACA;AACA,0BAA0B,oCAAoC,aAAa,EAAE,EAAE;AAC/E;AACA;AACA,KAAK;AACL;AACA,CAAC;AACgI","file":"49.js","sourcesContent":["var _this = this;\nimport * as tslib_1 from \"tslib\";\nimport { r as registerInstance, c as getIonMode, d as createEvent, k as getConnect, h, e as getElement, H as Host } from './chunk-09ec7fc0.js';\nimport { b as config } from './chunk-1074393c.js';\nimport { c as createColorClasses } from './chunk-ba834eff.js';\nimport { GESTURE_CONTROLLER } from './index-3a9dcfed.js';\nimport { i as isEndSide, b as assert } from './chunk-c90aaa66.js';\nvar Menu = /** @class */ (function () {\n function Menu(hostRef) {\n registerInstance(this, hostRef);\n this.lastOnEnd = 0;\n this.blocker = GESTURE_CONTROLLER.createBlocker({ disableScroll: true });\n this.mode = getIonMode(this);\n this.isAnimating = false;\n this._isOpen = false;\n this.isPaneVisible = false;\n this.isEndSide = false;\n /**\n * If `true`, the menu is disabled.\n */\n this.disabled = false;\n /**\n * Which side of the view the menu should be placed.\n */\n this.side = 'start';\n /**\n * If `true`, swiping the menu is enabled.\n */\n this.swipeGesture = true;\n /**\n * The edge threshold for dragging the menu open.\n * If a drag/swipe happens over this value, the menu is not triggered.\n */\n this.maxEdgeStart = 50;\n this.ionWillOpen = createEvent(this, \"ionWillOpen\", 7);\n this.ionWillClose = createEvent(this, \"ionWillClose\", 7);\n this.ionDidOpen = createEvent(this, \"ionDidOpen\", 7);\n this.ionDidClose = createEvent(this, \"ionDidClose\", 7);\n this.ionMenuChange = createEvent(this, \"ionMenuChange\", 7);\n this.lazyMenuCtrl = getConnect(this, \"ion-menu-controller\");\n }\n Menu.prototype.typeChanged = function (type, oldType) {\n var contentEl = this.contentEl;\n if (contentEl) {\n if (oldType !== undefined) {\n contentEl.classList.remove(\"menu-content-\" + oldType);\n }\n contentEl.classList.add(\"menu-content-\" + type);\n contentEl.removeAttribute('style');\n }\n if (this.menuInnerEl) {\n // Remove effects of previous animations\n this.menuInnerEl.removeAttribute('style');\n }\n this.animation = undefined;\n };\n Menu.prototype.disabledChanged = function () {\n this.updateState();\n this.ionMenuChange.emit({\n disabled: this.disabled,\n open: this._isOpen\n });\n };\n Menu.prototype.sideChanged = function () {\n this.isEndSide = isEndSide(this.side);\n };\n Menu.prototype.swipeGestureChanged = function () {\n this.updateState();\n };\n Menu.prototype.componentWillLoad = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var menuCtrl, _a, el, parent, content, _b;\n var _this = this;\n return tslib_1.__generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n if (this.type === undefined) {\n this.type = config.get('menuType', this.mode === 'ios' ? 'reveal' : 'overlay');\n }\n _a = this;\n return [4 /*yield*/, this.lazyMenuCtrl.componentOnReady().then(function (p) { return p._getInstance(); })];\n case 1:\n menuCtrl = _a.menuCtrl = _c.sent();\n el = this.el;\n parent = el.parentNode;\n content = this.contentId !== undefined\n ? document.getElementById(this.contentId)\n : parent && parent.querySelector && parent.querySelector('[main]');\n if (!content || !content.tagName) {\n // requires content element\n console.error('Menu: must have a \"content\" element to listen for drag events on.');\n return [2 /*return*/];\n }\n this.contentEl = content;\n // add menu's content classes\n content.classList.add('menu-content');\n this.typeChanged(this.type, undefined);\n this.sideChanged();\n // register this menu with the app's menu controller\n menuCtrl._register(this);\n _b = this;\n return [4 /*yield*/, import('./index-3a9dcfed.js')];\n case 2:\n _b.gesture = (_c.sent()).createGesture({\n el: document,\n gestureName: 'menu-swipe',\n gesturePriority: 30,\n threshold: 10,\n canStart: function (ev) { return _this.canStart(ev); },\n onWillStart: function () { return _this.onWillStart(); },\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.updateState();\n return [2 /*return*/];\n }\n });\n });\n };\n Menu.prototype.componentDidLoad = function () {\n this.ionMenuChange.emit({ disabled: this.disabled, open: this._isOpen });\n };\n Menu.prototype.componentDidUnload = function () {\n this.blocker.destroy();\n this.menuCtrl._unregister(this);\n if (this.animation) {\n this.animation.destroy();\n }\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n this.animation = undefined;\n this.contentEl = this.backdropEl = this.menuInnerEl = undefined;\n };\n Menu.prototype.onSplitPaneChanged = function (ev) {\n this.isPaneVisible = ev.detail.isPane(this.el);\n this.updateState();\n };\n Menu.prototype.onBackdropClick = function (ev) {\n if (this._isOpen && this.lastOnEnd < ev.timeStamp - 100) {\n var shouldClose = (ev.composedPath)\n ? !ev.composedPath().includes(this.menuInnerEl)\n : false;\n if (shouldClose) {\n ev.preventDefault();\n ev.stopPropagation();\n this.close();\n }\n }\n };\n /**\n * Returns `true` is the menu is open.\n */\n Menu.prototype.isOpen = function () {\n return Promise.resolve(this._isOpen);\n };\n /**\n * Returns `true` is the menu is active.\n *\n * A menu is active when it can be opened or closed, meaning it's enabled\n * and it's not part of a `ion-split-pane`.\n */\n Menu.prototype.isActive = function () {\n return Promise.resolve(this._isActive());\n };\n /**\n * Opens the menu. If the menu is already open or it can't be opened,\n * it returns `false`.\n */\n Menu.prototype.open = function (animated) {\n if (animated === void 0) { animated = true; }\n return this.setOpen(true, animated);\n };\n /**\n * Closes the menu. If the menu is already closed or it can't be closed,\n * it returns `false`.\n */\n Menu.prototype.close = function (animated) {\n if (animated === void 0) { animated = true; }\n return this.setOpen(false, animated);\n };\n /**\n * Toggles the menu. If the menu is already open, it will try to close, otherwise it will try to open it.\n * If the operation can't be completed successfully, it returns `false`.\n */\n Menu.prototype.toggle = function (animated) {\n if (animated === void 0) { animated = true; }\n return this.setOpen(!this._isOpen, animated);\n };\n /**\n * Opens or closes the button.\n * If the operation can't be completed successfully, it returns `false`.\n */\n Menu.prototype.setOpen = function (shouldOpen, animated) {\n if (animated === void 0) { animated = true; }\n return this.menuCtrl._setOpen(this, shouldOpen, animated);\n };\n Menu.prototype._setOpen = function (shouldOpen, animated) {\n if (animated === void 0) { animated = true; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n // If the menu is disabled or it is currently being animated, let's do nothing\n if (!this._isActive() || this.isAnimating || shouldOpen === this._isOpen) {\n return [2 /*return*/, false];\n }\n this.beforeAnimation(shouldOpen);\n return [4 /*yield*/, this.loadAnimation()];\n case 1:\n _a.sent();\n return [4 /*yield*/, this.startAnimation(shouldOpen, animated)];\n case 2:\n _a.sent();\n this.afterAnimation(shouldOpen);\n return [2 /*return*/, true];\n }\n });\n });\n };\n Menu.prototype.loadAnimation = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var width, _a;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n width = this.menuInnerEl.offsetWidth;\n if (width === this.width && this.animation !== undefined) {\n return [2 /*return*/];\n }\n this.width = width;\n // Destroy existing animation\n if (this.animation) {\n this.animation.destroy();\n this.animation = undefined;\n }\n // Create new animation\n _a = this;\n return [4 /*yield*/, this.menuCtrl._createAnimation(this.type, this)];\n case 1:\n // Create new animation\n _a.animation = _b.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n Menu.prototype.startAnimation = function (shouldOpen, animated) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var ani;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n ani = this.animation.reverse(!shouldOpen);\n if (!animated) return [3 /*break*/, 2];\n return [4 /*yield*/, ani.playAsync()];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n ani.playSync();\n _a.label = 3;\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n Menu.prototype._isActive = function () {\n return !this.disabled && !this.isPaneVisible;\n };\n Menu.prototype.canSwipe = function () {\n return this.swipeGesture && !this.isAnimating && this._isActive();\n };\n Menu.prototype.canStart = function (detail) {\n if (!this.canSwipe()) {\n return false;\n }\n if (this._isOpen) {\n return true;\n // TODO error\n }\n else if (this.menuCtrl.getOpenSync()) {\n return false;\n }\n return checkEdgeSide(window, detail.currentX, this.isEndSide, this.maxEdgeStart);\n };\n Menu.prototype.onWillStart = function () {\n this.beforeAnimation(!this._isOpen);\n return this.loadAnimation();\n };\n Menu.prototype.onStart = function () {\n if (!this.isAnimating || !this.animation) {\n assert(false, 'isAnimating has to be true');\n return;\n }\n // the cloned animation should not use an easing curve during seek\n this.animation.reverse(this._isOpen).progressStart();\n };\n Menu.prototype.onMove = function (detail) {\n if (!this.isAnimating || !this.animation) {\n assert(false, 'isAnimating has to be true');\n return;\n }\n var delta = computeDelta(detail.deltaX, this._isOpen, this.isEndSide);\n var stepValue = delta / this.width;\n this.animation.progressStep(stepValue);\n };\n Menu.prototype.onEnd = function (detail) {\n var _this = this;\n if (!this.isAnimating || !this.animation) {\n assert(false, 'isAnimating has to be true');\n return;\n }\n var isOpen = this._isOpen;\n var isEndSide = this.isEndSide;\n var delta = computeDelta(detail.deltaX, isOpen, isEndSide);\n var width = this.width;\n var stepValue = delta / width;\n var velocity = detail.velocityX;\n var z = width / 2.0;\n var shouldCompleteRight = velocity >= 0 && (velocity > 0.2 || detail.deltaX > z);\n var shouldCompleteLeft = velocity <= 0 && (velocity < -0.2 || detail.deltaX < -z);\n var shouldComplete = isOpen\n ? isEndSide ? shouldCompleteRight : shouldCompleteLeft\n : isEndSide ? shouldCompleteLeft : shouldCompleteRight;\n var shouldOpen = !isOpen && shouldComplete;\n if (isOpen && !shouldComplete) {\n shouldOpen = true;\n }\n var missing = shouldComplete ? 1 - stepValue : stepValue;\n var missingDistance = missing * width;\n var realDur = 0;\n if (missingDistance > 5) {\n var dur = missingDistance / Math.abs(velocity);\n realDur = Math.min(dur, 300);\n }\n this.lastOnEnd = detail.timeStamp;\n this.animation\n .onFinish(function () { return _this.afterAnimation(shouldOpen); }, {\n clearExistingCallbacks: true,\n oneTimeCallback: true\n })\n .progressEnd(shouldComplete, stepValue, realDur);\n };\n Menu.prototype.beforeAnimation = function (shouldOpen) {\n assert(!this.isAnimating, '_before() should not be called while animating');\n // this places the menu into the correct location before it animates in\n // this css class doesn't actually kick off any animations\n this.el.classList.add(SHOW_MENU);\n if (this.backdropEl) {\n this.backdropEl.classList.add(SHOW_BACKDROP);\n }\n this.blocker.block();\n this.isAnimating = true;\n if (shouldOpen) {\n this.ionWillOpen.emit();\n }\n else {\n this.ionWillClose.emit();\n }\n };\n Menu.prototype.afterAnimation = function (isOpen) {\n assert(this.isAnimating, '_before() should be called while animating');\n // keep opening/closing the menu disabled for a touch more yet\n // only add listeners/css if it's enabled and isOpen\n // and only remove listeners/css if it's not open\n // emit opened/closed events\n this._isOpen = isOpen;\n this.isAnimating = false;\n if (!this._isOpen) {\n this.blocker.unblock();\n }\n if (isOpen) {\n // add css class\n if (this.contentEl) {\n this.contentEl.classList.add(MENU_CONTENT_OPEN);\n }\n // emit open event\n this.ionDidOpen.emit();\n }\n else {\n // remove css classes\n this.el.classList.remove(SHOW_MENU);\n if (this.contentEl) {\n this.contentEl.classList.remove(MENU_CONTENT_OPEN);\n }\n if (this.backdropEl) {\n this.backdropEl.classList.remove(SHOW_BACKDROP);\n }\n // emit close event\n this.ionDidClose.emit();\n }\n };\n Menu.prototype.updateState = function () {\n var isActive = this._isActive();\n if (this.gesture) {\n this.gesture.setDisabled(!isActive || !this.swipeGesture);\n }\n // Close menu immediately\n if (!isActive && this._isOpen) {\n // close if this menu is open, and should not be enabled\n this.forceClosing();\n }\n if (!this.disabled && this.menuCtrl) {\n this.menuCtrl._setActiveMenu(this);\n }\n assert(!this.isAnimating, 'can not be animating');\n };\n Menu.prototype.forceClosing = function () {\n assert(this._isOpen, 'menu cannot be closed');\n this.isAnimating = true;\n var ani = this.animation.reverse(true);\n ani.playSync();\n this.afterAnimation(false);\n };\n Menu.prototype.hostData = function () {\n var _a;\n var _b = this, isEndSide = _b.isEndSide, type = _b.type, disabled = _b.disabled, isPaneVisible = _b.isPaneVisible;\n return {\n role: 'navigation',\n class: (_a = {},\n _a[\"\" + this.mode] = true,\n _a[\"menu-type-\" + type] = true,\n _a['menu-enabled'] = !disabled,\n _a['menu-side-end'] = isEndSide,\n _a['menu-side-start'] = !isEndSide,\n _a['menu-pane-visible'] = isPaneVisible,\n _a)\n };\n };\n Menu.prototype.__stencil_render = function () {\n var _this = this;\n return [\n h(\"div\", { class: \"menu-inner\", ref: function (el) { return _this.menuInnerEl = el; } }, h(\"slot\", null)),\n h(\"ion-backdrop\", { ref: function (el) { return _this.backdropEl = el; }, class: \"menu-backdrop\", tappable: false, stopPropagation: false })\n ];\n };\n Object.defineProperty(Menu.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Menu, \"watchers\", {\n get: function () {\n return {\n \"type\": [\"typeChanged\"],\n \"disabled\": [\"disabledChanged\"],\n \"side\": [\"sideChanged\"],\n \"swipeGesture\": [\"swipeGestureChanged\"]\n };\n },\n enumerable: true,\n configurable: true\n });\n Menu.prototype.render = function () { return h(Host, this.hostData(), this.__stencil_render()); };\n Object.defineProperty(Menu, \"style\", {\n get: function () { return \":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color,#fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{left:0;right:auto;top:0;bottom:0;-webkit-transform:translate3d(-9999px,0,0);transform:translate3d(-9999px,0,0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;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);background:var(--background);contain:strict}:host-context([dir=rtl]) .menu-inner,[dir=rtl] .menu-inner{left:unset;right:unset;left:auto;right:0;-webkit-transform:translate3d(calc(-1 * -9999px),0,0);transform:translate3d(calc(-1 * -9999px),0,0)}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;right:auto;left:0}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;right:0;left:auto}ion-backdrop{display:none;opacity:.01;z-index:-1}\\@media (max-width:340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translateZ(0);transform:translateZ(0)}:host(.menu-type-overlay){z-index:80}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none!important;transform:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}:host(.menu-pane-visible) ion-backdrop{display:hidden!important}:host(.menu-type-push){z-index:80}:host(.menu-type-push) .show-backdrop{display:block}\"; },\n enumerable: true,\n configurable: true\n });\n return Menu;\n}());\nvar computeDelta = function (deltaX, isOpen, isEndSide) {\n return Math.max(0, isOpen !== isEndSide ? -deltaX : deltaX);\n};\nvar checkEdgeSide = function (win, posX, isEndSide, maxEdgeStart) {\n if (isEndSide) {\n return posX >= win.innerWidth - maxEdgeStart;\n }\n else {\n return posX <= maxEdgeStart;\n }\n};\nvar SHOW_MENU = 'show-menu';\nvar SHOW_BACKDROP = 'show-backdrop';\nvar MENU_CONTENT_OPEN = 'menu-content-open';\n// Get the menu controller element\nvar getMenuController = function (doc) {\n var menuControllerElement = doc.querySelector('ion-menu-controller');\n if (!menuControllerElement) {\n return Promise.resolve(undefined);\n }\n return menuControllerElement.componentOnReady();\n};\n// Given a menu, toggle it\nvar toggleMenu = function (menu) { return tslib_1.__awaiter(_this, void 0, void 0, function () {\n var menuCtrl, menuEl;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, getMenuController(document)];\n case 1:\n menuCtrl = _a.sent();\n if (!menuCtrl) return [3 /*break*/, 3];\n return [4 /*yield*/, menuCtrl.get(menu)];\n case 2:\n menuEl = _a.sent();\n if (menuEl) {\n menuCtrl.toggle(menu);\n }\n _a.label = 3;\n case 3: return [2 /*return*/];\n }\n });\n}); };\n// Given a menu, return whether or not the menu toggle should be visible\nvar updateVisibility = function (menu) { return tslib_1.__awaiter(_this, void 0, void 0, function () {\n var menuCtrl, menuEl, _a;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, getMenuController(document)];\n case 1:\n menuCtrl = _b.sent();\n if (!menuCtrl) return [3 /*break*/, 5];\n return [4 /*yield*/, menuCtrl.get(menu)];\n case 2:\n menuEl = _b.sent();\n _a = menuEl;\n if (!_a) return [3 /*break*/, 4];\n return [4 /*yield*/, menuEl.isActive()];\n case 3:\n _a = (_b.sent());\n _b.label = 4;\n case 4:\n if (_a) {\n return [2 /*return*/, true];\n }\n _b.label = 5;\n case 5: return [2 /*return*/, false];\n }\n });\n}); };\nvar MenuButton = /** @class */ (function () {\n function MenuButton(hostRef) {\n var _this = this;\n registerInstance(this, hostRef);\n this.visible = false;\n /**\n * If `true`, the user cannot interact with the menu button.\n */\n this.disabled = false;\n /**\n * Automatically hides the menu button when the corresponding menu is not active\n */\n this.autoHide = true;\n /**\n * The type of the button.\n */\n this.type = 'button';\n this.setVisibility = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {\n var _a;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _a = this;\n return [4 /*yield*/, updateVisibility(this.menu)];\n case 1:\n _a.visible = _b.sent();\n return [2 /*return*/];\n }\n });\n }); };\n this.onClick = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, toggleMenu(this.menu)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); };\n }\n MenuButton.prototype.componentDidLoad = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.setVisibility()];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n MenuButton.prototype.visibilityChanged = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.setVisibility()];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n MenuButton.prototype.render = function () {\n var _a;\n var _b = this, color = _b.color, disabled = _b.disabled;\n var mode = getIonMode(this);\n var menuIcon = config.get('menuIcon', 'menu');\n var hidden = this.autoHide && !this.visible;\n var attrs = {\n type: this.type\n };\n return (h(Host, { onClick: this.onClick, \"aria-disabled\": disabled ? 'true' : null, \"aria-hidden\": hidden ? 'true' : null, class: Object.assign((_a = {}, _a[mode] = true, _a), createColorClasses(color), { 'button': true, 'menu-button-hidden': hidden, 'menu-button-disabled': disabled, 'ion-activatable': true, 'ion-focusable': true }) }, h(\"button\", Object.assign({}, attrs, { disabled: this.disabled, class: \"button-native\" }), h(\"slot\", null, h(\"ion-icon\", { icon: menuIcon, mode: mode, lazy: false })), mode === 'md' && h(\"ion-ripple-effect\", { type: \"unbounded\" }))));\n };\n Object.defineProperty(MenuButton, \"style\", {\n get: function () { return \":host{--background:transparent;--color-focused:var(--color);--border-radius:initial;--padding-top:0;--padding-bottom:0;color:var(--color);text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-font-kerning:none;font-kerning:none}.button-native{border-radius:var(--border-radius);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;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;border:0;outline:none;background:var(--background);line-height:1;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}\\@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:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}ion-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;pointer-events:none}:host(.menu-button-hidden){display:none}:host(.menu-button-disabled){cursor:default;opacity:.5;pointer-events:none}\\@media (any-hover:hover){:host(:hover) .button-native{background:var(--background-hover);color:var(--color-hover)}}:host(.ion-focused) .button-native{background:var(--background-focused);color:var(--color-focused)}:host(.ion-color) .button-native{color:var(--ion-color-base)}:host-context(ion-toolbar:not(.ion-color)){color:var(--ion-toolbar-color,var(--color))}:host{--background-focused:rgba(var(--ion-color-primary-rgb,56,128,255),0.1);--border-radius:4px;--color:var(--ion-color-primary,#3880ff);--padding-start:5px;--padding-end:5px;height:32px;font-size:31px}:host(.activated){opacity:.4}\\@media (any-hover:hover){:host(:hover){opacity:.6}}:host(.ion-color.ion-focused) .button-native{background:rgba(var(--ion-color-base-rgb),.1)}\"; },\n enumerable: true,\n configurable: true\n });\n return MenuButton;\n}());\n/**\n * baseAnimation\n * Base class which is extended by the various types. Each\n * type will provide their own animations for open and close\n * and registers itself with Menu.\n */\nvar baseAnimation = function (AnimationC) {\n // https://material.io/guidelines/motion/movement.html#movement-movement-in-out-of-screen-bounds\n // https://material.io/guidelines/motion/duration-easing.html#duration-easing-natural-easing-curves\n // \"Apply the sharp curve to items temporarily leaving the screen that may return\n // from the same exit point. When they return, use the deceleration curve. On mobile,\n // this transition typically occurs over 300ms\" -- MD Motion Guide\n return Promise.resolve(new AnimationC()\n .easing('cubic-bezier(0.0, 0.0, 0.2, 1)') // Deceleration curve (Entering the screen)\n .easingReverse('cubic-bezier(0.4, 0.0, 0.6, 1)') // Sharp curve (Temporarily leaving the screen)\n .duration(300));\n};\nvar BOX_SHADOW_WIDTH = 8;\n/**\n * Menu Overlay Type\n * The menu slides over the content. The content\n * itself, which is under the menu, does not move.\n */\nvar menuOverlayAnimation = function (AnimationC, _, menu) {\n var closedX;\n var openedX;\n var width = menu.width + BOX_SHADOW_WIDTH;\n if (menu.isEndSide) {\n // right side\n closedX = width + 'px';\n openedX = '0px';\n }\n else {\n // left side\n closedX = -width + 'px';\n openedX = '0px';\n }\n var menuAnimation = new AnimationC()\n .addElement(menu.menuInnerEl)\n .fromTo('translateX', closedX, openedX);\n var backdropAnimation = new AnimationC()\n .addElement(menu.backdropEl)\n .fromTo('opacity', 0.01, 0.32);\n return baseAnimation(AnimationC).then(function (animation) {\n return animation.add(menuAnimation)\n .add(backdropAnimation);\n });\n};\n/**\n * Menu Push Type\n * The content slides over to reveal the menu underneath.\n * The menu itself also slides over to reveal its bad self.\n */\nvar menuPushAnimation = function (AnimationC, _, menu) {\n var contentOpenedX;\n var menuClosedX;\n var width = menu.width;\n if (menu.isEndSide) {\n contentOpenedX = -width + 'px';\n menuClosedX = width + 'px';\n }\n else {\n contentOpenedX = width + 'px';\n menuClosedX = -width + 'px';\n }\n var menuAnimation = new AnimationC()\n .addElement(menu.menuInnerEl)\n .fromTo('translateX', menuClosedX, '0px');\n var contentAnimation = new AnimationC()\n .addElement(menu.contentEl)\n .fromTo('translateX', '0px', contentOpenedX);\n var backdropAnimation = new AnimationC()\n .addElement(menu.backdropEl)\n .fromTo('opacity', 0.01, 0.32);\n return baseAnimation(AnimationC).then(function (animation) {\n return animation.add(menuAnimation)\n .add(backdropAnimation)\n .add(contentAnimation);\n });\n};\n/**\n * Menu Reveal Type\n * The content slides over to reveal the menu underneath.\n * The menu itself, which is under the content, does not move.\n */\nvar menuRevealAnimation = function (AnimationC, _, menu) {\n var openedX = (menu.width * (menu.isEndSide ? -1 : 1)) + 'px';\n var contentOpen = new AnimationC()\n .addElement(menu.contentEl)\n .fromTo('translateX', '0px', openedX);\n return baseAnimation(AnimationC).then(function (animation) {\n return animation.add(contentOpen);\n });\n};\nvar MenuController = /** @class */ (function () {\n function MenuController(hostRef) {\n registerInstance(this, hostRef);\n this.menus = [];\n this.menuAnimations = new Map();\n this.registerAnimation('reveal', menuRevealAnimation);\n this.registerAnimation('push', menuPushAnimation);\n this.registerAnimation('overlay', menuOverlayAnimation);\n }\n /**\n * Open the menu. If a menu is not provided then it will open the first\n * menu found. If the specified menu is `start` or `end`, then it will open\n * the enabled menu on that side. Otherwise, it will try to find the menu\n * using the menu's `id` property. If a menu is not found then it will\n * return `false`.\n *\n * @param menu The menuId or side of the menu to open.\n */\n MenuController.prototype.open = function (menu) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var menuEl;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.get(menu)];\n case 1:\n menuEl = _a.sent();\n if (menuEl) {\n return [2 /*return*/, menuEl.open()];\n }\n return [2 /*return*/, false];\n }\n });\n });\n };\n /**\n * Close the menu. If a menu is specified, it will close that menu.\n * If no menu is specified, then it will close any menu that is open.\n * If it does not find any open menus, it will return `false`.\n *\n * @param menu The menuId or side of the menu to close.\n */\n MenuController.prototype.close = function (menu) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var menuEl;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, (menu !== undefined ? this.get(menu) : this.getOpen())];\n case 1:\n menuEl = _a.sent();\n if (menuEl !== undefined) {\n return [2 /*return*/, menuEl.close()];\n }\n return [2 /*return*/, false];\n }\n });\n });\n };\n /**\n * Toggle the menu open or closed. If the menu is already open, it will try to\n * close the menu, otherwise it will try to open it. Returns `false` if\n * a menu is not found.\n *\n * @param menu The menuId or side of the menu to toggle.\n */\n MenuController.prototype.toggle = function (menu) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var menuEl;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.get(menu)];\n case 1:\n menuEl = _a.sent();\n if (menuEl) {\n return [2 /*return*/, menuEl.toggle()];\n }\n return [2 /*return*/, false];\n }\n });\n });\n };\n /**\n * Enable or disable a menu. Disabling a menu will not allow gestures\n * for that menu or any calls to open it. This is useful when there are\n * multiple menus on the same side and only one of them should be allowed\n * to open. Enabling a menu will automatically disable all other menus\n * on that side.\n *\n * @param enable If `true`, the menu should be enabled.\n * @param menu The menuId or side of the menu to enable or disable.\n */\n MenuController.prototype.enable = function (enable, menu) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var menuEl;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.get(menu)];\n case 1:\n menuEl = _a.sent();\n if (menuEl) {\n menuEl.disabled = !enable;\n }\n return [2 /*return*/, menuEl];\n }\n });\n });\n };\n /**\n * Enable or disable the ability to swipe open the menu.\n *\n * @param enable If `true`, the menu swipe gesture should be enabled.\n * @param menu The menuId or side of the menu to enable or disable the swipe gesture on.\n */\n MenuController.prototype.swipeGesture = function (enable, menu) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var menuEl;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.get(menu)];\n case 1:\n menuEl = _a.sent();\n if (menuEl) {\n menuEl.swipeGesture = enable;\n }\n return [2 /*return*/, menuEl];\n }\n });\n });\n };\n /**\n * Get whether or not the menu is open. Returns `true` if the specified\n * menu is open. If a menu is not specified, it will return `true` if\n * any menu is currently open.\n *\n * @param menu The menuId or side of the menu that is being checked.\n */\n MenuController.prototype.isOpen = function (menu) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var menuEl, menuEl;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(menu != null)) return [3 /*break*/, 2];\n return [4 /*yield*/, this.get(menu)];\n case 1:\n menuEl = _a.sent();\n return [2 /*return*/, (menuEl !== undefined && menuEl.isOpen())];\n case 2: return [4 /*yield*/, this.getOpen()];\n case 3:\n menuEl = _a.sent();\n return [2 /*return*/, menuEl !== undefined];\n }\n });\n });\n };\n /**\n * Get whether or not the menu is enabled. Returns `true` if the\n * specified menu is enabled. Returns `false` if a menu is disabled\n * or not found.\n *\n * @param menu The menuId or side of the menu that is being checked.\n */\n MenuController.prototype.isEnabled = function (menu) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var menuEl;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.get(menu)];\n case 1:\n menuEl = _a.sent();\n if (menuEl) {\n return [2 /*return*/, !menuEl.disabled];\n }\n return [2 /*return*/, false];\n }\n });\n });\n };\n /**\n * Get a menu instance. If a menu is not provided then it will return the first\n * menu found. If the specified menu is `start` or `end`, then it will return the\n * enabled menu on that side. Otherwise, it will try to find the menu using the menu's\n * `id` property. If a menu is not found then it will return `null`.\n *\n * @param menu The menuId or side of the menu.\n */\n MenuController.prototype.get = function (menu) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var menuRef, menuEl;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.waitUntilReady()];\n case 1:\n _a.sent();\n if (menu === 'start' || menu === 'end') {\n menuRef = this.find(function (m) { return m.side === menu && !m.disabled; });\n if (menuRef) {\n return [2 /*return*/, menuRef];\n }\n // didn't find a menu side that is enabled\n // so try to get the first menu side found\n return [2 /*return*/, this.find(function (m) { return m.side === menu; })];\n }\n else if (menu != null) {\n // the menuId was not left or right\n // so try to get the menu by its \"id\"\n return [2 /*return*/, this.find(function (m) { return m.menuId === menu; })];\n }\n menuEl = this.find(function (m) { return !m.disabled; });\n if (menuEl) {\n return [2 /*return*/, menuEl];\n }\n // get the first menu in the array, if one exists\n return [2 /*return*/, this.menus.length > 0 ? this.menus[0].el : undefined];\n }\n });\n });\n };\n /**\n * Get the instance of the opened menu. Returns `null` if a menu is not found.\n */\n MenuController.prototype.getOpen = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.waitUntilReady()];\n case 1:\n _a.sent();\n return [2 /*return*/, this.getOpenSync()];\n }\n });\n });\n };\n /**\n * Get all menu instances.\n */\n MenuController.prototype.getMenus = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.waitUntilReady()];\n case 1:\n _a.sent();\n return [2 /*return*/, this.getMenusSync()];\n }\n });\n });\n };\n /**\n * Get whether or not a menu is animating. Returns `true` if any\n * menu is currently animating.\n */\n MenuController.prototype.isAnimating = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.waitUntilReady()];\n case 1:\n _a.sent();\n return [2 /*return*/, this.isAnimatingSync()];\n }\n });\n });\n };\n /**\n * Registers a new animation that can be used with any `ion-menu` by\n * passing the name of the animation in its `type` property.\n *\n * @param name The name of the animation to register.\n * @param animation The animation function to register.\n */\n MenuController.prototype.registerAnimation = function (name, animation) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n this.menuAnimations.set(name, animation);\n return [2 /*return*/];\n });\n });\n };\n /**\n * @internal\n */\n MenuController.prototype._getInstance = function () {\n return Promise.resolve(this);\n };\n MenuController.prototype._register = function (menu) {\n var menus = this.menus;\n if (menus.indexOf(menu) < 0) {\n if (!menu.disabled) {\n this._setActiveMenu(menu);\n }\n menus.push(menu);\n }\n };\n MenuController.prototype._unregister = function (menu) {\n var index = this.menus.indexOf(menu);\n if (index > -1) {\n this.menus.splice(index, 1);\n }\n };\n MenuController.prototype._setActiveMenu = function (menu) {\n // if this menu should be enabled\n // then find all the other menus on this same side\n // and automatically disable other same side menus\n var side = menu.side;\n this.menus\n .filter(function (m) { return m.side === side && m !== menu; })\n .forEach(function (m) { return m.disabled = true; });\n };\n MenuController.prototype._setOpen = function (menu, shouldOpen, animated) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var openedMenu;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (this.isAnimatingSync()) {\n return [2 /*return*/, false];\n }\n if (!shouldOpen) return [3 /*break*/, 3];\n return [4 /*yield*/, this.getOpen()];\n case 1:\n openedMenu = _a.sent();\n if (!(openedMenu && menu.el !== openedMenu)) return [3 /*break*/, 3];\n return [4 /*yield*/, openedMenu.setOpen(false, false)];\n case 2:\n _a.sent();\n _a.label = 3;\n case 3: return [2 /*return*/, menu._setOpen(shouldOpen, animated)];\n }\n });\n });\n };\n MenuController.prototype._createAnimation = function (type, menuCmp) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var animationBuilder, animation;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n animationBuilder = this.menuAnimations.get(type);\n if (!animationBuilder) {\n throw new Error('animation not registered');\n }\n return [4 /*yield*/, import('./index-d9adb105.js')\n .then(function (mod) { return mod.create(animationBuilder, null, menuCmp); })];\n case 1:\n animation = _a.sent();\n if (!config.getBoolean('animated', true)) {\n animation.duration(0);\n }\n return [2 /*return*/, animation];\n }\n });\n });\n };\n MenuController.prototype.getOpenSync = function () {\n return this.find(function (m) { return m._isOpen; });\n };\n MenuController.prototype.getMenusSync = function () {\n return this.menus.map(function (menu) { return menu.el; });\n };\n MenuController.prototype.isAnimatingSync = function () {\n return this.menus.some(function (menu) { return menu.isAnimating; });\n };\n MenuController.prototype.find = function (predicate) {\n var instance = this.menus.find(predicate);\n if (instance !== undefined) {\n return instance.el;\n }\n return undefined;\n };\n MenuController.prototype.waitUntilReady = function () {\n return Promise.all(Array.from(document.querySelectorAll('ion-menu'))\n .map(function (menu) { return menu.componentOnReady(); }));\n };\n Object.defineProperty(MenuController, \"style\", {\n get: function () { return \".menu-content{-webkit-transform:translateZ(0);transform:translateZ(0)}.menu-content-open{cursor:pointer;-ms-touch-action:manipulation;touch-action:manipulation;pointer-events:none}.ios .menu-content-reveal{-webkit-box-shadow:-8px 0 42px rgba(0,0,0,.08);box-shadow:-8px 0 42px rgba(0,0,0,.08)}[dir=rtl].ios .menu-content-reveal{-webkit-box-shadow:8px 0 42px rgba(0,0,0,.08);box-shadow:8px 0 42px rgba(0,0,0,.08)}.md .menu-content-push,.md .menu-content-reveal{-webkit-box-shadow:0 2px 22px 0 rgba(0,0,0,.09),4px 0 16px 0 rgba(0,0,0,.18);box-shadow:0 2px 22px 0 rgba(0,0,0,.09),4px 0 16px 0 rgba(0,0,0,.18)}\"; },\n enumerable: true,\n configurable: true\n });\n return MenuController;\n}());\nvar MenuToggle = /** @class */ (function () {\n function MenuToggle(hostRef) {\n var _this = this;\n registerInstance(this, hostRef);\n this.visible = false;\n /**\n * Automatically hides the content when the corresponding menu is not active.\n *\n * By default, it's `true`. Change it to `false` in order to\n * keep `ion-menu-toggle` always visible regardless the state of the menu.\n */\n this.autoHide = true;\n this.setVisibility = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {\n var _a;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _a = this;\n return [4 /*yield*/, updateVisibility(this.menu)];\n case 1:\n _a.visible = _b.sent();\n return [2 /*return*/];\n }\n });\n }); };\n this.onClick = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, toggleMenu(this.menu)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n }); };\n }\n MenuToggle.prototype.componentDidLoad = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.setVisibility()];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n MenuToggle.prototype.visibilityChanged = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.setVisibility()];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n MenuToggle.prototype.render = function () {\n var _a;\n var mode = getIonMode(this);\n var hidden = this.autoHide && !this.visible;\n return (h(Host, { onClick: this.onClick, \"aria-hidden\": hidden ? 'true' : null, class: (_a = {},\n _a[mode] = true,\n _a['menu-toggle-hidden'] = hidden,\n _a) }, h(\"slot\", null)));\n };\n Object.defineProperty(MenuToggle, \"style\", {\n get: function () { return \":host(.menu-toggle-hidden){display:none}\"; },\n enumerable: true,\n configurable: true\n });\n return MenuToggle;\n}());\nexport { Menu as ion_menu, MenuButton as ion_menu_button, MenuController as ion_menu_controller, MenuToggle as ion_menu_toggle };\n"],"sourceRoot":""}