{"map":"{\"version\":3,\"file\":\"thresholdRange.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/operators/thresholdRange.ts\"],\"names\":[],\"mappings\":\"AAAA;;;;;;;;;;;;;;GAcG;;AAUH,OAAO,EACL,eAAe,GAChB,MAAM,UAAU,CAAC;AAelB,MAAM,6BAAkF,UAAa;IACnG,MAAM,CAAC,KAAM,SAAQ,UAAU;QAC7B,cAAc,CAAC,EAA4D;gBAA5D,EAAE,MAAM,EAAE,IAAI,OAA8C,EAA5C,4DAAsB;YACnD,MAAM,CAAE,IAAqD,CAAC,YAAY,iBACxE,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;oBAClC,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;oBACxC,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;oBAExC,EAAE,CAAC,CAAC,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC;wBAC1B,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC;oBAE/B,CAAC;oBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC;wBACjC,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC;oBAE/B,CAAC;oBAAC,IAAI,CAAC,CAAC;wBACN,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC;oBAChC,CAAC;gBACH,CAAC,EACD,MAAM,EAAE;oBACN,KAAK,EAAE,MAAM;oBACb,GAAG,EAAE,IAAI;iBACV,IACE,mBAAmB,EACtB,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC\"}","code":"/** @license\r\n *  Copyright 2016 - present The Material Motion Authors. All Rights Reserved.\r\n *\r\n *  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n *  use this file except in compliance with the License. You may obtain a copy\r\n *  of the License at\r\n *\r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n *  Unless required by applicable law or agreed to in writing, software\r\n *  distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n *  License for the specific language governing permissions and limitations\r\n *  under the License.\r\n */\r\nimport * as tslib_1 from \"tslib\";\r\nimport { ThresholdRegion, } from '../enums';\r\nexport function withThresholdRange(superclass) {\r\n    return class extends superclass {\r\n        thresholdRange(_a) {\r\n            var { start$, end$ } = _a, _reactiveMapOptions = tslib_1.__rest(_a, [\"start$\", \"end$\"]);\r\n            return this._reactiveMap(Object.assign({ transform: ({ upstream, start, end }) => {\r\n                    const lowerLimit = Math.min(start, end);\r\n                    const upperLimit = Math.max(start, end);\r\n                    if (upstream < lowerLimit) {\r\n                        return ThresholdRegion.BELOW;\r\n                    }\r\n                    else if (upstream > upperLimit) {\r\n                        return ThresholdRegion.ABOVE;\r\n                    }\r\n                    else {\r\n                        return ThresholdRegion.WITHIN;\r\n                    }\r\n                }, inputs: {\r\n                    start: start$,\r\n                    end: end$\r\n                } }, _reactiveMapOptions));\r\n        }\r\n    };\r\n}\r\n//# sourceMappingURL=thresholdRange.js.map","dts":{"name":"/Users/brentons/Projects/material-motion-js/packages/core/operators/thresholdRange.d.ts","text":"/** @license\r\n *  Copyright 2016 - present The Material Motion Authors. All Rights Reserved.\r\n *\r\n *  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n *  use this file except in compliance with the License. You may obtain a copy\r\n *  of the License at\r\n *\r\n *      http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n *  Unless required by applicable law or agreed to in writing, software\r\n *  distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n *  License for the specific language governing permissions and limitations\r\n *  under the License.\r\n */\r\nimport { Constructor, MaybeReactive, MotionReactiveMappable, ObservableWithMotionOperators } from '../types';\r\nimport { ThresholdRegion } from '../enums';\r\nimport { _ReactiveMapOptions } from './foundation/_reactiveMap';\r\nexport declare type ThresholdRangeArgs = _ReactiveMapOptions & MaybeReactive<{\r\n    start$: number;\r\n    end$: number;\r\n}>;\r\nexport interface MotionThresholdRangeable {\r\n    thresholdRange(kwargs: ThresholdRangeArgs): ObservableWithMotionOperators<ThresholdRegion>;\r\n}\r\nexport declare function withThresholdRange<T, S extends Constructor<MotionReactiveMappable<T>>>(superclass: S): S & Constructor<MotionThresholdRangeable>;\r\n"}}
