保誠-保戶業務員媒合平台
HelenHuang
2022-06-09 9bdb95c9e34cef640534e5e5a1e2225a80442000
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('vue-class-component')) :
    typeof define === 'function' && define.amd ? define(['exports', 'vue', 'vue-class-component'], factory) :
    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.VuePropertyDecorator = {}, global.Vue, global.VueClassComponent));
}(this, (function (exports, vue, vueClassComponent) { 'use strict';
 
    function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
 
    var vue__default = /*#__PURE__*/_interopDefaultLegacy(vue);
    var vueClassComponent__default = /*#__PURE__*/_interopDefaultLegacy(vueClassComponent);
 
    var __spreadArrays = (undefined && undefined.__spreadArrays) || function () {
        for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
        for (var r = Array(s), k = 0, i = 0; i < il; i++)
            for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
                r[k] = a[j];
        return r;
    };
    // Code copied from Vue/src/shared/util.js
    var hyphenateRE = /\B([A-Z])/g;
    var hyphenate = function (str) { return str.replace(hyphenateRE, '-$1').toLowerCase(); };
    /**
     * decorator of an event-emitter function
     * @param  event The name of the event
     * @return MethodDecorator
     */
    function Emit(event) {
        return function (_target, propertyKey, descriptor) {
            var key = hyphenate(propertyKey);
            var original = descriptor.value;
            descriptor.value = function emitter() {
                var _this = this;
                var args = [];
                for (var _i = 0; _i < arguments.length; _i++) {
                    args[_i] = arguments[_i];
                }
                var emit = function (returnValue) {
                    var emitName = event || key;
                    if (returnValue === undefined) {
                        if (args.length === 0) {
                            _this.$emit(emitName);
                        }
                        else if (args.length === 1) {
                            _this.$emit(emitName, args[0]);
                        }
                        else {
                            _this.$emit.apply(_this, __spreadArrays([emitName], args));
                        }
                    }
                    else {
                        args.unshift(returnValue);
                        _this.$emit.apply(_this, __spreadArrays([emitName], args));
                    }
                };
                var returnValue = original.apply(this, args);
                if (isPromise(returnValue)) {
                    returnValue.then(emit);
                }
                else {
                    emit(returnValue);
                }
                return returnValue;
            };
        };
    }
    function isPromise(obj) {
        return obj instanceof Promise || (obj && typeof obj.then === 'function');
    }
 
    /**
     * decorator of an inject
     * @param from key
     * @return PropertyDecorator
     */
    function Inject(options) {
        return vueClassComponent.createDecorator(function (componentOptions, key) {
            if (typeof componentOptions.inject === 'undefined') {
                componentOptions.inject = {};
            }
            if (!Array.isArray(componentOptions.inject)) {
                componentOptions.inject[key] = options || key;
            }
        });
    }
 
    function needToProduceProvide(original) {
        return (typeof original !== 'function' ||
            (!original.managed && !original.managedReactive));
    }
    function produceProvide(original) {
        var provide = function () {
            var _this = this;
            var rv = typeof original === 'function' ? original.call(this) : original;
            rv = Object.create(rv || null);
            // set reactive services (propagates previous services if necessary)
            rv[reactiveInjectKey] = Object.create(this[reactiveInjectKey] || {});
            for (var i in provide.managed) {
                rv[provide.managed[i]] = this[i];
            }
            var _loop_1 = function (i) {
                rv[provide.managedReactive[i]] = this_1[i]; // Duplicates the behavior of `@Provide`
                Object.defineProperty(rv[reactiveInjectKey], provide.managedReactive[i], {
                    enumerable: true,
                    configurable: true,
                    get: function () { return _this[i]; },
                });
            };
            var this_1 = this;
            for (var i in provide.managedReactive) {
                _loop_1(i);
            }
            return rv;
        };
        provide.managed = {};
        provide.managedReactive = {};
        return provide;
    }
    /** Used for keying reactive provide/inject properties */
    var reactiveInjectKey = '__reactiveInject__';
    function inheritInjected(componentOptions) {
        // inject parent reactive services (if any)
        if (!Array.isArray(componentOptions.inject)) {
            componentOptions.inject = componentOptions.inject || {};
            componentOptions.inject[reactiveInjectKey] = {
                from: reactiveInjectKey,
                default: {},
            };
        }
    }
 
    /**
     * decorator of a reactive inject
     * @param from key
     * @return PropertyDecorator
     */
    function InjectReactive(options) {
        return vueClassComponent.createDecorator(function (componentOptions, key) {
            if (typeof componentOptions.inject === 'undefined') {
                componentOptions.inject = {};
            }
            if (!Array.isArray(componentOptions.inject)) {
                var fromKey_1 = !!options ? options.from || options : key;
                var defaultVal_1 = (!!options && options.default) || undefined;
                if (!componentOptions.computed)
                    componentOptions.computed = {};
                componentOptions.computed[key] = function () {
                    var obj = this[reactiveInjectKey];
                    return obj ? obj[fromKey_1] : defaultVal_1;
                };
                componentOptions.inject[reactiveInjectKey] = reactiveInjectKey;
            }
        });
    }
 
    /** @see {@link https://github.com/vuejs/vue-class-component/blob/master/src/reflect.ts} */
    var reflectMetadataIsSupported = typeof Reflect !== 'undefined' && typeof Reflect.getMetadata !== 'undefined';
    function applyMetadata(options, target, key) {
        if (reflectMetadataIsSupported) {
            if (!Array.isArray(options) &&
                typeof options !== 'function' &&
                !options.hasOwnProperty('type') &&
                typeof options.type === 'undefined') {
                var type = Reflect.getMetadata('design:type', target, key);
                if (type !== Object) {
                    options.type = type;
                }
            }
        }
    }
 
    /**
     * decorator of model
     * @param  event event name
     * @param options options
     * @return PropertyDecorator
     */
    function Model(event, options) {
        if (options === void 0) { options = {}; }
        return function (target, key) {
            applyMetadata(options, target, key);
            vueClassComponent.createDecorator(function (componentOptions, k) {
                (componentOptions.props || (componentOptions.props = {}))[k] = options;
                componentOptions.model = { prop: k, event: event || k };
            })(target, key);
        };
    }
 
    /**
     * decorator of synced model and prop
     * @param propName the name to interface with from outside, must be different from decorated property
     * @param  event event name
     * @param options options
     * @return PropertyDecorator
     */
    function ModelSync(propName, event, options) {
        if (options === void 0) { options = {}; }
        return function (target, key) {
            applyMetadata(options, target, key);
            vueClassComponent.createDecorator(function (componentOptions, k) {
                (componentOptions.props || (componentOptions.props = {}))[propName] = options;
                componentOptions.model = { prop: propName, event: event || k };
                (componentOptions.computed || (componentOptions.computed = {}))[k] = {
                    get: function () {
                        return this[propName];
                    },
                    set: function (value) {
                        // @ts-ignore
                        this.$emit(event, value);
                    },
                };
            })(target, key);
        };
    }
 
    /**
     * decorator of a prop
     * @param  options the options for the prop
     * @return PropertyDecorator | void
     */
    function Prop(options) {
        if (options === void 0) { options = {}; }
        return function (target, key) {
            applyMetadata(options, target, key);
            vueClassComponent.createDecorator(function (componentOptions, k) {
                (componentOptions.props || (componentOptions.props = {}))[k] = options;
            })(target, key);
        };
    }
 
    /**
     * decorator of a synced prop
     * @param propName the name to interface with from outside, must be different from decorated property
     * @param options the options for the synced prop
     * @return PropertyDecorator | void
     */
    function PropSync(propName, options) {
        if (options === void 0) { options = {}; }
        return function (target, key) {
            applyMetadata(options, target, key);
            vueClassComponent.createDecorator(function (componentOptions, k) {
                (componentOptions.props || (componentOptions.props = {}))[propName] = options;
                (componentOptions.computed || (componentOptions.computed = {}))[k] = {
                    get: function () {
                        return this[propName];
                    },
                    set: function (value) {
                        this.$emit("update:" + propName, value);
                    },
                };
            })(target, key);
        };
    }
 
    /**
     * decorator of a provide
     * @param key key
     * @return PropertyDecorator | void
     */
    function Provide(key) {
        return vueClassComponent.createDecorator(function (componentOptions, k) {
            var provide = componentOptions.provide;
            inheritInjected(componentOptions);
            if (needToProduceProvide(provide)) {
                provide = componentOptions.provide = produceProvide(provide);
            }
            provide.managed[k] = key || k;
        });
    }
 
    /**
     * decorator of a reactive provide
     * @param key key
     * @return PropertyDecorator | void
     */
    function ProvideReactive(key) {
        return vueClassComponent.createDecorator(function (componentOptions, k) {
            var provide = componentOptions.provide;
            inheritInjected(componentOptions);
            if (needToProduceProvide(provide)) {
                provide = componentOptions.provide = produceProvide(provide);
            }
            provide.managedReactive[k] = key || k;
        });
    }
 
    /**
     * decorator of a ref prop
     * @param refKey the ref key defined in template
     */
    function Ref(refKey) {
        return vueClassComponent.createDecorator(function (options, key) {
            options.computed = options.computed || {};
            options.computed[key] = {
                cache: false,
                get: function () {
                    return this.$refs[refKey || key];
                },
            };
        });
    }
 
    /**
     * decorator for capturings v-model binding to component
     * @param options the options for the prop
     */
    function VModel(options) {
        if (options === void 0) { options = {}; }
        var valueKey = 'value';
        return vueClassComponent.createDecorator(function (componentOptions, key) {
            (componentOptions.props || (componentOptions.props = {}))[valueKey] = options;
            (componentOptions.computed || (componentOptions.computed = {}))[key] = {
                get: function () {
                    return this[valueKey];
                },
                set: function (value) {
                    this.$emit('input', value);
                },
            };
        });
    }
 
    /**
     * decorator of a watch function
     * @param  path the path or the expression to observe
     * @param  WatchOption
     * @return MethodDecorator
     */
    function Watch(path, options) {
        if (options === void 0) { options = {}; }
        var _a = options.deep, deep = _a === void 0 ? false : _a, _b = options.immediate, immediate = _b === void 0 ? false : _b;
        return vueClassComponent.createDecorator(function (componentOptions, handler) {
            if (typeof componentOptions.watch !== 'object') {
                componentOptions.watch = Object.create(null);
            }
            var watch = componentOptions.watch;
            if (typeof watch[path] === 'object' && !Array.isArray(watch[path])) {
                watch[path] = [watch[path]];
            }
            else if (typeof watch[path] === 'undefined') {
                watch[path] = [];
            }
            watch[path].push({ handler: handler, deep: deep, immediate: immediate });
        });
    }
 
    Object.defineProperty(exports, 'Vue', {
        enumerable: true,
        get: function () {
            return vue__default['default'];
        }
    });
    Object.defineProperty(exports, 'Component', {
        enumerable: true,
        get: function () {
            return vueClassComponent__default['default'];
        }
    });
    Object.defineProperty(exports, 'Mixins', {
        enumerable: true,
        get: function () {
            return vueClassComponent.mixins;
        }
    });
    exports.Emit = Emit;
    exports.Inject = Inject;
    exports.InjectReactive = InjectReactive;
    exports.Model = Model;
    exports.ModelSync = ModelSync;
    exports.Prop = Prop;
    exports.PropSync = PropSync;
    exports.Provide = Provide;
    exports.ProvideReactive = ProvideReactive;
    exports.Ref = Ref;
    exports.VModel = VModel;
    exports.Watch = Watch;
 
    Object.defineProperty(exports, '__esModule', { value: true });
 
})));