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AY,KAAK,KAClB,KAAK,SACP,KAAK,MAAK,GACH,KAAK,oBAEZ,KAAK,kBACE,KAAK,MAAK,SAMrB,GAFA,KAAK,WAAU,GACf,KAAK,mBACA,KAAK,gBAAkB,KAAK,UAC/B,OAAO,KAAK,MAAK,EAGvB,EACA,MAAO,SAAS,GAId,OAHA,EAAE,MAAQ,CACR,WAAY,CAAY,IAAX,KAAK,IAAW,EAAG,MAE3B,KAAK,SAAS,EACvB,EACA,MAAO,SAAS,GAId,OAHA,EAAE,MAAQ,CACR,WAAY,CAAC,EAAc,IAAX,KAAK,IAAW,MAE3B,KAAK,SAAS,EACvB,EACA,aAAc,WACZ,OAAQ,KAAK,OACf,EACA,OAAQ,WACN,OAAO,KAAK,WAAY,CAC1B,IAIL,GAAE,KAAK","file":"/npm/ceri-side-nav@0.2.0/side-nav.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/ceri-side-nav@0.2.0/side-nav.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// Generated by CoffeeScript 1.12.7\n(function() {\n  var ceri;\n\n  ceri = require(\"ceri/lib/wrapper\");\n\n  module.exports = ceri({\n    mixins: [require(\"ceri/lib/props\"), require(\"ceri/lib/style\"), require(\"ceri/lib/animate\"), require(\"ceri/lib/directives\"), require(\"ceri/lib/open\"), require(\"ceri/lib/overlay\"), require(\"ceri/lib/#if\"), require(\"ceri/lib/draghandle\")],\n    props: {\n      opacity: {\n        type: Number,\n        \"default\": 0.5\n      },\n      right: {\n        type: Boolean,\n        cbs: [\n          \"setParentMargin\", (function(val) {\n            if (val) {\n              this.style.right = 0;\n              return this.style.left = null;\n            } else {\n              this.style.right = null;\n              return this.style.left = null;\n            }\n          })\n        ]\n      },\n      target: {\n        type: String\n      },\n      fixed: {\n        type: Boolean,\n        cbs: \"processFixed\",\n        delay: true\n      },\n      fixedScreenSize: {\n        type: Number,\n        \"default\": 992,\n        cbs: \"processFixed\"\n      },\n      zIndex: {\n        type: Number,\n        \"default\": 1000,\n        cbs: function(val, old) {\n          var s;\n          s = this.style;\n          if (s.zIndex && s.zIndex !== old) {\n            return;\n          }\n          return s.zIndex = val;\n        }\n      }\n    },\n    data: function() {\n      return {\n        isFixed: null,\n        keepOpen: true,\n        dhZIndex: null\n      };\n    },\n    overlay: {\n      zIndex: \"zIndex\",\n      active: \"dismissable\",\n      animate: \"toggleAnimate\",\n      delay: true,\n      onClose: function() {\n        this.style.zIndex = this.zIndex;\n        this.dhZIndex = this.zIndex - 1;\n        return this.hide.call(this);\n      },\n      onOpen: function(zIndex) {\n        this.style.zIndex = zIndex + 2;\n        return this.dhZIndex = zIndex + 1;\n      }\n    },\n    draghandle: {\n      __parentElement: {\n        active: function() {\n          return !this.isFixed;\n        },\n        initStyle: {\n          position: \"absolute\",\n          top: 0,\n          bottom: 0\n        },\n        style: function() {\n          return {\n            zIndex: this.dhZIndex,\n            width: this.open ? null : \"20px\",\n            left: !this.right || this.open ? 0 : null,\n            right: this.right || this.open ? 0 : null\n          };\n        },\n        onClick: function() {\n          if (this.open) {\n            return this.hide();\n          }\n        },\n        onFirstMove: function(o) {\n          var w;\n          if (!this.open) {\n            this.style.transform = \"translateX(\" + (this.fac * 100) + \"%)\";\n            this._attach();\n          }\n          o.wasOpened = this.open;\n          w = this.offsetWidth * this.fac;\n          if (this.right) {\n            o.shouldShow = function(move) {\n              return move < 0;\n            };\n            return o.shouldHide = function(move) {\n              return move > w;\n            };\n          } else {\n            o.shouldShow = function(move) {\n              return move > 0;\n            };\n            return o.shouldHide = function(move) {\n              return move < w;\n            };\n          }\n        },\n        onMove: function(delta, o) {\n          var move;\n          move = 2 * delta.x + this.offsetWidth * this.fac * !o.wasOpened;\n          if (o.shouldShow(move)) {\n            this._setOpen();\n            this.style.transform = null;\n            return o.move = 0;\n          } else if (o.shouldHide(move)) {\n            this._setClose();\n            this.style.transform = \"translateX(\" + (this.fac * 100) + \"%)\";\n            return o.move = -this.offsetWidth;\n          } else {\n            this.style.transform = \"translateX(\" + move + \"px)\";\n            return o.move = move;\n          }\n        },\n        onEnd: function(delta, o) {\n          if (this.open && o.move < 0) {\n            return this.animation = this.enter({\n              _percent: 1 - o.move / this.offsetWidth * this.fac\n            });\n          } else if (!this.open && o.move > -this.offsetWidth) {\n            return this.animation = this.leave({\n              _percent: o.move / this.offsetWidth * this.fac,\n              done: this._detach\n            });\n          }\n        }\n      }\n    },\n    events: {\n      click: {\n        \"this\": {\n          active: \"dismissable\",\n          notPrevented: true,\n          prevent: true,\n          cbs: [\"toggle\"]\n        },\n        _target: {\n          active: function() {\n            return (this._target != null) && !this.isFixed;\n          },\n          notPrevented: true,\n          prevent: true,\n          cbs: [\"toggle\"],\n          destroy: true\n        }\n      },\n      resize: {\n        window: {\n          el: window,\n          active: \"fixed\",\n          throttled: true,\n          destroy: true,\n          cbs: \"processFixed\"\n        }\n      }\n    },\n    directives: {\n      _target: {\n        type: \"#\",\n        name: \"if\",\n        activate: \"_target\",\n        value: \"isFixed\",\n        not: true\n      }\n    },\n    initStyle: {\n      position: \"fixed\",\n      height: \"100%\"\n    },\n    computedStyle: {\n      \"this\": function() {\n        return {\n          willChange: this.isFixed ? null : \"transform\"\n        };\n      }\n    },\n    computed: {\n      _target: function() {\n        if (!this.target) {\n          return null;\n        }\n        return document.querySelector(this.target);\n      },\n      fac: function() {\n        return this.right * 2 - 1;\n      },\n      dismissable: function() {\n        return this.openingOrOpen && !this.isFixed;\n      }\n    },\n    methods: {\n      makeFixed: function(fixed) {\n        if (fixed !== this.isFixed) {\n          this.isFixed = fixed;\n          return this.$emit({\n            name: \"fixed\",\n            detail: fixed\n          });\n        }\n      },\n      setParentMargin: function() {\n        var el, i, len, ref, results, width;\n        if (this.parentElement) {\n          if (this.isFixed) {\n            width = this.offsetWidth + \"px\";\n          } else {\n            width = null;\n          }\n          ref = this.parentElement.children;\n          results = [];\n          for (i = 0, len = ref.length; i < len; i++) {\n            el = ref[i];\n            if (el !== this) {\n              results.push(this.$style.set(el, {\n                marginLeft: this.right ? null : width,\n                marginRight: this.right ? width : null\n              }));\n            } else {\n              results.push(void 0);\n            }\n          }\n          return results;\n        }\n      },\n      processFixed: function() {\n        var old;\n        if (this.fixed) {\n          old = this.isFixed;\n          this.makeFixed(window.innerWidth > this.fixedScreenSize);\n          if (old !== this.isFixed) {\n            this.wasOpened = this.open;\n            if (this.isFixed) {\n              this.show(false);\n              return this.setParentMargin();\n            } else {\n              this.setParentMargin();\n              return this.hide(false);\n            }\n          }\n        } else {\n          this.makeFixed(false);\n          this.setParentMargin();\n          if (!this.openingOrOpen || !this.wasOpened) {\n            return this.hide(false);\n          }\n        }\n      },\n      enter: function(o) {\n        o.style = {\n          translateX: [this.fac * 100, 0, \"%\"]\n        };\n        return this.$animate(o);\n      },\n      leave: function(o) {\n        o.style = {\n          translateX: [0, this.fac * 100, \"%\"]\n        };\n        return this.$animate(o);\n      },\n      beforeToggle: function() {\n        return !this.isFixed;\n      },\n      onHide: function() {\n        return this.wasOpened = false;\n      }\n    }\n  });\n\n}).call(this);\n"]}