保誠-保戶業務員媒合平台
Tomas
2022-05-19 957a1f10a06fdbb76f1a0ba94fe44126c613fee3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
"use strict";
 
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
 
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
 
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
 
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
 
// Generated by CoffeeScript 2.5.1
var Arbitrary, DeclarationBlock, declarationClasses;
 
module.exports = DeclarationBlock = function () {
  var self;
 
  var DeclarationBlock = /*#__PURE__*/function () {
    function DeclarationBlock() {
      _classCallCheck(this, DeclarationBlock);
 
      this._declarations = {};
    }
 
    _createClass(DeclarationBlock, [{
      key: "set",
      value: function set(prop, value) {
        var key, val;
 
        if (_typeof(prop) === 'object') {
          for (key in prop) {
            val = prop[key];
            this.set(key, val);
          }
 
          return this;
        }
 
        prop = self.sanitizeProp(prop);
 
        this._getDeclarationClass(prop).setOnto(this._declarations, prop, value);
 
        return this;
      }
    }, {
      key: "_getDeclarationClass",
      value: function _getDeclarationClass(prop) {
        var cls;
 
        if (prop[0] === '_') {
          return Arbitrary;
        }
 
        if (!(cls = declarationClasses[prop])) {
          throw Error("Unknown property `".concat(prop, "`. Write it as `_").concat(prop, "` if you're defining a custom property"));
        }
 
        return cls;
      }
    }], [{
      key: "sanitizeProp",
      value: function sanitizeProp(prop) {
        return String(prop).trim();
      }
    }]);
 
    return DeclarationBlock;
  }();
 
  ;
  self = DeclarationBlock;
  return DeclarationBlock;
}.call(void 0);
 
Arbitrary = require('./declarationBlock/Arbitrary');
declarationClasses = {
  color: require('./declarationBlock/Color'),
  background: require('./declarationBlock/Background'),
  width: require('./declarationBlock/Width'),
  height: require('./declarationBlock/Height'),
  bullet: require('./declarationBlock/Bullet'),
  display: require('./declarationBlock/Display'),
  margin: require('./declarationBlock/Margin'),
  marginTop: require('./declarationBlock/MarginTop'),
  marginLeft: require('./declarationBlock/MarginLeft'),
  marginRight: require('./declarationBlock/MarginRight'),
  marginBottom: require('./declarationBlock/MarginBottom'),
  padding: require('./declarationBlock/Padding'),
  paddingTop: require('./declarationBlock/PaddingTop'),
  paddingLeft: require('./declarationBlock/PaddingLeft'),
  paddingRight: require('./declarationBlock/PaddingRight'),
  paddingBottom: require('./declarationBlock/PaddingBottom')
};