UNPKG

color-theme-generator

Version:

Generates random color themes that are based in color theory.

33 lines (32 loc) 2.15 kB
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; }; var _MaxMinObject_instances, _MaxMinObject_max, _MaxMinObject_min, _MaxMinObject_setMax, _MaxMinObject_setMin; export class MaxMinObject { constructor(max, min) { _MaxMinObject_instances.add(this); _MaxMinObject_max.set(this, void 0); _MaxMinObject_min.set(this, void 0); __classPrivateFieldGet(this, _MaxMinObject_instances, "m", _MaxMinObject_setMax).call(this, max); __classPrivateFieldGet(this, _MaxMinObject_instances, "m", _MaxMinObject_setMin).call(this, min); } get max() { return __classPrivateFieldGet(this, _MaxMinObject_max, "f"); } get min() { return __classPrivateFieldGet(this, _MaxMinObject_min, "f"); } } _MaxMinObject_max = new WeakMap(), _MaxMinObject_min = new WeakMap(), _MaxMinObject_instances = new WeakSet(), _MaxMinObject_setMax = function _MaxMinObject_setMax(value) { __classPrivateFieldSet(this, _MaxMinObject_max, value, "f"); }, _MaxMinObject_setMin = function _MaxMinObject_setMin(value) { __classPrivateFieldSet(this, _MaxMinObject_min, value, "f"); };