@memberstack/dom 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -1
- package/lib/methods/dom/methods.d.ts +1 -2
- package/lib/methods/dom/methods.js +84 -44
- package/lib/methods/index.d.ts +1 -1
- package/lib/methods/index.js +1 -4
- package/lib/uis/main-dom.d.ts +12 -0
- package/lib/uis/main-dom.js +4655 -0
- package/package.json +4 -4
|
@@ -0,0 +1,4655 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
54
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
55
|
+
if (!m) return o;
|
|
56
|
+
var i = m.call(o), r, ar = [], e;
|
|
57
|
+
try {
|
|
58
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
59
|
+
}
|
|
60
|
+
catch (error) { e = { error: error }; }
|
|
61
|
+
finally {
|
|
62
|
+
try {
|
|
63
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
64
|
+
}
|
|
65
|
+
finally { if (e) throw e.error; }
|
|
66
|
+
}
|
|
67
|
+
return ar;
|
|
68
|
+
};
|
|
69
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
70
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
71
|
+
if (ar || !(i in from)) {
|
|
72
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
73
|
+
ar[i] = from[i];
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
77
|
+
};
|
|
78
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
79
|
+
exports.default = void 0;
|
|
80
|
+
function noop() { }
|
|
81
|
+
function run(fn) {
|
|
82
|
+
return fn();
|
|
83
|
+
}
|
|
84
|
+
function blank_object() {
|
|
85
|
+
return Object.create(null);
|
|
86
|
+
}
|
|
87
|
+
function run_all(fns) {
|
|
88
|
+
fns.forEach(run);
|
|
89
|
+
}
|
|
90
|
+
function is_function(thing) {
|
|
91
|
+
return typeof thing === 'function';
|
|
92
|
+
}
|
|
93
|
+
function safe_not_equal(a, b) {
|
|
94
|
+
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
|
|
95
|
+
}
|
|
96
|
+
function is_empty(obj) {
|
|
97
|
+
return Object.keys(obj).length === 0;
|
|
98
|
+
}
|
|
99
|
+
function append(target, node) {
|
|
100
|
+
target.appendChild(node);
|
|
101
|
+
}
|
|
102
|
+
function append_styles(target, style_sheet_id, styles) {
|
|
103
|
+
var append_styles_to = get_root_for_style(target);
|
|
104
|
+
if (!append_styles_to.getElementById(style_sheet_id)) {
|
|
105
|
+
var style = element('style');
|
|
106
|
+
style.id = style_sheet_id;
|
|
107
|
+
style.textContent = styles;
|
|
108
|
+
append_stylesheet(append_styles_to, style);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function get_root_for_style(node) {
|
|
112
|
+
if (!node)
|
|
113
|
+
return document;
|
|
114
|
+
var root = node.getRootNode ? node.getRootNode() : node.ownerDocument;
|
|
115
|
+
if (root && root.host) {
|
|
116
|
+
return root;
|
|
117
|
+
}
|
|
118
|
+
return node.ownerDocument;
|
|
119
|
+
}
|
|
120
|
+
function append_stylesheet(node, style) {
|
|
121
|
+
append(node.head || node, style);
|
|
122
|
+
}
|
|
123
|
+
function insert(target, node, anchor) {
|
|
124
|
+
target.insertBefore(node, anchor || null);
|
|
125
|
+
}
|
|
126
|
+
function detach(node) {
|
|
127
|
+
node.parentNode.removeChild(node);
|
|
128
|
+
}
|
|
129
|
+
function destroy_each(iterations, detaching) {
|
|
130
|
+
for (var i = 0; i < iterations.length; i += 1) {
|
|
131
|
+
if (iterations[i])
|
|
132
|
+
iterations[i].d(detaching);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function element(name) {
|
|
136
|
+
return document.createElement(name);
|
|
137
|
+
}
|
|
138
|
+
function svg_element(name) {
|
|
139
|
+
return document.createElementNS('http://www.w3.org/2000/svg', name);
|
|
140
|
+
}
|
|
141
|
+
function text(data) {
|
|
142
|
+
return document.createTextNode(data);
|
|
143
|
+
}
|
|
144
|
+
function space() {
|
|
145
|
+
return text(' ');
|
|
146
|
+
}
|
|
147
|
+
function listen(node, event, handler, options) {
|
|
148
|
+
node.addEventListener(event, handler, options);
|
|
149
|
+
return function () { return node.removeEventListener(event, handler, options); };
|
|
150
|
+
}
|
|
151
|
+
function prevent_default(fn) {
|
|
152
|
+
return function (event) {
|
|
153
|
+
event.preventDefault();
|
|
154
|
+
// @ts-ignore
|
|
155
|
+
return fn.call(this, event);
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function stop_propagation(fn) {
|
|
159
|
+
return function (event) {
|
|
160
|
+
event.stopPropagation();
|
|
161
|
+
// @ts-ignore
|
|
162
|
+
return fn.call(this, event);
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function attr(node, attribute, value) {
|
|
166
|
+
if (value == null)
|
|
167
|
+
node.removeAttribute(attribute);
|
|
168
|
+
else if (node.getAttribute(attribute) !== value)
|
|
169
|
+
node.setAttribute(attribute, value);
|
|
170
|
+
}
|
|
171
|
+
function children(element) {
|
|
172
|
+
return Array.from(element.childNodes);
|
|
173
|
+
}
|
|
174
|
+
function set_data(text, data) {
|
|
175
|
+
data = '' + data;
|
|
176
|
+
if (text.wholeText !== data)
|
|
177
|
+
text.data = data;
|
|
178
|
+
}
|
|
179
|
+
function set_style(node, key, value, important) {
|
|
180
|
+
if (value === null) {
|
|
181
|
+
node.style.removeProperty(key);
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
node.style.setProperty(key, value, important ? 'important' : '');
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
function toggle_class(element, name, toggle) {
|
|
188
|
+
element.classList[toggle ? 'add' : 'remove'](name);
|
|
189
|
+
}
|
|
190
|
+
var current_component;
|
|
191
|
+
function set_current_component(component) {
|
|
192
|
+
current_component = component;
|
|
193
|
+
}
|
|
194
|
+
function get_current_component() {
|
|
195
|
+
if (!current_component)
|
|
196
|
+
throw new Error('Function called outside component initialization');
|
|
197
|
+
return current_component;
|
|
198
|
+
}
|
|
199
|
+
function onMount(fn) {
|
|
200
|
+
get_current_component().$$.on_mount.push(fn);
|
|
201
|
+
}
|
|
202
|
+
var dirty_components = [];
|
|
203
|
+
var binding_callbacks = [];
|
|
204
|
+
var render_callbacks = [];
|
|
205
|
+
var flush_callbacks = [];
|
|
206
|
+
var resolved_promise = Promise.resolve();
|
|
207
|
+
var update_scheduled = false;
|
|
208
|
+
function schedule_update() {
|
|
209
|
+
if (!update_scheduled) {
|
|
210
|
+
update_scheduled = true;
|
|
211
|
+
resolved_promise.then(flush);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
function add_render_callback(fn) {
|
|
215
|
+
render_callbacks.push(fn);
|
|
216
|
+
}
|
|
217
|
+
function add_flush_callback(fn) {
|
|
218
|
+
flush_callbacks.push(fn);
|
|
219
|
+
}
|
|
220
|
+
// flush() calls callbacks in this order:
|
|
221
|
+
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
222
|
+
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
223
|
+
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
|
|
224
|
+
// for afterUpdates called during the initial onMount, which are called in
|
|
225
|
+
// reverse order: children before parents.
|
|
226
|
+
// Since callbacks might update component values, which could trigger another
|
|
227
|
+
// call to flush(), the following steps guard against this:
|
|
228
|
+
// 1. During beforeUpdate, any updated components will be added to the
|
|
229
|
+
// dirty_components array and will cause a reentrant call to flush(). Because
|
|
230
|
+
// the flush index is kept outside the function, the reentrant call will pick
|
|
231
|
+
// up where the earlier call left off and go through all dirty components. The
|
|
232
|
+
// current_component value is saved and restored so that the reentrant call will
|
|
233
|
+
// not interfere with the "parent" flush() call.
|
|
234
|
+
// 2. bind:this callbacks cannot trigger new flush() calls.
|
|
235
|
+
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
|
236
|
+
// callback called a second time; the seen_callbacks set, outside the flush()
|
|
237
|
+
// function, guarantees this behavior.
|
|
238
|
+
var seen_callbacks = new Set();
|
|
239
|
+
var flushidx = 0; // Do *not* move this inside the flush() function
|
|
240
|
+
function flush() {
|
|
241
|
+
var saved_component = current_component;
|
|
242
|
+
do {
|
|
243
|
+
// first, call beforeUpdate functions
|
|
244
|
+
// and update components
|
|
245
|
+
while (flushidx < dirty_components.length) {
|
|
246
|
+
var component = dirty_components[flushidx];
|
|
247
|
+
flushidx++;
|
|
248
|
+
set_current_component(component);
|
|
249
|
+
update(component.$$);
|
|
250
|
+
}
|
|
251
|
+
set_current_component(null);
|
|
252
|
+
dirty_components.length = 0;
|
|
253
|
+
flushidx = 0;
|
|
254
|
+
while (binding_callbacks.length)
|
|
255
|
+
binding_callbacks.pop()();
|
|
256
|
+
// then, once components are updated, call
|
|
257
|
+
// afterUpdate functions. This may cause
|
|
258
|
+
// subsequent updates...
|
|
259
|
+
for (var i = 0; i < render_callbacks.length; i += 1) {
|
|
260
|
+
var callback = render_callbacks[i];
|
|
261
|
+
if (!seen_callbacks.has(callback)) {
|
|
262
|
+
// ...so guard against infinite loops
|
|
263
|
+
seen_callbacks.add(callback);
|
|
264
|
+
callback();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
render_callbacks.length = 0;
|
|
268
|
+
} while (dirty_components.length);
|
|
269
|
+
while (flush_callbacks.length) {
|
|
270
|
+
flush_callbacks.pop()();
|
|
271
|
+
}
|
|
272
|
+
update_scheduled = false;
|
|
273
|
+
seen_callbacks.clear();
|
|
274
|
+
set_current_component(saved_component);
|
|
275
|
+
}
|
|
276
|
+
function update($$) {
|
|
277
|
+
if ($$.fragment !== null) {
|
|
278
|
+
$$.update();
|
|
279
|
+
run_all($$.before_update);
|
|
280
|
+
var dirty = $$.dirty;
|
|
281
|
+
$$.dirty = [-1];
|
|
282
|
+
$$.fragment && $$.fragment.p($$.ctx, dirty);
|
|
283
|
+
$$.after_update.forEach(add_render_callback);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
var outroing = new Set();
|
|
287
|
+
var outros;
|
|
288
|
+
function group_outros() {
|
|
289
|
+
outros = {
|
|
290
|
+
r: 0,
|
|
291
|
+
c: [],
|
|
292
|
+
p: outros // parent group
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
function check_outros() {
|
|
296
|
+
if (!outros.r) {
|
|
297
|
+
run_all(outros.c);
|
|
298
|
+
}
|
|
299
|
+
outros = outros.p;
|
|
300
|
+
}
|
|
301
|
+
function transition_in(block, local) {
|
|
302
|
+
if (block && block.i) {
|
|
303
|
+
outroing.delete(block);
|
|
304
|
+
block.i(local);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
function transition_out(block, local, detach, callback) {
|
|
308
|
+
if (block && block.o) {
|
|
309
|
+
if (outroing.has(block))
|
|
310
|
+
return;
|
|
311
|
+
outroing.add(block);
|
|
312
|
+
outros.c.push(function () {
|
|
313
|
+
outroing.delete(block);
|
|
314
|
+
if (callback) {
|
|
315
|
+
if (detach)
|
|
316
|
+
block.d(1);
|
|
317
|
+
callback();
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
block.o(local);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
function bind(component, name, callback) {
|
|
324
|
+
var index = component.$$.props[name];
|
|
325
|
+
if (index !== undefined) {
|
|
326
|
+
component.$$.bound[index] = callback;
|
|
327
|
+
callback(component.$$.ctx[index]);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
function create_component(block) {
|
|
331
|
+
block && block.c();
|
|
332
|
+
}
|
|
333
|
+
function mount_component(component, target, anchor, customElement) {
|
|
334
|
+
var _a = component.$$, fragment = _a.fragment, on_mount = _a.on_mount, on_destroy = _a.on_destroy, after_update = _a.after_update;
|
|
335
|
+
fragment && fragment.m(target, anchor);
|
|
336
|
+
if (!customElement) {
|
|
337
|
+
// onMount happens before the initial afterUpdate
|
|
338
|
+
add_render_callback(function () {
|
|
339
|
+
var new_on_destroy = on_mount.map(run).filter(is_function);
|
|
340
|
+
if (on_destroy) {
|
|
341
|
+
on_destroy.push.apply(on_destroy, __spreadArray([], __read(new_on_destroy), false));
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
// Edge case - component was destroyed immediately,
|
|
345
|
+
// most likely as a result of a binding initialising
|
|
346
|
+
run_all(new_on_destroy);
|
|
347
|
+
}
|
|
348
|
+
component.$$.on_mount = [];
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
after_update.forEach(add_render_callback);
|
|
352
|
+
}
|
|
353
|
+
function destroy_component(component, detaching) {
|
|
354
|
+
var $$ = component.$$;
|
|
355
|
+
if ($$.fragment !== null) {
|
|
356
|
+
run_all($$.on_destroy);
|
|
357
|
+
$$.fragment && $$.fragment.d(detaching);
|
|
358
|
+
// TODO null out other refs, including component.$$ (but need to
|
|
359
|
+
// preserve final state?)
|
|
360
|
+
$$.on_destroy = $$.fragment = null;
|
|
361
|
+
$$.ctx = [];
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
function make_dirty(component, i) {
|
|
365
|
+
if (component.$$.dirty[0] === -1) {
|
|
366
|
+
dirty_components.push(component);
|
|
367
|
+
schedule_update();
|
|
368
|
+
component.$$.dirty.fill(0);
|
|
369
|
+
}
|
|
370
|
+
component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
|
|
371
|
+
}
|
|
372
|
+
function init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty) {
|
|
373
|
+
if (dirty === void 0) { dirty = [-1]; }
|
|
374
|
+
var parent_component = current_component;
|
|
375
|
+
set_current_component(component);
|
|
376
|
+
var $$ = component.$$ = {
|
|
377
|
+
fragment: null,
|
|
378
|
+
ctx: null,
|
|
379
|
+
// state
|
|
380
|
+
props: props,
|
|
381
|
+
update: noop,
|
|
382
|
+
not_equal: not_equal,
|
|
383
|
+
bound: blank_object(),
|
|
384
|
+
// lifecycle
|
|
385
|
+
on_mount: [],
|
|
386
|
+
on_destroy: [],
|
|
387
|
+
on_disconnect: [],
|
|
388
|
+
before_update: [],
|
|
389
|
+
after_update: [],
|
|
390
|
+
context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
|
|
391
|
+
// everything else
|
|
392
|
+
callbacks: blank_object(),
|
|
393
|
+
dirty: dirty,
|
|
394
|
+
skip_bound: false,
|
|
395
|
+
root: options.target || parent_component.$$.root
|
|
396
|
+
};
|
|
397
|
+
append_styles && append_styles($$.root);
|
|
398
|
+
var ready = false;
|
|
399
|
+
$$.ctx = instance
|
|
400
|
+
? instance(component, options.props || {}, function (i, ret) {
|
|
401
|
+
var rest = [];
|
|
402
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
403
|
+
rest[_i - 2] = arguments[_i];
|
|
404
|
+
}
|
|
405
|
+
var value = rest.length ? rest[0] : ret;
|
|
406
|
+
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
|
|
407
|
+
if (!$$.skip_bound && $$.bound[i])
|
|
408
|
+
$$.bound[i](value);
|
|
409
|
+
if (ready)
|
|
410
|
+
make_dirty(component, i);
|
|
411
|
+
}
|
|
412
|
+
return ret;
|
|
413
|
+
})
|
|
414
|
+
: [];
|
|
415
|
+
$$.update();
|
|
416
|
+
ready = true;
|
|
417
|
+
run_all($$.before_update);
|
|
418
|
+
// `false` as a special case of no DOM component
|
|
419
|
+
$$.fragment = create_fragment ? create_fragment($$.ctx) : false;
|
|
420
|
+
if (options.target) {
|
|
421
|
+
if (options.hydrate) {
|
|
422
|
+
var nodes = children(options.target);
|
|
423
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
424
|
+
$$.fragment && $$.fragment.l(nodes);
|
|
425
|
+
nodes.forEach(detach);
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
429
|
+
$$.fragment && $$.fragment.c();
|
|
430
|
+
}
|
|
431
|
+
if (options.intro)
|
|
432
|
+
transition_in(component.$$.fragment);
|
|
433
|
+
mount_component(component, options.target, options.anchor, options.customElement);
|
|
434
|
+
flush();
|
|
435
|
+
}
|
|
436
|
+
set_current_component(parent_component);
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Base class for Svelte components. Used when dev=false.
|
|
440
|
+
*/
|
|
441
|
+
var SvelteComponent = /** @class */ (function () {
|
|
442
|
+
function SvelteComponent() {
|
|
443
|
+
}
|
|
444
|
+
SvelteComponent.prototype.$destroy = function () {
|
|
445
|
+
destroy_component(this, 1);
|
|
446
|
+
this.$destroy = noop;
|
|
447
|
+
};
|
|
448
|
+
SvelteComponent.prototype.$on = function (type, callback) {
|
|
449
|
+
var callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
|
|
450
|
+
callbacks.push(callback);
|
|
451
|
+
return function () {
|
|
452
|
+
var index = callbacks.indexOf(callback);
|
|
453
|
+
if (index !== -1)
|
|
454
|
+
callbacks.splice(index, 1);
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
SvelteComponent.prototype.$set = function ($$props) {
|
|
458
|
+
if (this.$$set && !is_empty($$props)) {
|
|
459
|
+
this.$$.skip_bound = true;
|
|
460
|
+
this.$$set($$props);
|
|
461
|
+
this.$$.skip_bound = false;
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
return SvelteComponent;
|
|
465
|
+
}());
|
|
466
|
+
/* src/icons/LoadingIcon.svelte generated by Svelte v3.48.0 */
|
|
467
|
+
function create_fragment$v(ctx) {
|
|
468
|
+
var svg;
|
|
469
|
+
var path;
|
|
470
|
+
var animateTransform;
|
|
471
|
+
return {
|
|
472
|
+
c: function () {
|
|
473
|
+
svg = svg_element("svg");
|
|
474
|
+
path = svg_element("path");
|
|
475
|
+
animateTransform = svg_element("animateTransform");
|
|
476
|
+
attr(animateTransform, "attributeName", "transform");
|
|
477
|
+
attr(animateTransform, "attributeType", "xml");
|
|
478
|
+
attr(animateTransform, "dur", "0.6s");
|
|
479
|
+
attr(animateTransform, "from", "0 25 25");
|
|
480
|
+
attr(animateTransform, "repeatCount", "indefinite");
|
|
481
|
+
attr(animateTransform, "to", "360 25 25");
|
|
482
|
+
attr(animateTransform, "type", "rotate");
|
|
483
|
+
attr(path, "fill", "currentColor");
|
|
484
|
+
attr(path, "d", "m43.935 25.145c0-10.318-8.364-18.683-18.683-18.683-10.318 0-18.683 8.365-18.683 18.683h4.068c0-8.071 6.543-14.615 14.615-14.615s14.615 6.543 14.615 14.615h4.068z");
|
|
485
|
+
attr(svg, "width", "40px");
|
|
486
|
+
attr(svg, "height", "40px");
|
|
487
|
+
attr(svg, "enable-background", "new 0 0 50 50");
|
|
488
|
+
set_style(svg, "z-index", "1000000");
|
|
489
|
+
attr(svg, "version", "1.1");
|
|
490
|
+
attr(svg, "viewBox", "0 0 50 50");
|
|
491
|
+
attr(svg, "xml:space", "preserve");
|
|
492
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
493
|
+
},
|
|
494
|
+
m: function (target, anchor) {
|
|
495
|
+
insert(target, svg, anchor);
|
|
496
|
+
append(svg, path);
|
|
497
|
+
append(path, animateTransform);
|
|
498
|
+
},
|
|
499
|
+
p: noop,
|
|
500
|
+
i: noop,
|
|
501
|
+
o: noop,
|
|
502
|
+
d: function (detaching) {
|
|
503
|
+
if (detaching)
|
|
504
|
+
detach(svg);
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
var LoadingIcon = /** @class */ (function (_super) {
|
|
509
|
+
__extends(LoadingIcon, _super);
|
|
510
|
+
function LoadingIcon(options) {
|
|
511
|
+
var _this = _super.call(this) || this;
|
|
512
|
+
init(_this, options, null, create_fragment$v, safe_not_equal, {});
|
|
513
|
+
return _this;
|
|
514
|
+
}
|
|
515
|
+
return LoadingIcon;
|
|
516
|
+
}(SvelteComponent));
|
|
517
|
+
/* src/components/Loader.svelte generated by Svelte v3.48.0 */
|
|
518
|
+
function create_fragment$u(ctx) {
|
|
519
|
+
var div;
|
|
520
|
+
var loadingicon;
|
|
521
|
+
var current;
|
|
522
|
+
loadingicon = new LoadingIcon({});
|
|
523
|
+
return {
|
|
524
|
+
c: function () {
|
|
525
|
+
div = element("div");
|
|
526
|
+
create_component(loadingicon.$$.fragment);
|
|
527
|
+
attr(div, "class", "ms__loader");
|
|
528
|
+
},
|
|
529
|
+
m: function (target, anchor) {
|
|
530
|
+
insert(target, div, anchor);
|
|
531
|
+
mount_component(loadingicon, div, null);
|
|
532
|
+
current = true;
|
|
533
|
+
},
|
|
534
|
+
p: noop,
|
|
535
|
+
i: function (local) {
|
|
536
|
+
if (current)
|
|
537
|
+
return;
|
|
538
|
+
transition_in(loadingicon.$$.fragment, local);
|
|
539
|
+
current = true;
|
|
540
|
+
},
|
|
541
|
+
o: function (local) {
|
|
542
|
+
transition_out(loadingicon.$$.fragment, local);
|
|
543
|
+
current = false;
|
|
544
|
+
},
|
|
545
|
+
d: function (detaching) {
|
|
546
|
+
if (detaching)
|
|
547
|
+
detach(div);
|
|
548
|
+
destroy_component(loadingicon);
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
var Loader = /** @class */ (function (_super) {
|
|
553
|
+
__extends(Loader, _super);
|
|
554
|
+
function Loader(options) {
|
|
555
|
+
var _this = _super.call(this) || this;
|
|
556
|
+
init(_this, options, null, create_fragment$u, safe_not_equal, {});
|
|
557
|
+
return _this;
|
|
558
|
+
}
|
|
559
|
+
return Loader;
|
|
560
|
+
}(SvelteComponent));
|
|
561
|
+
/* src/icons/CloseIcon.svelte generated by Svelte v3.48.0 */
|
|
562
|
+
function create_fragment$t(ctx) {
|
|
563
|
+
var svg;
|
|
564
|
+
var path;
|
|
565
|
+
return {
|
|
566
|
+
c: function () {
|
|
567
|
+
svg = svg_element("svg");
|
|
568
|
+
path = svg_element("path");
|
|
569
|
+
attr(path, "fill", "currentColor");
|
|
570
|
+
attr(path, "shape-rendering", "geometricPrecision");
|
|
571
|
+
attr(path, "d", "M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z");
|
|
572
|
+
attr(svg, "fill", "none");
|
|
573
|
+
set_style(svg, "width", "100%");
|
|
574
|
+
attr(svg, "viewBox", "0 0 14 14");
|
|
575
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
576
|
+
},
|
|
577
|
+
m: function (target, anchor) {
|
|
578
|
+
insert(target, svg, anchor);
|
|
579
|
+
append(svg, path);
|
|
580
|
+
},
|
|
581
|
+
p: noop,
|
|
582
|
+
i: noop,
|
|
583
|
+
o: noop,
|
|
584
|
+
d: function (detaching) {
|
|
585
|
+
if (detaching)
|
|
586
|
+
detach(svg);
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
var CloseIcon = /** @class */ (function (_super) {
|
|
591
|
+
__extends(CloseIcon, _super);
|
|
592
|
+
function CloseIcon(options) {
|
|
593
|
+
var _this = _super.call(this) || this;
|
|
594
|
+
init(_this, options, null, create_fragment$t, safe_not_equal, {});
|
|
595
|
+
return _this;
|
|
596
|
+
}
|
|
597
|
+
return CloseIcon;
|
|
598
|
+
}(SvelteComponent));
|
|
599
|
+
/* src/components/CloseButton.svelte generated by Svelte v3.48.0 */
|
|
600
|
+
function create_fragment$s(ctx) {
|
|
601
|
+
var div;
|
|
602
|
+
var button;
|
|
603
|
+
var closeicon;
|
|
604
|
+
var current;
|
|
605
|
+
var mounted;
|
|
606
|
+
var dispose;
|
|
607
|
+
closeicon = new CloseIcon({});
|
|
608
|
+
return {
|
|
609
|
+
c: function () {
|
|
610
|
+
div = element("div");
|
|
611
|
+
button = element("button");
|
|
612
|
+
create_component(closeicon.$$.fragment);
|
|
613
|
+
attr(div, "class", "ms-modal__close");
|
|
614
|
+
},
|
|
615
|
+
m: function (target, anchor) {
|
|
616
|
+
insert(target, div, anchor);
|
|
617
|
+
append(div, button);
|
|
618
|
+
mount_component(closeicon, button, null);
|
|
619
|
+
current = true;
|
|
620
|
+
if (!mounted) {
|
|
621
|
+
dispose = listen(button, "click", function () {
|
|
622
|
+
if (is_function(/*closeModal*/ ctx[0])) /*closeModal*/
|
|
623
|
+
ctx[0].apply(this, arguments);
|
|
624
|
+
});
|
|
625
|
+
mounted = true;
|
|
626
|
+
}
|
|
627
|
+
},
|
|
628
|
+
p: function (new_ctx, _a) {
|
|
629
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
630
|
+
ctx = new_ctx;
|
|
631
|
+
},
|
|
632
|
+
i: function (local) {
|
|
633
|
+
if (current)
|
|
634
|
+
return;
|
|
635
|
+
transition_in(closeicon.$$.fragment, local);
|
|
636
|
+
current = true;
|
|
637
|
+
},
|
|
638
|
+
o: function (local) {
|
|
639
|
+
transition_out(closeicon.$$.fragment, local);
|
|
640
|
+
current = false;
|
|
641
|
+
},
|
|
642
|
+
d: function (detaching) {
|
|
643
|
+
if (detaching)
|
|
644
|
+
detach(div);
|
|
645
|
+
destroy_component(closeicon);
|
|
646
|
+
mounted = false;
|
|
647
|
+
dispose();
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
function instance$d($$self, $$props, $$invalidate) {
|
|
652
|
+
var closeModal = $$props.closeModal;
|
|
653
|
+
$$self.$$set = function ($$props) {
|
|
654
|
+
if ('closeModal' in $$props)
|
|
655
|
+
$$invalidate(0, closeModal = $$props.closeModal);
|
|
656
|
+
};
|
|
657
|
+
return [closeModal];
|
|
658
|
+
}
|
|
659
|
+
var CloseButton = /** @class */ (function (_super) {
|
|
660
|
+
__extends(CloseButton, _super);
|
|
661
|
+
function CloseButton(options) {
|
|
662
|
+
var _this = _super.call(this) || this;
|
|
663
|
+
init(_this, options, instance$d, create_fragment$s, safe_not_equal, { closeModal: 0 });
|
|
664
|
+
return _this;
|
|
665
|
+
}
|
|
666
|
+
return CloseButton;
|
|
667
|
+
}(SvelteComponent));
|
|
668
|
+
/* src/icons/MemberstackIcon.svelte generated by Svelte v3.48.0 */
|
|
669
|
+
function create_fragment$r(ctx) {
|
|
670
|
+
var svg;
|
|
671
|
+
var path0;
|
|
672
|
+
var path1;
|
|
673
|
+
var path2;
|
|
674
|
+
var path3;
|
|
675
|
+
var path4;
|
|
676
|
+
var path5;
|
|
677
|
+
return {
|
|
678
|
+
c: function () {
|
|
679
|
+
svg = svg_element("svg");
|
|
680
|
+
path0 = svg_element("path");
|
|
681
|
+
path1 = svg_element("path");
|
|
682
|
+
path2 = svg_element("path");
|
|
683
|
+
path3 = svg_element("path");
|
|
684
|
+
path4 = svg_element("path");
|
|
685
|
+
path5 = svg_element("path");
|
|
686
|
+
attr(path0, "d", "m259.078 190.582 16.797-39.611c7.315-20.421 26.982-34.665 49.897-34.665 13.187 0 25.344 4.817 34.6 12.818l32.818 73.118c9.656 21.709-.097 47.144-21.786 56.809-21.688 9.666-47.097-.098-56.753-21.807l-38.573-86.723-17 40.088v-.027Z");
|
|
687
|
+
attr(path0, "fill", "#2AA8FF");
|
|
688
|
+
attr(path1, "d", "m111.31 169.64 8.002-18.679c-7.22-20.585-26.82-35.345-49.866-35.345-12.678 0-24.901 4.865-34.007 12.314 6.6063-2.796 14.34-3.575 21.988-3.575 26.999 0 49.435 19.445 53.884 45.285z");
|
|
689
|
+
attr(path2, "d", "m111.31 169.64-28.66 68.126c-9.2762 21.875-34.511 32.081-56.365 22.795-21.853-9.285-32.049-34.545-22.773-56.42l31.925-76.211c6.7448-2.988 14.142-3.575 21.988-3.575 27.086 0 49.537 19.321 53.884 45.285z");
|
|
690
|
+
attr(path2, "fill", "#393939");
|
|
691
|
+
attr(path3, "d", "m197.57 115.46-39.756-89.506c-7.148-16.07-22.929-25.595-39.443-25.537-16.786-0.058576-32.766 9.7896-39.736 26.227l-43.199 101.28c9.1064-7.45 21.329-12.314 34.008-12.314 23.046 0 42.646 14.76 49.866 35.345l0.093 0.337c5.784 1.658 11.893 2.546 18.21 2.546 26.578 0 49.487-15.722 59.958-38.382z");
|
|
692
|
+
attr(path3, "fill", "#017ACE");
|
|
693
|
+
attr(path4, "d", "m197.57 115.46c-10.071 21.796-31.651 37.172-56.934 38.314-1.052 0.05-2.11 0.075-3.175 0.075-6.316 0-12.425-0.888-18.21-2.546l38.425 86.387c3.996 8.986 10.692 15.926 18.706 20.288 1.908 1.196 3.935 2.257 6.073 3.165 21.853 9.286 47.088-0.92 56.364-22.795l37.055-87.381c7.315-20.421 26.982-34.665 49.896-34.665 13.188 0 25.345 4.817 34.601 12.818l-45.994-103.17c-7.148-16.07-22.929-25.595-39.442-25.537-16.786-0.058576-32.767 9.7896-39.737 26.227l-37.628 88.816z");
|
|
694
|
+
attr(path4, "fill", "#AEDEFF");
|
|
695
|
+
attr(path5, "d", "m325.77 116.31c-22.915 0-42.379 13.795-49.694 34.216l8.919 20.052c5.873-25.763 28.931-44.989 56.481-44.989 6.67 0 12.931 1.465 18.894 3.539-9.256-8-21.413-12.818-34.6-12.818z");
|
|
696
|
+
attr(path5, "fill", "#2D91D7");
|
|
697
|
+
set_style(svg, "width", "100%");
|
|
698
|
+
attr(svg, "viewBox", "0 0 397 265");
|
|
699
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
700
|
+
},
|
|
701
|
+
m: function (target, anchor) {
|
|
702
|
+
insert(target, svg, anchor);
|
|
703
|
+
append(svg, path0);
|
|
704
|
+
append(svg, path1);
|
|
705
|
+
append(svg, path2);
|
|
706
|
+
append(svg, path3);
|
|
707
|
+
append(svg, path4);
|
|
708
|
+
append(svg, path5);
|
|
709
|
+
},
|
|
710
|
+
p: noop,
|
|
711
|
+
i: noop,
|
|
712
|
+
o: noop,
|
|
713
|
+
d: function (detaching) {
|
|
714
|
+
if (detaching)
|
|
715
|
+
detach(svg);
|
|
716
|
+
}
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
var MemberstackIcon = /** @class */ (function (_super) {
|
|
720
|
+
__extends(MemberstackIcon, _super);
|
|
721
|
+
function MemberstackIcon(options) {
|
|
722
|
+
var _this = _super.call(this) || this;
|
|
723
|
+
init(_this, options, null, create_fragment$r, safe_not_equal, {});
|
|
724
|
+
return _this;
|
|
725
|
+
}
|
|
726
|
+
return MemberstackIcon;
|
|
727
|
+
}(SvelteComponent));
|
|
728
|
+
/* src/components/FigureElement.svelte generated by Svelte v3.48.0 */
|
|
729
|
+
function create_fragment$q(ctx) {
|
|
730
|
+
var figure;
|
|
731
|
+
var memberstackicon;
|
|
732
|
+
var current;
|
|
733
|
+
memberstackicon = new MemberstackIcon({});
|
|
734
|
+
return {
|
|
735
|
+
c: function () {
|
|
736
|
+
figure = element("figure");
|
|
737
|
+
create_component(memberstackicon.$$.fragment);
|
|
738
|
+
attr(figure, "class", "ms-modal__figure");
|
|
739
|
+
},
|
|
740
|
+
m: function (target, anchor) {
|
|
741
|
+
insert(target, figure, anchor);
|
|
742
|
+
mount_component(memberstackicon, figure, null);
|
|
743
|
+
current = true;
|
|
744
|
+
},
|
|
745
|
+
p: noop,
|
|
746
|
+
i: function (local) {
|
|
747
|
+
if (current)
|
|
748
|
+
return;
|
|
749
|
+
transition_in(memberstackicon.$$.fragment, local);
|
|
750
|
+
current = true;
|
|
751
|
+
},
|
|
752
|
+
o: function (local) {
|
|
753
|
+
transition_out(memberstackicon.$$.fragment, local);
|
|
754
|
+
current = false;
|
|
755
|
+
},
|
|
756
|
+
d: function (detaching) {
|
|
757
|
+
if (detaching)
|
|
758
|
+
detach(figure);
|
|
759
|
+
destroy_component(memberstackicon);
|
|
760
|
+
}
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
var FigureElement = /** @class */ (function (_super) {
|
|
764
|
+
__extends(FigureElement, _super);
|
|
765
|
+
function FigureElement(options) {
|
|
766
|
+
var _this = _super.call(this) || this;
|
|
767
|
+
init(_this, options, null, create_fragment$q, safe_not_equal, {});
|
|
768
|
+
return _this;
|
|
769
|
+
}
|
|
770
|
+
return FigureElement;
|
|
771
|
+
}(SvelteComponent));
|
|
772
|
+
/* src/components/SubmitButton.svelte generated by Svelte v3.48.0 */
|
|
773
|
+
function create_else_block$1(ctx) {
|
|
774
|
+
var button;
|
|
775
|
+
var loadingicon;
|
|
776
|
+
var current;
|
|
777
|
+
loadingicon = new LoadingIcon({});
|
|
778
|
+
return {
|
|
779
|
+
c: function () {
|
|
780
|
+
button = element("button");
|
|
781
|
+
create_component(loadingicon.$$.fragment);
|
|
782
|
+
attr(button, "class", "ms-form__button");
|
|
783
|
+
attr(button, "type", "submit");
|
|
784
|
+
button.disabled = true;
|
|
785
|
+
},
|
|
786
|
+
m: function (target, anchor) {
|
|
787
|
+
insert(target, button, anchor);
|
|
788
|
+
mount_component(loadingicon, button, null);
|
|
789
|
+
current = true;
|
|
790
|
+
},
|
|
791
|
+
p: noop,
|
|
792
|
+
i: function (local) {
|
|
793
|
+
if (current)
|
|
794
|
+
return;
|
|
795
|
+
transition_in(loadingicon.$$.fragment, local);
|
|
796
|
+
current = true;
|
|
797
|
+
},
|
|
798
|
+
o: function (local) {
|
|
799
|
+
transition_out(loadingicon.$$.fragment, local);
|
|
800
|
+
current = false;
|
|
801
|
+
},
|
|
802
|
+
d: function (detaching) {
|
|
803
|
+
if (detaching)
|
|
804
|
+
detach(button);
|
|
805
|
+
destroy_component(loadingicon);
|
|
806
|
+
}
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
// (8:2) {#if !isLoading}
|
|
810
|
+
function create_if_block$6(ctx) {
|
|
811
|
+
var button;
|
|
812
|
+
var t;
|
|
813
|
+
return {
|
|
814
|
+
c: function () {
|
|
815
|
+
button = element("button");
|
|
816
|
+
t = text(/*buttonText*/ ctx[0]);
|
|
817
|
+
attr(button, "class", "ms-form__button");
|
|
818
|
+
attr(button, "type", "submit");
|
|
819
|
+
},
|
|
820
|
+
m: function (target, anchor) {
|
|
821
|
+
insert(target, button, anchor);
|
|
822
|
+
append(button, t);
|
|
823
|
+
},
|
|
824
|
+
p: function (ctx, dirty) {
|
|
825
|
+
if (dirty & /*buttonText*/ 1)
|
|
826
|
+
set_data(t, /*buttonText*/ ctx[0]);
|
|
827
|
+
},
|
|
828
|
+
i: noop,
|
|
829
|
+
o: noop,
|
|
830
|
+
d: function (detaching) {
|
|
831
|
+
if (detaching)
|
|
832
|
+
detach(button);
|
|
833
|
+
}
|
|
834
|
+
};
|
|
835
|
+
}
|
|
836
|
+
function create_fragment$p(ctx) {
|
|
837
|
+
var div;
|
|
838
|
+
var current_block_type_index;
|
|
839
|
+
var if_block;
|
|
840
|
+
var current;
|
|
841
|
+
var if_block_creators = [create_if_block$6, create_else_block$1];
|
|
842
|
+
var if_blocks = [];
|
|
843
|
+
function select_block_type(ctx, dirty) {
|
|
844
|
+
if (!ctx[1])
|
|
845
|
+
return 0;
|
|
846
|
+
return 1;
|
|
847
|
+
}
|
|
848
|
+
current_block_type_index = select_block_type(ctx);
|
|
849
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
850
|
+
return {
|
|
851
|
+
c: function () {
|
|
852
|
+
div = element("div");
|
|
853
|
+
if_block.c();
|
|
854
|
+
},
|
|
855
|
+
m: function (target, anchor) {
|
|
856
|
+
insert(target, div, anchor);
|
|
857
|
+
if_blocks[current_block_type_index].m(div, null);
|
|
858
|
+
current = true;
|
|
859
|
+
},
|
|
860
|
+
p: function (ctx, _a) {
|
|
861
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
862
|
+
var previous_block_index = current_block_type_index;
|
|
863
|
+
current_block_type_index = select_block_type(ctx);
|
|
864
|
+
if (current_block_type_index === previous_block_index) {
|
|
865
|
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
|
866
|
+
}
|
|
867
|
+
else {
|
|
868
|
+
group_outros();
|
|
869
|
+
transition_out(if_blocks[previous_block_index], 1, 1, function () {
|
|
870
|
+
if_blocks[previous_block_index] = null;
|
|
871
|
+
});
|
|
872
|
+
check_outros();
|
|
873
|
+
if_block = if_blocks[current_block_type_index];
|
|
874
|
+
if (!if_block) {
|
|
875
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
876
|
+
if_block.c();
|
|
877
|
+
}
|
|
878
|
+
else {
|
|
879
|
+
if_block.p(ctx, dirty);
|
|
880
|
+
}
|
|
881
|
+
transition_in(if_block, 1);
|
|
882
|
+
if_block.m(div, null);
|
|
883
|
+
}
|
|
884
|
+
},
|
|
885
|
+
i: function (local) {
|
|
886
|
+
if (current)
|
|
887
|
+
return;
|
|
888
|
+
transition_in(if_block);
|
|
889
|
+
current = true;
|
|
890
|
+
},
|
|
891
|
+
o: function (local) {
|
|
892
|
+
transition_out(if_block);
|
|
893
|
+
current = false;
|
|
894
|
+
},
|
|
895
|
+
d: function (detaching) {
|
|
896
|
+
if (detaching)
|
|
897
|
+
detach(div);
|
|
898
|
+
if_blocks[current_block_type_index].d();
|
|
899
|
+
}
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
function instance$c($$self, $$props, $$invalidate) {
|
|
903
|
+
var _a = $$props.buttonText, buttonText = _a === void 0 ? "Submit" : _a;
|
|
904
|
+
var _b = $$props.isLoading, isLoading = _b === void 0 ? false : _b;
|
|
905
|
+
$$self.$$set = function ($$props) {
|
|
906
|
+
if ('buttonText' in $$props)
|
|
907
|
+
$$invalidate(0, buttonText = $$props.buttonText);
|
|
908
|
+
if ('isLoading' in $$props)
|
|
909
|
+
$$invalidate(1, isLoading = $$props.isLoading);
|
|
910
|
+
};
|
|
911
|
+
return [buttonText, isLoading];
|
|
912
|
+
}
|
|
913
|
+
var SubmitButton = /** @class */ (function (_super) {
|
|
914
|
+
__extends(SubmitButton, _super);
|
|
915
|
+
function SubmitButton(options) {
|
|
916
|
+
var _this = _super.call(this) || this;
|
|
917
|
+
init(_this, options, instance$c, create_fragment$p, safe_not_equal, { buttonText: 0, isLoading: 1 });
|
|
918
|
+
return _this;
|
|
919
|
+
}
|
|
920
|
+
return SubmitButton;
|
|
921
|
+
}(SvelteComponent));
|
|
922
|
+
/* src/icons/ErrorIcon.svelte generated by Svelte v3.48.0 */
|
|
923
|
+
function create_fragment$o(ctx) {
|
|
924
|
+
var svg;
|
|
925
|
+
var path;
|
|
926
|
+
return {
|
|
927
|
+
c: function () {
|
|
928
|
+
svg = svg_element("svg");
|
|
929
|
+
path = svg_element("path");
|
|
930
|
+
attr(path, "fill", "currentColor");
|
|
931
|
+
attr(path, "d", "m10 0c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm1 15h-2v-2h2v2zm0-4h-2v-6h2v6z");
|
|
932
|
+
attr(svg, "fill", "none");
|
|
933
|
+
attr(svg, "viewBox", "0 0 20 20");
|
|
934
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
935
|
+
},
|
|
936
|
+
m: function (target, anchor) {
|
|
937
|
+
insert(target, svg, anchor);
|
|
938
|
+
append(svg, path);
|
|
939
|
+
},
|
|
940
|
+
p: noop,
|
|
941
|
+
i: noop,
|
|
942
|
+
o: noop,
|
|
943
|
+
d: function (detaching) {
|
|
944
|
+
if (detaching)
|
|
945
|
+
detach(svg);
|
|
946
|
+
}
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
var ErrorIcon = /** @class */ (function (_super) {
|
|
950
|
+
__extends(ErrorIcon, _super);
|
|
951
|
+
function ErrorIcon(options) {
|
|
952
|
+
var _this = _super.call(this) || this;
|
|
953
|
+
init(_this, options, null, create_fragment$o, safe_not_equal, {});
|
|
954
|
+
return _this;
|
|
955
|
+
}
|
|
956
|
+
return ErrorIcon;
|
|
957
|
+
}(SvelteComponent));
|
|
958
|
+
/* src/components/EmailInput.svelte generated by Svelte v3.48.0 */
|
|
959
|
+
function create_if_block$5(ctx) {
|
|
960
|
+
var div;
|
|
961
|
+
var erroricon;
|
|
962
|
+
var t0;
|
|
963
|
+
var t1;
|
|
964
|
+
var current;
|
|
965
|
+
erroricon = new ErrorIcon({});
|
|
966
|
+
return {
|
|
967
|
+
c: function () {
|
|
968
|
+
div = element("div");
|
|
969
|
+
create_component(erroricon.$$.fragment);
|
|
970
|
+
t0 = space();
|
|
971
|
+
t1 = text(errorMessage$1);
|
|
972
|
+
attr(div, "class", "ms-form__error");
|
|
973
|
+
},
|
|
974
|
+
m: function (target, anchor) {
|
|
975
|
+
insert(target, div, anchor);
|
|
976
|
+
mount_component(erroricon, div, null);
|
|
977
|
+
append(div, t0);
|
|
978
|
+
append(div, t1);
|
|
979
|
+
current = true;
|
|
980
|
+
},
|
|
981
|
+
p: noop,
|
|
982
|
+
i: function (local) {
|
|
983
|
+
if (current)
|
|
984
|
+
return;
|
|
985
|
+
transition_in(erroricon.$$.fragment, local);
|
|
986
|
+
current = true;
|
|
987
|
+
},
|
|
988
|
+
o: function (local) {
|
|
989
|
+
transition_out(erroricon.$$.fragment, local);
|
|
990
|
+
current = false;
|
|
991
|
+
},
|
|
992
|
+
d: function (detaching) {
|
|
993
|
+
if (detaching)
|
|
994
|
+
detach(div);
|
|
995
|
+
destroy_component(erroricon);
|
|
996
|
+
}
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
function create_fragment$n(ctx) {
|
|
1000
|
+
var div;
|
|
1001
|
+
var label;
|
|
1002
|
+
var t1;
|
|
1003
|
+
var input;
|
|
1004
|
+
var t2;
|
|
1005
|
+
var current;
|
|
1006
|
+
var mounted;
|
|
1007
|
+
var dispose;
|
|
1008
|
+
var if_block = /*inputError*/ ctx[0] && create_if_block$5();
|
|
1009
|
+
return {
|
|
1010
|
+
c: function () {
|
|
1011
|
+
div = element("div");
|
|
1012
|
+
label = element("label");
|
|
1013
|
+
label.textContent = "" + emailLabel;
|
|
1014
|
+
t1 = space();
|
|
1015
|
+
input = element("input");
|
|
1016
|
+
t2 = space();
|
|
1017
|
+
if (if_block)
|
|
1018
|
+
if_block.c();
|
|
1019
|
+
attr(label, "class", "ms-form__label");
|
|
1020
|
+
attr(label, "for", "eml");
|
|
1021
|
+
attr(input, "class", "ms-form__input");
|
|
1022
|
+
attr(input, "type", "email");
|
|
1023
|
+
attr(input, "placeholder", "example@domain.com");
|
|
1024
|
+
attr(input, "name", "eml");
|
|
1025
|
+
input.required = true;
|
|
1026
|
+
attr(div, "class", "ms-form__group");
|
|
1027
|
+
},
|
|
1028
|
+
m: function (target, anchor) {
|
|
1029
|
+
insert(target, div, anchor);
|
|
1030
|
+
append(div, label);
|
|
1031
|
+
append(div, t1);
|
|
1032
|
+
append(div, input);
|
|
1033
|
+
append(div, t2);
|
|
1034
|
+
if (if_block)
|
|
1035
|
+
if_block.m(div, null);
|
|
1036
|
+
current = true;
|
|
1037
|
+
if (!mounted) {
|
|
1038
|
+
dispose = listen(input, "blur", /*validateField*/ ctx[1]);
|
|
1039
|
+
mounted = true;
|
|
1040
|
+
}
|
|
1041
|
+
},
|
|
1042
|
+
p: function (ctx, _a) {
|
|
1043
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
1044
|
+
if ( /*inputError*/ctx[0]) {
|
|
1045
|
+
if (if_block) {
|
|
1046
|
+
if_block.p(ctx, dirty);
|
|
1047
|
+
if (dirty & /*inputError*/ 1) {
|
|
1048
|
+
transition_in(if_block, 1);
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
else {
|
|
1052
|
+
if_block = create_if_block$5();
|
|
1053
|
+
if_block.c();
|
|
1054
|
+
transition_in(if_block, 1);
|
|
1055
|
+
if_block.m(div, null);
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
else if (if_block) {
|
|
1059
|
+
group_outros();
|
|
1060
|
+
transition_out(if_block, 1, 1, function () {
|
|
1061
|
+
if_block = null;
|
|
1062
|
+
});
|
|
1063
|
+
check_outros();
|
|
1064
|
+
}
|
|
1065
|
+
},
|
|
1066
|
+
i: function (local) {
|
|
1067
|
+
if (current)
|
|
1068
|
+
return;
|
|
1069
|
+
transition_in(if_block);
|
|
1070
|
+
current = true;
|
|
1071
|
+
},
|
|
1072
|
+
o: function (local) {
|
|
1073
|
+
transition_out(if_block);
|
|
1074
|
+
current = false;
|
|
1075
|
+
},
|
|
1076
|
+
d: function (detaching) {
|
|
1077
|
+
if (detaching)
|
|
1078
|
+
detach(div);
|
|
1079
|
+
if (if_block)
|
|
1080
|
+
if_block.d();
|
|
1081
|
+
mounted = false;
|
|
1082
|
+
dispose();
|
|
1083
|
+
}
|
|
1084
|
+
};
|
|
1085
|
+
}
|
|
1086
|
+
var emailLabel = "Email Address";
|
|
1087
|
+
var errorMessage$1 = "Please enter a valid email address";
|
|
1088
|
+
function instance$b($$self, $$props, $$invalidate) {
|
|
1089
|
+
var _a = $$props.emailInputValid, emailInputValid = _a === void 0 ? false : _a;
|
|
1090
|
+
var inputError = false;
|
|
1091
|
+
var validateField = function (e) {
|
|
1092
|
+
var emailInput = e.target;
|
|
1093
|
+
var hasValidEmail = (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/).test(emailInput.value)
|
|
1094
|
+
? true
|
|
1095
|
+
: false;
|
|
1096
|
+
if (!hasValidEmail && e.target.value.length > 0) {
|
|
1097
|
+
$$invalidate(2, emailInputValid = false);
|
|
1098
|
+
$$invalidate(0, inputError = true);
|
|
1099
|
+
}
|
|
1100
|
+
else {
|
|
1101
|
+
$$invalidate(2, emailInputValid = true);
|
|
1102
|
+
$$invalidate(0, inputError = false);
|
|
1103
|
+
}
|
|
1104
|
+
};
|
|
1105
|
+
$$self.$$set = function ($$props) {
|
|
1106
|
+
if ('emailInputValid' in $$props)
|
|
1107
|
+
$$invalidate(2, emailInputValid = $$props.emailInputValid);
|
|
1108
|
+
};
|
|
1109
|
+
return [inputError, validateField, emailInputValid];
|
|
1110
|
+
}
|
|
1111
|
+
var EmailInput = /** @class */ (function (_super) {
|
|
1112
|
+
__extends(EmailInput, _super);
|
|
1113
|
+
function EmailInput(options) {
|
|
1114
|
+
var _this = _super.call(this) || this;
|
|
1115
|
+
init(_this, options, instance$b, create_fragment$n, safe_not_equal, { emailInputValid: 2 });
|
|
1116
|
+
return _this;
|
|
1117
|
+
}
|
|
1118
|
+
return EmailInput;
|
|
1119
|
+
}(SvelteComponent));
|
|
1120
|
+
/* src/icons/EyeIcon.svelte generated by Svelte v3.48.0 */
|
|
1121
|
+
function create_fragment$m(ctx) {
|
|
1122
|
+
var svg;
|
|
1123
|
+
var path;
|
|
1124
|
+
return {
|
|
1125
|
+
c: function () {
|
|
1126
|
+
svg = svg_element("svg");
|
|
1127
|
+
path = svg_element("path");
|
|
1128
|
+
attr(path, "fill", "currentColor");
|
|
1129
|
+
attr(path, "d", "m11 0.5c-5 0-9.27 3.11-11 7.5 1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zm0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z");
|
|
1130
|
+
attr(svg, "class", "ms-form__eye");
|
|
1131
|
+
attr(svg, "fill", "none");
|
|
1132
|
+
attr(svg, "viewBox", "0 0 22 16");
|
|
1133
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
1134
|
+
},
|
|
1135
|
+
m: function (target, anchor) {
|
|
1136
|
+
insert(target, svg, anchor);
|
|
1137
|
+
append(svg, path);
|
|
1138
|
+
},
|
|
1139
|
+
p: noop,
|
|
1140
|
+
i: noop,
|
|
1141
|
+
o: noop,
|
|
1142
|
+
d: function (detaching) {
|
|
1143
|
+
if (detaching)
|
|
1144
|
+
detach(svg);
|
|
1145
|
+
}
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1148
|
+
var EyeIcon = /** @class */ (function (_super) {
|
|
1149
|
+
__extends(EyeIcon, _super);
|
|
1150
|
+
function EyeIcon(options) {
|
|
1151
|
+
var _this = _super.call(this) || this;
|
|
1152
|
+
init(_this, options, null, create_fragment$m, safe_not_equal, {});
|
|
1153
|
+
return _this;
|
|
1154
|
+
}
|
|
1155
|
+
return EyeIcon;
|
|
1156
|
+
}(SvelteComponent));
|
|
1157
|
+
/* src/icons/EyeSlashIcon.svelte generated by Svelte v3.48.0 */
|
|
1158
|
+
function create_fragment$l(ctx) {
|
|
1159
|
+
var svg;
|
|
1160
|
+
var path;
|
|
1161
|
+
return {
|
|
1162
|
+
c: function () {
|
|
1163
|
+
svg = svg_element("svg");
|
|
1164
|
+
path = svg_element("path");
|
|
1165
|
+
attr(path, "fill", "currentColor");
|
|
1166
|
+
attr(path, "d", "m11 4c2.76 0 5 2.24 5 5 0 0.65-0.13 1.26-0.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74 0.25-3.98 0.7l2.16 2.16c0.57-0.23 1.18-0.36 1.83-0.36zm-10-2.73 2.74 2.74c-1.66 1.29-2.96 3.01-3.74 4.99 1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-0.3 4.38-0.84l0.42 0.42 2.93 2.92 1.27-1.27-17.73-17.73-1.27 1.27zm5.53 5.53 1.55 1.55c-0.05 0.21-0.08 0.43-0.08 0.65 0 1.66 1.34 3 3 3 0.22 0 0.44-0.03 0.65-0.08l1.55 1.55c-0.67 0.33-1.41 0.53-2.2 0.53-2.76 0-5-2.24-5-5 0-0.79 0.2-1.53 0.53-2.2zm4.31-0.78 3.15 3.15 0.02-0.16c0-1.66-1.34-3-3-3l-0.17 0.01z");
|
|
1167
|
+
attr(svg, "class", "ms-form__eye-slash");
|
|
1168
|
+
attr(svg, "fill", "none");
|
|
1169
|
+
attr(svg, "viewBox", "0 0 22 19");
|
|
1170
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
1171
|
+
},
|
|
1172
|
+
m: function (target, anchor) {
|
|
1173
|
+
insert(target, svg, anchor);
|
|
1174
|
+
append(svg, path);
|
|
1175
|
+
},
|
|
1176
|
+
p: noop,
|
|
1177
|
+
i: noop,
|
|
1178
|
+
o: noop,
|
|
1179
|
+
d: function (detaching) {
|
|
1180
|
+
if (detaching)
|
|
1181
|
+
detach(svg);
|
|
1182
|
+
}
|
|
1183
|
+
};
|
|
1184
|
+
}
|
|
1185
|
+
var EyeSlashIcon = /** @class */ (function (_super) {
|
|
1186
|
+
__extends(EyeSlashIcon, _super);
|
|
1187
|
+
function EyeSlashIcon(options) {
|
|
1188
|
+
var _this = _super.call(this) || this;
|
|
1189
|
+
init(_this, options, null, create_fragment$l, safe_not_equal, {});
|
|
1190
|
+
return _this;
|
|
1191
|
+
}
|
|
1192
|
+
return EyeSlashIcon;
|
|
1193
|
+
}(SvelteComponent));
|
|
1194
|
+
/* src/components/PasswordInput.svelte generated by Svelte v3.48.0 */
|
|
1195
|
+
function create_if_block_2$2(ctx) {
|
|
1196
|
+
var div;
|
|
1197
|
+
var a;
|
|
1198
|
+
var mounted;
|
|
1199
|
+
var dispose;
|
|
1200
|
+
return {
|
|
1201
|
+
c: function () {
|
|
1202
|
+
div = element("div");
|
|
1203
|
+
a = element("a");
|
|
1204
|
+
a.textContent = "Forgot Password?";
|
|
1205
|
+
attr(a, "tabindex", "-1");
|
|
1206
|
+
attr(a, "href", "#");
|
|
1207
|
+
attr(div, "class", "ms-form__label ms-form__label--right");
|
|
1208
|
+
},
|
|
1209
|
+
m: function (target, anchor) {
|
|
1210
|
+
insert(target, div, anchor);
|
|
1211
|
+
append(div, a);
|
|
1212
|
+
if (!mounted) {
|
|
1213
|
+
dispose = listen(a, "click", /*click_handler*/ ctx[10]);
|
|
1214
|
+
mounted = true;
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1217
|
+
p: noop,
|
|
1218
|
+
d: function (detaching) {
|
|
1219
|
+
if (detaching)
|
|
1220
|
+
detach(div);
|
|
1221
|
+
mounted = false;
|
|
1222
|
+
dispose();
|
|
1223
|
+
}
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
// (51:6) {:else}
|
|
1227
|
+
function create_else_block(ctx) {
|
|
1228
|
+
var eyeslashicon;
|
|
1229
|
+
var current;
|
|
1230
|
+
eyeslashicon = new EyeSlashIcon({});
|
|
1231
|
+
return {
|
|
1232
|
+
c: function () {
|
|
1233
|
+
create_component(eyeslashicon.$$.fragment);
|
|
1234
|
+
},
|
|
1235
|
+
m: function (target, anchor) {
|
|
1236
|
+
mount_component(eyeslashicon, target, anchor);
|
|
1237
|
+
current = true;
|
|
1238
|
+
},
|
|
1239
|
+
i: function (local) {
|
|
1240
|
+
if (current)
|
|
1241
|
+
return;
|
|
1242
|
+
transition_in(eyeslashicon.$$.fragment, local);
|
|
1243
|
+
current = true;
|
|
1244
|
+
},
|
|
1245
|
+
o: function (local) {
|
|
1246
|
+
transition_out(eyeslashicon.$$.fragment, local);
|
|
1247
|
+
current = false;
|
|
1248
|
+
},
|
|
1249
|
+
d: function (detaching) {
|
|
1250
|
+
destroy_component(eyeslashicon, detaching);
|
|
1251
|
+
}
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
// (49:6) {#if !passwordVisible}
|
|
1255
|
+
function create_if_block_1$2(ctx) {
|
|
1256
|
+
var eyeicon;
|
|
1257
|
+
var current;
|
|
1258
|
+
eyeicon = new EyeIcon({});
|
|
1259
|
+
return {
|
|
1260
|
+
c: function () {
|
|
1261
|
+
create_component(eyeicon.$$.fragment);
|
|
1262
|
+
},
|
|
1263
|
+
m: function (target, anchor) {
|
|
1264
|
+
mount_component(eyeicon, target, anchor);
|
|
1265
|
+
current = true;
|
|
1266
|
+
},
|
|
1267
|
+
i: function (local) {
|
|
1268
|
+
if (current)
|
|
1269
|
+
return;
|
|
1270
|
+
transition_in(eyeicon.$$.fragment, local);
|
|
1271
|
+
current = true;
|
|
1272
|
+
},
|
|
1273
|
+
o: function (local) {
|
|
1274
|
+
transition_out(eyeicon.$$.fragment, local);
|
|
1275
|
+
current = false;
|
|
1276
|
+
},
|
|
1277
|
+
d: function (detaching) {
|
|
1278
|
+
destroy_component(eyeicon, detaching);
|
|
1279
|
+
}
|
|
1280
|
+
};
|
|
1281
|
+
}
|
|
1282
|
+
// (56:2) {#if inputError}
|
|
1283
|
+
function create_if_block$4(ctx) {
|
|
1284
|
+
var div;
|
|
1285
|
+
var erroricon;
|
|
1286
|
+
var t0;
|
|
1287
|
+
var t1;
|
|
1288
|
+
var current;
|
|
1289
|
+
erroricon = new ErrorIcon({});
|
|
1290
|
+
return {
|
|
1291
|
+
c: function () {
|
|
1292
|
+
div = element("div");
|
|
1293
|
+
create_component(erroricon.$$.fragment);
|
|
1294
|
+
t0 = space();
|
|
1295
|
+
t1 = text(errorMessage);
|
|
1296
|
+
attr(div, "class", "ms-form__error");
|
|
1297
|
+
},
|
|
1298
|
+
m: function (target, anchor) {
|
|
1299
|
+
insert(target, div, anchor);
|
|
1300
|
+
mount_component(erroricon, div, null);
|
|
1301
|
+
append(div, t0);
|
|
1302
|
+
append(div, t1);
|
|
1303
|
+
current = true;
|
|
1304
|
+
},
|
|
1305
|
+
p: noop,
|
|
1306
|
+
i: function (local) {
|
|
1307
|
+
if (current)
|
|
1308
|
+
return;
|
|
1309
|
+
transition_in(erroricon.$$.fragment, local);
|
|
1310
|
+
current = true;
|
|
1311
|
+
},
|
|
1312
|
+
o: function (local) {
|
|
1313
|
+
transition_out(erroricon.$$.fragment, local);
|
|
1314
|
+
current = false;
|
|
1315
|
+
},
|
|
1316
|
+
d: function (detaching) {
|
|
1317
|
+
if (detaching)
|
|
1318
|
+
detach(div);
|
|
1319
|
+
destroy_component(erroricon);
|
|
1320
|
+
}
|
|
1321
|
+
};
|
|
1322
|
+
}
|
|
1323
|
+
function create_fragment$k(ctx) {
|
|
1324
|
+
var div3;
|
|
1325
|
+
var div0;
|
|
1326
|
+
var label;
|
|
1327
|
+
var t0;
|
|
1328
|
+
var t1;
|
|
1329
|
+
var t2;
|
|
1330
|
+
var div2;
|
|
1331
|
+
var input;
|
|
1332
|
+
var t3;
|
|
1333
|
+
var div1;
|
|
1334
|
+
var current_block_type_index;
|
|
1335
|
+
var if_block1;
|
|
1336
|
+
var t4;
|
|
1337
|
+
var current;
|
|
1338
|
+
var mounted;
|
|
1339
|
+
var dispose;
|
|
1340
|
+
var if_block0 = /*showForgotPasswordLabel*/ ctx[1] && create_if_block_2$2(ctx);
|
|
1341
|
+
var if_block_creators = [create_if_block_1$2, create_else_block];
|
|
1342
|
+
var if_blocks = [];
|
|
1343
|
+
function select_block_type(ctx, dirty) {
|
|
1344
|
+
if (!ctx[4])
|
|
1345
|
+
return 0;
|
|
1346
|
+
return 1;
|
|
1347
|
+
}
|
|
1348
|
+
current_block_type_index = select_block_type(ctx);
|
|
1349
|
+
if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
1350
|
+
var if_block2 = /*inputError*/ ctx[5] && create_if_block$4();
|
|
1351
|
+
return {
|
|
1352
|
+
c: function () {
|
|
1353
|
+
div3 = element("div");
|
|
1354
|
+
div0 = element("div");
|
|
1355
|
+
label = element("label");
|
|
1356
|
+
t0 = text(/*passwordLabel*/ ctx[2]);
|
|
1357
|
+
t1 = space();
|
|
1358
|
+
if (if_block0)
|
|
1359
|
+
if_block0.c();
|
|
1360
|
+
t2 = space();
|
|
1361
|
+
div2 = element("div");
|
|
1362
|
+
input = element("input");
|
|
1363
|
+
t3 = space();
|
|
1364
|
+
div1 = element("div");
|
|
1365
|
+
if_block1.c();
|
|
1366
|
+
t4 = space();
|
|
1367
|
+
if (if_block2)
|
|
1368
|
+
if_block2.c();
|
|
1369
|
+
attr(label, "class", "ms-form__label");
|
|
1370
|
+
attr(label, "for", "psw");
|
|
1371
|
+
attr(div0, "class", "ms-form__flex");
|
|
1372
|
+
attr(input, "class", "ms-form__input ms-form__input--password");
|
|
1373
|
+
attr(input, "type", /*type*/ ctx[6]);
|
|
1374
|
+
attr(input, "placeholder", /*passwordPlaceholder*/ ctx[3]);
|
|
1375
|
+
attr(input, "name", "psw");
|
|
1376
|
+
attr(input, "autocomplete", "off");
|
|
1377
|
+
input.required = true;
|
|
1378
|
+
attr(div1, "class", "ms-form__show-toggle");
|
|
1379
|
+
attr(div1, "id", "togglePassword");
|
|
1380
|
+
attr(div2, "class", "ms-form__password-container");
|
|
1381
|
+
attr(div3, "class", "ms-form__group");
|
|
1382
|
+
},
|
|
1383
|
+
m: function (target, anchor) {
|
|
1384
|
+
insert(target, div3, anchor);
|
|
1385
|
+
append(div3, div0);
|
|
1386
|
+
append(div0, label);
|
|
1387
|
+
append(label, t0);
|
|
1388
|
+
append(div0, t1);
|
|
1389
|
+
if (if_block0)
|
|
1390
|
+
if_block0.m(div0, null);
|
|
1391
|
+
append(div3, t2);
|
|
1392
|
+
append(div3, div2);
|
|
1393
|
+
append(div2, input);
|
|
1394
|
+
append(div2, t3);
|
|
1395
|
+
append(div2, div1);
|
|
1396
|
+
if_blocks[current_block_type_index].m(div1, null);
|
|
1397
|
+
append(div3, t4);
|
|
1398
|
+
if (if_block2)
|
|
1399
|
+
if_block2.m(div3, null);
|
|
1400
|
+
current = true;
|
|
1401
|
+
if (!mounted) {
|
|
1402
|
+
dispose = [
|
|
1403
|
+
listen(input, "blur", /*validateField*/ ctx[8]),
|
|
1404
|
+
listen(div1, "click", /*togglePassword*/ ctx[7])
|
|
1405
|
+
];
|
|
1406
|
+
mounted = true;
|
|
1407
|
+
}
|
|
1408
|
+
},
|
|
1409
|
+
p: function (ctx, _a) {
|
|
1410
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
1411
|
+
if (!current || dirty & /*passwordLabel*/ 4)
|
|
1412
|
+
set_data(t0, /*passwordLabel*/ ctx[2]);
|
|
1413
|
+
if ( /*showForgotPasswordLabel*/ctx[1]) {
|
|
1414
|
+
if (if_block0) {
|
|
1415
|
+
if_block0.p(ctx, dirty);
|
|
1416
|
+
}
|
|
1417
|
+
else {
|
|
1418
|
+
if_block0 = create_if_block_2$2(ctx);
|
|
1419
|
+
if_block0.c();
|
|
1420
|
+
if_block0.m(div0, null);
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
else if (if_block0) {
|
|
1424
|
+
if_block0.d(1);
|
|
1425
|
+
if_block0 = null;
|
|
1426
|
+
}
|
|
1427
|
+
if (!current || dirty & /*type*/ 64) {
|
|
1428
|
+
attr(input, "type", /*type*/ ctx[6]);
|
|
1429
|
+
}
|
|
1430
|
+
if (!current || dirty & /*passwordPlaceholder*/ 8) {
|
|
1431
|
+
attr(input, "placeholder", /*passwordPlaceholder*/ ctx[3]);
|
|
1432
|
+
}
|
|
1433
|
+
var previous_block_index = current_block_type_index;
|
|
1434
|
+
current_block_type_index = select_block_type(ctx);
|
|
1435
|
+
if (current_block_type_index !== previous_block_index) {
|
|
1436
|
+
group_outros();
|
|
1437
|
+
transition_out(if_blocks[previous_block_index], 1, 1, function () {
|
|
1438
|
+
if_blocks[previous_block_index] = null;
|
|
1439
|
+
});
|
|
1440
|
+
check_outros();
|
|
1441
|
+
if_block1 = if_blocks[current_block_type_index];
|
|
1442
|
+
if (!if_block1) {
|
|
1443
|
+
if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
1444
|
+
if_block1.c();
|
|
1445
|
+
}
|
|
1446
|
+
transition_in(if_block1, 1);
|
|
1447
|
+
if_block1.m(div1, null);
|
|
1448
|
+
}
|
|
1449
|
+
if ( /*inputError*/ctx[5]) {
|
|
1450
|
+
if (if_block2) {
|
|
1451
|
+
if_block2.p(ctx, dirty);
|
|
1452
|
+
if (dirty & /*inputError*/ 32) {
|
|
1453
|
+
transition_in(if_block2, 1);
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
else {
|
|
1457
|
+
if_block2 = create_if_block$4();
|
|
1458
|
+
if_block2.c();
|
|
1459
|
+
transition_in(if_block2, 1);
|
|
1460
|
+
if_block2.m(div3, null);
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
else if (if_block2) {
|
|
1464
|
+
group_outros();
|
|
1465
|
+
transition_out(if_block2, 1, 1, function () {
|
|
1466
|
+
if_block2 = null;
|
|
1467
|
+
});
|
|
1468
|
+
check_outros();
|
|
1469
|
+
}
|
|
1470
|
+
},
|
|
1471
|
+
i: function (local) {
|
|
1472
|
+
if (current)
|
|
1473
|
+
return;
|
|
1474
|
+
transition_in(if_block1);
|
|
1475
|
+
transition_in(if_block2);
|
|
1476
|
+
current = true;
|
|
1477
|
+
},
|
|
1478
|
+
o: function (local) {
|
|
1479
|
+
transition_out(if_block1);
|
|
1480
|
+
transition_out(if_block2);
|
|
1481
|
+
current = false;
|
|
1482
|
+
},
|
|
1483
|
+
d: function (detaching) {
|
|
1484
|
+
if (detaching)
|
|
1485
|
+
detach(div3);
|
|
1486
|
+
if (if_block0)
|
|
1487
|
+
if_block0.d();
|
|
1488
|
+
if_blocks[current_block_type_index].d();
|
|
1489
|
+
if (if_block2)
|
|
1490
|
+
if_block2.d();
|
|
1491
|
+
mounted = false;
|
|
1492
|
+
run_all(dispose);
|
|
1493
|
+
}
|
|
1494
|
+
};
|
|
1495
|
+
}
|
|
1496
|
+
var errorMessage = "Minimum 8 characters required";
|
|
1497
|
+
function instance$a($$self, $$props, $$invalidate) {
|
|
1498
|
+
var type;
|
|
1499
|
+
var _a = $$props.showForgotPasswordLabel, showForgotPasswordLabel = _a === void 0 ? false : _a;
|
|
1500
|
+
var _b = $$props.passwordInputValid, passwordInputValid = _b === void 0 ? false : _b;
|
|
1501
|
+
var _c = $$props.passwordLabel, passwordLabel = _c === void 0 ? "Password" : _c;
|
|
1502
|
+
var _d = $$props.passwordPlaceholder, passwordPlaceholder = _d === void 0 ? "Enter Password" : _d;
|
|
1503
|
+
var display = $$props.display;
|
|
1504
|
+
var inputError = false;
|
|
1505
|
+
var passwordVisible = false;
|
|
1506
|
+
function togglePassword() {
|
|
1507
|
+
$$invalidate(4, passwordVisible = !passwordVisible);
|
|
1508
|
+
}
|
|
1509
|
+
var validateField = function (e) {
|
|
1510
|
+
var hasValidPassword = e.target.value.length >= 8 ? true : false;
|
|
1511
|
+
if (!hasValidPassword) {
|
|
1512
|
+
$$invalidate(9, passwordInputValid = false);
|
|
1513
|
+
$$invalidate(5, inputError = true);
|
|
1514
|
+
}
|
|
1515
|
+
else {
|
|
1516
|
+
$$invalidate(9, passwordInputValid = true);
|
|
1517
|
+
$$invalidate(5, inputError = false);
|
|
1518
|
+
}
|
|
1519
|
+
};
|
|
1520
|
+
var click_handler = function () { return $$invalidate(0, display = "forgot_password"); };
|
|
1521
|
+
$$self.$$set = function ($$props) {
|
|
1522
|
+
if ('showForgotPasswordLabel' in $$props)
|
|
1523
|
+
$$invalidate(1, showForgotPasswordLabel = $$props.showForgotPasswordLabel);
|
|
1524
|
+
if ('passwordInputValid' in $$props)
|
|
1525
|
+
$$invalidate(9, passwordInputValid = $$props.passwordInputValid);
|
|
1526
|
+
if ('passwordLabel' in $$props)
|
|
1527
|
+
$$invalidate(2, passwordLabel = $$props.passwordLabel);
|
|
1528
|
+
if ('passwordPlaceholder' in $$props)
|
|
1529
|
+
$$invalidate(3, passwordPlaceholder = $$props.passwordPlaceholder);
|
|
1530
|
+
if ('display' in $$props)
|
|
1531
|
+
$$invalidate(0, display = $$props.display);
|
|
1532
|
+
};
|
|
1533
|
+
$$self.$$.update = function () {
|
|
1534
|
+
if ($$self.$$.dirty & /*passwordVisible*/ 16) {
|
|
1535
|
+
$$invalidate(6, type = passwordVisible ? "text" : "password");
|
|
1536
|
+
}
|
|
1537
|
+
};
|
|
1538
|
+
return [
|
|
1539
|
+
display,
|
|
1540
|
+
showForgotPasswordLabel,
|
|
1541
|
+
passwordLabel,
|
|
1542
|
+
passwordPlaceholder,
|
|
1543
|
+
passwordVisible,
|
|
1544
|
+
inputError,
|
|
1545
|
+
type,
|
|
1546
|
+
togglePassword,
|
|
1547
|
+
validateField,
|
|
1548
|
+
passwordInputValid,
|
|
1549
|
+
click_handler
|
|
1550
|
+
];
|
|
1551
|
+
}
|
|
1552
|
+
var PasswordInput = /** @class */ (function (_super) {
|
|
1553
|
+
__extends(PasswordInput, _super);
|
|
1554
|
+
function PasswordInput(options) {
|
|
1555
|
+
var _this = _super.call(this) || this;
|
|
1556
|
+
init(_this, options, instance$a, create_fragment$k, safe_not_equal, {
|
|
1557
|
+
showForgotPasswordLabel: 1,
|
|
1558
|
+
passwordInputValid: 9,
|
|
1559
|
+
passwordLabel: 2,
|
|
1560
|
+
passwordPlaceholder: 3,
|
|
1561
|
+
display: 0
|
|
1562
|
+
});
|
|
1563
|
+
return _this;
|
|
1564
|
+
}
|
|
1565
|
+
return PasswordInput;
|
|
1566
|
+
}(SvelteComponent));
|
|
1567
|
+
/* src/icons/SecuredIcon.svelte generated by Svelte v3.48.0 */
|
|
1568
|
+
function create_fragment$j(ctx) {
|
|
1569
|
+
var svg;
|
|
1570
|
+
var path;
|
|
1571
|
+
return {
|
|
1572
|
+
c: function () {
|
|
1573
|
+
svg = svg_element("svg");
|
|
1574
|
+
path = svg_element("path");
|
|
1575
|
+
attr(path, "fill", "currentColor");
|
|
1576
|
+
attr(path, "shape-rendering", "geometricPrecision");
|
|
1577
|
+
attr(path, "d", "m9 0-9 4v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12v-6l-9-4zm-2 16-4-4 1.41-1.41 2.59 2.58 6.59-6.59 1.41 1.42-8 8z");
|
|
1578
|
+
attr(svg, "fill", "none");
|
|
1579
|
+
attr(svg, "viewBox", "0 0 18 22");
|
|
1580
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
1581
|
+
},
|
|
1582
|
+
m: function (target, anchor) {
|
|
1583
|
+
insert(target, svg, anchor);
|
|
1584
|
+
append(svg, path);
|
|
1585
|
+
},
|
|
1586
|
+
p: noop,
|
|
1587
|
+
i: noop,
|
|
1588
|
+
o: noop,
|
|
1589
|
+
d: function (detaching) {
|
|
1590
|
+
if (detaching)
|
|
1591
|
+
detach(svg);
|
|
1592
|
+
}
|
|
1593
|
+
};
|
|
1594
|
+
}
|
|
1595
|
+
var SecuredIcon = /** @class */ (function (_super) {
|
|
1596
|
+
__extends(SecuredIcon, _super);
|
|
1597
|
+
function SecuredIcon(options) {
|
|
1598
|
+
var _this = _super.call(this) || this;
|
|
1599
|
+
init(_this, options, null, create_fragment$j, safe_not_equal, {});
|
|
1600
|
+
return _this;
|
|
1601
|
+
}
|
|
1602
|
+
return SecuredIcon;
|
|
1603
|
+
}(SvelteComponent));
|
|
1604
|
+
/* src/components/ModalFooter.svelte generated by Svelte v3.48.0 */
|
|
1605
|
+
function create_fragment$i(ctx) {
|
|
1606
|
+
var div;
|
|
1607
|
+
var a;
|
|
1608
|
+
var securedicon;
|
|
1609
|
+
var t;
|
|
1610
|
+
var current;
|
|
1611
|
+
securedicon = new SecuredIcon({});
|
|
1612
|
+
return {
|
|
1613
|
+
c: function () {
|
|
1614
|
+
div = element("div");
|
|
1615
|
+
a = element("a");
|
|
1616
|
+
create_component(securedicon.$$.fragment);
|
|
1617
|
+
t = text(" Secured by Memberstack");
|
|
1618
|
+
attr(a, "href", "https://www.memberstack.com");
|
|
1619
|
+
attr(a, "target", "_blank");
|
|
1620
|
+
attr(div, "class", "ms-modal__footer");
|
|
1621
|
+
},
|
|
1622
|
+
m: function (target, anchor) {
|
|
1623
|
+
insert(target, div, anchor);
|
|
1624
|
+
append(div, a);
|
|
1625
|
+
mount_component(securedicon, a, null);
|
|
1626
|
+
append(a, t);
|
|
1627
|
+
current = true;
|
|
1628
|
+
},
|
|
1629
|
+
p: noop,
|
|
1630
|
+
i: function (local) {
|
|
1631
|
+
if (current)
|
|
1632
|
+
return;
|
|
1633
|
+
transition_in(securedicon.$$.fragment, local);
|
|
1634
|
+
current = true;
|
|
1635
|
+
},
|
|
1636
|
+
o: function (local) {
|
|
1637
|
+
transition_out(securedicon.$$.fragment, local);
|
|
1638
|
+
current = false;
|
|
1639
|
+
},
|
|
1640
|
+
d: function (detaching) {
|
|
1641
|
+
if (detaching)
|
|
1642
|
+
detach(div);
|
|
1643
|
+
destroy_component(securedicon);
|
|
1644
|
+
}
|
|
1645
|
+
};
|
|
1646
|
+
}
|
|
1647
|
+
var ModalFooter = /** @class */ (function (_super) {
|
|
1648
|
+
__extends(ModalFooter, _super);
|
|
1649
|
+
function ModalFooter(options) {
|
|
1650
|
+
var _this = _super.call(this) || this;
|
|
1651
|
+
init(_this, options, null, create_fragment$i, safe_not_equal, {});
|
|
1652
|
+
return _this;
|
|
1653
|
+
}
|
|
1654
|
+
return ModalFooter;
|
|
1655
|
+
}(SvelteComponent));
|
|
1656
|
+
/* src/modals/LoginModal.svelte generated by Svelte v3.48.0 */
|
|
1657
|
+
function create_if_block$3(ctx) {
|
|
1658
|
+
var div;
|
|
1659
|
+
var a;
|
|
1660
|
+
var mounted;
|
|
1661
|
+
var dispose;
|
|
1662
|
+
return {
|
|
1663
|
+
c: function () {
|
|
1664
|
+
div = element("div");
|
|
1665
|
+
a = element("a");
|
|
1666
|
+
a.textContent = "Don't have an account?";
|
|
1667
|
+
attr(a, "class", "ms-form__link");
|
|
1668
|
+
attr(a, "href", "#");
|
|
1669
|
+
attr(div, "class", "ms-form__flex ms-form__flex--centered");
|
|
1670
|
+
},
|
|
1671
|
+
m: function (target, anchor) {
|
|
1672
|
+
insert(target, div, anchor);
|
|
1673
|
+
append(div, a);
|
|
1674
|
+
if (!mounted) {
|
|
1675
|
+
dispose = listen(a, "click", /*click_handler*/ ctx[11]);
|
|
1676
|
+
mounted = true;
|
|
1677
|
+
}
|
|
1678
|
+
},
|
|
1679
|
+
p: noop,
|
|
1680
|
+
d: function (detaching) {
|
|
1681
|
+
if (detaching)
|
|
1682
|
+
detach(div);
|
|
1683
|
+
mounted = false;
|
|
1684
|
+
dispose();
|
|
1685
|
+
}
|
|
1686
|
+
};
|
|
1687
|
+
}
|
|
1688
|
+
function create_fragment$h(ctx) {
|
|
1689
|
+
var div1;
|
|
1690
|
+
var closebutton;
|
|
1691
|
+
var t0;
|
|
1692
|
+
var div0;
|
|
1693
|
+
var figureelement;
|
|
1694
|
+
var t1;
|
|
1695
|
+
var h2;
|
|
1696
|
+
var t3;
|
|
1697
|
+
var form;
|
|
1698
|
+
var emailinput;
|
|
1699
|
+
var updating_emailInputValid;
|
|
1700
|
+
var t4;
|
|
1701
|
+
var passwordinput;
|
|
1702
|
+
var updating_passwordInputValid;
|
|
1703
|
+
var updating_display;
|
|
1704
|
+
var t5;
|
|
1705
|
+
var submitbutton;
|
|
1706
|
+
var t6;
|
|
1707
|
+
var t7;
|
|
1708
|
+
var modalfooter;
|
|
1709
|
+
var current;
|
|
1710
|
+
var mounted;
|
|
1711
|
+
var dispose;
|
|
1712
|
+
closebutton = new CloseButton({
|
|
1713
|
+
props: { closeModal: /*closeModal*/ ctx[1] }
|
|
1714
|
+
});
|
|
1715
|
+
figureelement = new FigureElement({});
|
|
1716
|
+
function emailinput_emailInputValid_binding(value) {
|
|
1717
|
+
/*emailinput_emailInputValid_binding*/ ctx[8](value);
|
|
1718
|
+
}
|
|
1719
|
+
var emailinput_props = {};
|
|
1720
|
+
if ( /*emailInputValid*/ctx[4] !== void 0) {
|
|
1721
|
+
emailinput_props.emailInputValid = /*emailInputValid*/ ctx[4];
|
|
1722
|
+
}
|
|
1723
|
+
emailinput = new EmailInput({ props: emailinput_props });
|
|
1724
|
+
binding_callbacks.push(function () { return bind(emailinput, 'emailInputValid', emailinput_emailInputValid_binding); });
|
|
1725
|
+
function passwordinput_passwordInputValid_binding(value) {
|
|
1726
|
+
/*passwordinput_passwordInputValid_binding*/ ctx[9](value);
|
|
1727
|
+
}
|
|
1728
|
+
function passwordinput_display_binding(value) {
|
|
1729
|
+
/*passwordinput_display_binding*/ ctx[10](value);
|
|
1730
|
+
}
|
|
1731
|
+
var passwordinput_props = { showForgotPasswordLabel: true };
|
|
1732
|
+
if ( /*passwordInputValid*/ctx[5] !== void 0) {
|
|
1733
|
+
passwordinput_props.passwordInputValid = /*passwordInputValid*/ ctx[5];
|
|
1734
|
+
}
|
|
1735
|
+
if ( /*display*/ctx[0] !== void 0) {
|
|
1736
|
+
passwordinput_props.display = /*display*/ ctx[0];
|
|
1737
|
+
}
|
|
1738
|
+
passwordinput = new PasswordInput({ props: passwordinput_props });
|
|
1739
|
+
binding_callbacks.push(function () { return bind(passwordinput, 'passwordInputValid', passwordinput_passwordInputValid_binding); });
|
|
1740
|
+
binding_callbacks.push(function () { return bind(passwordinput, 'display', passwordinput_display_binding); });
|
|
1741
|
+
submitbutton = new SubmitButton({
|
|
1742
|
+
props: {
|
|
1743
|
+
buttonText: "Log in",
|
|
1744
|
+
isLoading: /*showLoader*/ ctx[3]
|
|
1745
|
+
}
|
|
1746
|
+
});
|
|
1747
|
+
var if_block = /*params*/ ctx[2] && /*params*/ ctx[2].signup && /*params*/ ctx[2].signup.plans && create_if_block$3(ctx);
|
|
1748
|
+
modalfooter = new ModalFooter({});
|
|
1749
|
+
return {
|
|
1750
|
+
c: function () {
|
|
1751
|
+
div1 = element("div");
|
|
1752
|
+
create_component(closebutton.$$.fragment);
|
|
1753
|
+
t0 = space();
|
|
1754
|
+
div0 = element("div");
|
|
1755
|
+
create_component(figureelement.$$.fragment);
|
|
1756
|
+
t1 = space();
|
|
1757
|
+
h2 = element("h2");
|
|
1758
|
+
h2.textContent = "Login to your account";
|
|
1759
|
+
t3 = space();
|
|
1760
|
+
form = element("form");
|
|
1761
|
+
create_component(emailinput.$$.fragment);
|
|
1762
|
+
t4 = space();
|
|
1763
|
+
create_component(passwordinput.$$.fragment);
|
|
1764
|
+
t5 = space();
|
|
1765
|
+
create_component(submitbutton.$$.fragment);
|
|
1766
|
+
t6 = space();
|
|
1767
|
+
if (if_block)
|
|
1768
|
+
if_block.c();
|
|
1769
|
+
t7 = space();
|
|
1770
|
+
create_component(modalfooter.$$.fragment);
|
|
1771
|
+
attr(h2, "class", "ms-modal__title");
|
|
1772
|
+
attr(form, "class", "ms-form");
|
|
1773
|
+
attr(form, "action", "");
|
|
1774
|
+
attr(form, "method", "post");
|
|
1775
|
+
attr(form, "autocomplete", "off");
|
|
1776
|
+
attr(div0, "class", "ms-modal__content");
|
|
1777
|
+
attr(div1, "class", "ms-modal");
|
|
1778
|
+
attr(div1, "id", "LoginModal");
|
|
1779
|
+
},
|
|
1780
|
+
m: function (target, anchor) {
|
|
1781
|
+
insert(target, div1, anchor);
|
|
1782
|
+
mount_component(closebutton, div1, null);
|
|
1783
|
+
append(div1, t0);
|
|
1784
|
+
append(div1, div0);
|
|
1785
|
+
mount_component(figureelement, div0, null);
|
|
1786
|
+
append(div0, t1);
|
|
1787
|
+
append(div0, h2);
|
|
1788
|
+
append(div0, t3);
|
|
1789
|
+
append(div0, form);
|
|
1790
|
+
mount_component(emailinput, form, null);
|
|
1791
|
+
append(form, t4);
|
|
1792
|
+
mount_component(passwordinput, form, null);
|
|
1793
|
+
append(form, t5);
|
|
1794
|
+
mount_component(submitbutton, form, null);
|
|
1795
|
+
append(form, t6);
|
|
1796
|
+
if (if_block)
|
|
1797
|
+
if_block.m(form, null);
|
|
1798
|
+
append(div1, t7);
|
|
1799
|
+
mount_component(modalfooter, div1, null);
|
|
1800
|
+
current = true;
|
|
1801
|
+
if (!mounted) {
|
|
1802
|
+
dispose = listen(form, "submit", stop_propagation(prevent_default(/*submitLogin*/ ctx[6])));
|
|
1803
|
+
mounted = true;
|
|
1804
|
+
}
|
|
1805
|
+
},
|
|
1806
|
+
p: function (ctx, _a) {
|
|
1807
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
1808
|
+
var closebutton_changes = {};
|
|
1809
|
+
if (dirty & /*closeModal*/ 2)
|
|
1810
|
+
closebutton_changes.closeModal = /*closeModal*/ ctx[1];
|
|
1811
|
+
closebutton.$set(closebutton_changes);
|
|
1812
|
+
var emailinput_changes = {};
|
|
1813
|
+
if (!updating_emailInputValid && dirty & /*emailInputValid*/ 16) {
|
|
1814
|
+
updating_emailInputValid = true;
|
|
1815
|
+
emailinput_changes.emailInputValid = /*emailInputValid*/ ctx[4];
|
|
1816
|
+
add_flush_callback(function () { return updating_emailInputValid = false; });
|
|
1817
|
+
}
|
|
1818
|
+
emailinput.$set(emailinput_changes);
|
|
1819
|
+
var passwordinput_changes = {};
|
|
1820
|
+
if (!updating_passwordInputValid && dirty & /*passwordInputValid*/ 32) {
|
|
1821
|
+
updating_passwordInputValid = true;
|
|
1822
|
+
passwordinput_changes.passwordInputValid = /*passwordInputValid*/ ctx[5];
|
|
1823
|
+
add_flush_callback(function () { return updating_passwordInputValid = false; });
|
|
1824
|
+
}
|
|
1825
|
+
if (!updating_display && dirty & /*display*/ 1) {
|
|
1826
|
+
updating_display = true;
|
|
1827
|
+
passwordinput_changes.display = /*display*/ ctx[0];
|
|
1828
|
+
add_flush_callback(function () { return updating_display = false; });
|
|
1829
|
+
}
|
|
1830
|
+
passwordinput.$set(passwordinput_changes);
|
|
1831
|
+
var submitbutton_changes = {};
|
|
1832
|
+
if (dirty & /*showLoader*/ 8)
|
|
1833
|
+
submitbutton_changes.isLoading = /*showLoader*/ ctx[3];
|
|
1834
|
+
submitbutton.$set(submitbutton_changes);
|
|
1835
|
+
if ( /*params*/ctx[2] && /*params*/ ctx[2].signup && /*params*/ ctx[2].signup.plans) {
|
|
1836
|
+
if (if_block) {
|
|
1837
|
+
if_block.p(ctx, dirty);
|
|
1838
|
+
}
|
|
1839
|
+
else {
|
|
1840
|
+
if_block = create_if_block$3(ctx);
|
|
1841
|
+
if_block.c();
|
|
1842
|
+
if_block.m(form, null);
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
else if (if_block) {
|
|
1846
|
+
if_block.d(1);
|
|
1847
|
+
if_block = null;
|
|
1848
|
+
}
|
|
1849
|
+
},
|
|
1850
|
+
i: function (local) {
|
|
1851
|
+
if (current)
|
|
1852
|
+
return;
|
|
1853
|
+
transition_in(closebutton.$$.fragment, local);
|
|
1854
|
+
transition_in(figureelement.$$.fragment, local);
|
|
1855
|
+
transition_in(emailinput.$$.fragment, local);
|
|
1856
|
+
transition_in(passwordinput.$$.fragment, local);
|
|
1857
|
+
transition_in(submitbutton.$$.fragment, local);
|
|
1858
|
+
transition_in(modalfooter.$$.fragment, local);
|
|
1859
|
+
current = true;
|
|
1860
|
+
},
|
|
1861
|
+
o: function (local) {
|
|
1862
|
+
transition_out(closebutton.$$.fragment, local);
|
|
1863
|
+
transition_out(figureelement.$$.fragment, local);
|
|
1864
|
+
transition_out(emailinput.$$.fragment, local);
|
|
1865
|
+
transition_out(passwordinput.$$.fragment, local);
|
|
1866
|
+
transition_out(submitbutton.$$.fragment, local);
|
|
1867
|
+
transition_out(modalfooter.$$.fragment, local);
|
|
1868
|
+
current = false;
|
|
1869
|
+
},
|
|
1870
|
+
d: function (detaching) {
|
|
1871
|
+
if (detaching)
|
|
1872
|
+
detach(div1);
|
|
1873
|
+
destroy_component(closebutton);
|
|
1874
|
+
destroy_component(figureelement);
|
|
1875
|
+
destroy_component(emailinput);
|
|
1876
|
+
destroy_component(passwordinput);
|
|
1877
|
+
destroy_component(submitbutton);
|
|
1878
|
+
if (if_block)
|
|
1879
|
+
if_block.d();
|
|
1880
|
+
destroy_component(modalfooter);
|
|
1881
|
+
mounted = false;
|
|
1882
|
+
dispose();
|
|
1883
|
+
}
|
|
1884
|
+
};
|
|
1885
|
+
}
|
|
1886
|
+
function instance$9($$self, $$props, $$invalidate) {
|
|
1887
|
+
var closeModal = $$props.closeModal;
|
|
1888
|
+
var display = $$props.display;
|
|
1889
|
+
var onSuccessLogin = $$props.onSuccessLogin;
|
|
1890
|
+
var params = $$props.params;
|
|
1891
|
+
var showLoader = false;
|
|
1892
|
+
var emailInputValid = false;
|
|
1893
|
+
var passwordInputValid = false;
|
|
1894
|
+
function submitLogin(e) {
|
|
1895
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1896
|
+
var emailInput, passwordInput, data, err_1;
|
|
1897
|
+
return __generator(this, function (_a) {
|
|
1898
|
+
switch (_a.label) {
|
|
1899
|
+
case 0:
|
|
1900
|
+
emailInput = e.target[0];
|
|
1901
|
+
passwordInput = e.target[1];
|
|
1902
|
+
if (!emailInputValid || !passwordInputValid)
|
|
1903
|
+
return [2 /*return*/];
|
|
1904
|
+
$$invalidate(3, showLoader = true);
|
|
1905
|
+
_a.label = 1;
|
|
1906
|
+
case 1:
|
|
1907
|
+
_a.trys.push([1, 3, , 4]);
|
|
1908
|
+
return [4 /*yield*/, window.$memberstackDom.loginMemberEmailPassword({
|
|
1909
|
+
email: emailInput.value,
|
|
1910
|
+
password: passwordInput.value
|
|
1911
|
+
})];
|
|
1912
|
+
case 2:
|
|
1913
|
+
data = (_a.sent()).data;
|
|
1914
|
+
onSuccessLogin({ type: "LOGIN", data: data });
|
|
1915
|
+
$$invalidate(3, showLoader = false);
|
|
1916
|
+
return [3 /*break*/, 4];
|
|
1917
|
+
case 3:
|
|
1918
|
+
err_1 = _a.sent();
|
|
1919
|
+
$$invalidate(3, showLoader = false);
|
|
1920
|
+
window.$memberstackDom._showMessage(err_1.message, true);
|
|
1921
|
+
return [3 /*break*/, 4];
|
|
1922
|
+
case 4: return [2 /*return*/];
|
|
1923
|
+
}
|
|
1924
|
+
});
|
|
1925
|
+
});
|
|
1926
|
+
}
|
|
1927
|
+
function emailinput_emailInputValid_binding(value) {
|
|
1928
|
+
emailInputValid = value;
|
|
1929
|
+
$$invalidate(4, emailInputValid);
|
|
1930
|
+
}
|
|
1931
|
+
function passwordinput_passwordInputValid_binding(value) {
|
|
1932
|
+
passwordInputValid = value;
|
|
1933
|
+
$$invalidate(5, passwordInputValid);
|
|
1934
|
+
}
|
|
1935
|
+
function passwordinput_display_binding(value) {
|
|
1936
|
+
display = value;
|
|
1937
|
+
$$invalidate(0, display);
|
|
1938
|
+
}
|
|
1939
|
+
var click_handler = function () { return $$invalidate(0, display = "signup"); };
|
|
1940
|
+
$$self.$$set = function ($$props) {
|
|
1941
|
+
if ('closeModal' in $$props)
|
|
1942
|
+
$$invalidate(1, closeModal = $$props.closeModal);
|
|
1943
|
+
if ('display' in $$props)
|
|
1944
|
+
$$invalidate(0, display = $$props.display);
|
|
1945
|
+
if ('onSuccessLogin' in $$props)
|
|
1946
|
+
$$invalidate(7, onSuccessLogin = $$props.onSuccessLogin);
|
|
1947
|
+
if ('params' in $$props)
|
|
1948
|
+
$$invalidate(2, params = $$props.params);
|
|
1949
|
+
};
|
|
1950
|
+
return [
|
|
1951
|
+
display,
|
|
1952
|
+
closeModal,
|
|
1953
|
+
params,
|
|
1954
|
+
showLoader,
|
|
1955
|
+
emailInputValid,
|
|
1956
|
+
passwordInputValid,
|
|
1957
|
+
submitLogin,
|
|
1958
|
+
onSuccessLogin,
|
|
1959
|
+
emailinput_emailInputValid_binding,
|
|
1960
|
+
passwordinput_passwordInputValid_binding,
|
|
1961
|
+
passwordinput_display_binding,
|
|
1962
|
+
click_handler
|
|
1963
|
+
];
|
|
1964
|
+
}
|
|
1965
|
+
var LoginModal = /** @class */ (function (_super) {
|
|
1966
|
+
__extends(LoginModal, _super);
|
|
1967
|
+
function LoginModal(options) {
|
|
1968
|
+
var _this = _super.call(this) || this;
|
|
1969
|
+
init(_this, options, instance$9, create_fragment$h, safe_not_equal, {
|
|
1970
|
+
closeModal: 1,
|
|
1971
|
+
display: 0,
|
|
1972
|
+
onSuccessLogin: 7,
|
|
1973
|
+
params: 2
|
|
1974
|
+
});
|
|
1975
|
+
return _this;
|
|
1976
|
+
}
|
|
1977
|
+
return LoginModal;
|
|
1978
|
+
}(SvelteComponent));
|
|
1979
|
+
/* src/modals/SignupModal.svelte generated by Svelte v3.48.0 */
|
|
1980
|
+
function create_fragment$g(ctx) {
|
|
1981
|
+
var div2;
|
|
1982
|
+
var closebutton;
|
|
1983
|
+
var t0;
|
|
1984
|
+
var div1;
|
|
1985
|
+
var figureelement;
|
|
1986
|
+
var t1;
|
|
1987
|
+
var h2;
|
|
1988
|
+
var t3;
|
|
1989
|
+
var form;
|
|
1990
|
+
var emailinput;
|
|
1991
|
+
var updating_emailInputValid;
|
|
1992
|
+
var t4;
|
|
1993
|
+
var passwordinput;
|
|
1994
|
+
var updating_passwordInputValid;
|
|
1995
|
+
var t5;
|
|
1996
|
+
var submitbutton;
|
|
1997
|
+
var t6;
|
|
1998
|
+
var div0;
|
|
1999
|
+
var a;
|
|
2000
|
+
var t8;
|
|
2001
|
+
var modalfooter;
|
|
2002
|
+
var current;
|
|
2003
|
+
var mounted;
|
|
2004
|
+
var dispose;
|
|
2005
|
+
closebutton = new CloseButton({
|
|
2006
|
+
props: { closeModal: /*closeModal*/ ctx[1] }
|
|
2007
|
+
});
|
|
2008
|
+
figureelement = new FigureElement({});
|
|
2009
|
+
function emailinput_emailInputValid_binding(value) {
|
|
2010
|
+
/*emailinput_emailInputValid_binding*/ ctx[8](value);
|
|
2011
|
+
}
|
|
2012
|
+
var emailinput_props = {};
|
|
2013
|
+
if ( /*emailInputValid*/ctx[3] !== void 0) {
|
|
2014
|
+
emailinput_props.emailInputValid = /*emailInputValid*/ ctx[3];
|
|
2015
|
+
}
|
|
2016
|
+
emailinput = new EmailInput({ props: emailinput_props });
|
|
2017
|
+
binding_callbacks.push(function () { return bind(emailinput, 'emailInputValid', emailinput_emailInputValid_binding); });
|
|
2018
|
+
function passwordinput_passwordInputValid_binding(value) {
|
|
2019
|
+
/*passwordinput_passwordInputValid_binding*/ ctx[9](value);
|
|
2020
|
+
}
|
|
2021
|
+
var passwordinput_props = {};
|
|
2022
|
+
if ( /*passwordInputValid*/ctx[4] !== void 0) {
|
|
2023
|
+
passwordinput_props.passwordInputValid = /*passwordInputValid*/ ctx[4];
|
|
2024
|
+
}
|
|
2025
|
+
passwordinput = new PasswordInput({ props: passwordinput_props });
|
|
2026
|
+
binding_callbacks.push(function () { return bind(passwordinput, 'passwordInputValid', passwordinput_passwordInputValid_binding); });
|
|
2027
|
+
submitbutton = new SubmitButton({
|
|
2028
|
+
props: {
|
|
2029
|
+
buttonText: "Sign up",
|
|
2030
|
+
isLoading: /*showLoader*/ ctx[2]
|
|
2031
|
+
}
|
|
2032
|
+
});
|
|
2033
|
+
modalfooter = new ModalFooter({});
|
|
2034
|
+
return {
|
|
2035
|
+
c: function () {
|
|
2036
|
+
div2 = element("div");
|
|
2037
|
+
create_component(closebutton.$$.fragment);
|
|
2038
|
+
t0 = space();
|
|
2039
|
+
div1 = element("div");
|
|
2040
|
+
create_component(figureelement.$$.fragment);
|
|
2041
|
+
t1 = space();
|
|
2042
|
+
h2 = element("h2");
|
|
2043
|
+
h2.textContent = "Create an account";
|
|
2044
|
+
t3 = space();
|
|
2045
|
+
form = element("form");
|
|
2046
|
+
create_component(emailinput.$$.fragment);
|
|
2047
|
+
t4 = space();
|
|
2048
|
+
create_component(passwordinput.$$.fragment);
|
|
2049
|
+
t5 = space();
|
|
2050
|
+
create_component(submitbutton.$$.fragment);
|
|
2051
|
+
t6 = space();
|
|
2052
|
+
div0 = element("div");
|
|
2053
|
+
a = element("a");
|
|
2054
|
+
a.textContent = "Already have an account?";
|
|
2055
|
+
t8 = space();
|
|
2056
|
+
create_component(modalfooter.$$.fragment);
|
|
2057
|
+
attr(h2, "class", "ms-modal__title");
|
|
2058
|
+
attr(a, "class", "ms-form__link");
|
|
2059
|
+
attr(a, "href", "#");
|
|
2060
|
+
attr(div0, "class", "ms-form__flex ms-form__flex--centered");
|
|
2061
|
+
attr(form, "class", "ms-form");
|
|
2062
|
+
attr(form, "action", "");
|
|
2063
|
+
attr(form, "method", "post");
|
|
2064
|
+
attr(form, "autocomplete", "off");
|
|
2065
|
+
attr(div1, "class", "ms-modal__content");
|
|
2066
|
+
attr(div2, "class", "ms-modal");
|
|
2067
|
+
attr(div2, "id", "SignupModal");
|
|
2068
|
+
},
|
|
2069
|
+
m: function (target, anchor) {
|
|
2070
|
+
insert(target, div2, anchor);
|
|
2071
|
+
mount_component(closebutton, div2, null);
|
|
2072
|
+
append(div2, t0);
|
|
2073
|
+
append(div2, div1);
|
|
2074
|
+
mount_component(figureelement, div1, null);
|
|
2075
|
+
append(div1, t1);
|
|
2076
|
+
append(div1, h2);
|
|
2077
|
+
append(div1, t3);
|
|
2078
|
+
append(div1, form);
|
|
2079
|
+
mount_component(emailinput, form, null);
|
|
2080
|
+
append(form, t4);
|
|
2081
|
+
mount_component(passwordinput, form, null);
|
|
2082
|
+
append(form, t5);
|
|
2083
|
+
mount_component(submitbutton, form, null);
|
|
2084
|
+
append(form, t6);
|
|
2085
|
+
append(form, div0);
|
|
2086
|
+
append(div0, a);
|
|
2087
|
+
append(div2, t8);
|
|
2088
|
+
mount_component(modalfooter, div2, null);
|
|
2089
|
+
current = true;
|
|
2090
|
+
if (!mounted) {
|
|
2091
|
+
dispose = [
|
|
2092
|
+
listen(a, "click", /*click_handler*/ ctx[10]),
|
|
2093
|
+
listen(form, "submit", stop_propagation(prevent_default(/*submitSignup*/ ctx[5])))
|
|
2094
|
+
];
|
|
2095
|
+
mounted = true;
|
|
2096
|
+
}
|
|
2097
|
+
},
|
|
2098
|
+
p: function (ctx, _a) {
|
|
2099
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
2100
|
+
var closebutton_changes = {};
|
|
2101
|
+
if (dirty & /*closeModal*/ 2)
|
|
2102
|
+
closebutton_changes.closeModal = /*closeModal*/ ctx[1];
|
|
2103
|
+
closebutton.$set(closebutton_changes);
|
|
2104
|
+
var emailinput_changes = {};
|
|
2105
|
+
if (!updating_emailInputValid && dirty & /*emailInputValid*/ 8) {
|
|
2106
|
+
updating_emailInputValid = true;
|
|
2107
|
+
emailinput_changes.emailInputValid = /*emailInputValid*/ ctx[3];
|
|
2108
|
+
add_flush_callback(function () { return updating_emailInputValid = false; });
|
|
2109
|
+
}
|
|
2110
|
+
emailinput.$set(emailinput_changes);
|
|
2111
|
+
var passwordinput_changes = {};
|
|
2112
|
+
if (!updating_passwordInputValid && dirty & /*passwordInputValid*/ 16) {
|
|
2113
|
+
updating_passwordInputValid = true;
|
|
2114
|
+
passwordinput_changes.passwordInputValid = /*passwordInputValid*/ ctx[4];
|
|
2115
|
+
add_flush_callback(function () { return updating_passwordInputValid = false; });
|
|
2116
|
+
}
|
|
2117
|
+
passwordinput.$set(passwordinput_changes);
|
|
2118
|
+
var submitbutton_changes = {};
|
|
2119
|
+
if (dirty & /*showLoader*/ 4)
|
|
2120
|
+
submitbutton_changes.isLoading = /*showLoader*/ ctx[2];
|
|
2121
|
+
submitbutton.$set(submitbutton_changes);
|
|
2122
|
+
},
|
|
2123
|
+
i: function (local) {
|
|
2124
|
+
if (current)
|
|
2125
|
+
return;
|
|
2126
|
+
transition_in(closebutton.$$.fragment, local);
|
|
2127
|
+
transition_in(figureelement.$$.fragment, local);
|
|
2128
|
+
transition_in(emailinput.$$.fragment, local);
|
|
2129
|
+
transition_in(passwordinput.$$.fragment, local);
|
|
2130
|
+
transition_in(submitbutton.$$.fragment, local);
|
|
2131
|
+
transition_in(modalfooter.$$.fragment, local);
|
|
2132
|
+
current = true;
|
|
2133
|
+
},
|
|
2134
|
+
o: function (local) {
|
|
2135
|
+
transition_out(closebutton.$$.fragment, local);
|
|
2136
|
+
transition_out(figureelement.$$.fragment, local);
|
|
2137
|
+
transition_out(emailinput.$$.fragment, local);
|
|
2138
|
+
transition_out(passwordinput.$$.fragment, local);
|
|
2139
|
+
transition_out(submitbutton.$$.fragment, local);
|
|
2140
|
+
transition_out(modalfooter.$$.fragment, local);
|
|
2141
|
+
current = false;
|
|
2142
|
+
},
|
|
2143
|
+
d: function (detaching) {
|
|
2144
|
+
if (detaching)
|
|
2145
|
+
detach(div2);
|
|
2146
|
+
destroy_component(closebutton);
|
|
2147
|
+
destroy_component(figureelement);
|
|
2148
|
+
destroy_component(emailinput);
|
|
2149
|
+
destroy_component(passwordinput);
|
|
2150
|
+
destroy_component(submitbutton);
|
|
2151
|
+
destroy_component(modalfooter);
|
|
2152
|
+
mounted = false;
|
|
2153
|
+
run_all(dispose);
|
|
2154
|
+
}
|
|
2155
|
+
};
|
|
2156
|
+
}
|
|
2157
|
+
function instance$8($$self, $$props, $$invalidate) {
|
|
2158
|
+
var closeModal = $$props.closeModal;
|
|
2159
|
+
var display = $$props.display;
|
|
2160
|
+
var onSuccessSignup = $$props.onSuccessSignup;
|
|
2161
|
+
var params = $$props.params;
|
|
2162
|
+
var showLoader = false;
|
|
2163
|
+
var emailInputValid = false;
|
|
2164
|
+
var passwordInputValid = false;
|
|
2165
|
+
function submitSignup(e) {
|
|
2166
|
+
var _a;
|
|
2167
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2168
|
+
var emailInput, passwordInput, plans, data, err_2;
|
|
2169
|
+
return __generator(this, function (_b) {
|
|
2170
|
+
switch (_b.label) {
|
|
2171
|
+
case 0:
|
|
2172
|
+
emailInput = e.target[0];
|
|
2173
|
+
passwordInput = e.target[1];
|
|
2174
|
+
if (!emailInputValid || !passwordInputValid)
|
|
2175
|
+
return [2 /*return*/];
|
|
2176
|
+
$$invalidate(2, showLoader = true);
|
|
2177
|
+
_b.label = 1;
|
|
2178
|
+
case 1:
|
|
2179
|
+
_b.trys.push([1, 3, , 4]);
|
|
2180
|
+
plans = (((_a = params === null || params === void 0 ? void 0 : params.signup) === null || _a === void 0 ? void 0 : _a.plans) || []).map(function (plan) {
|
|
2181
|
+
return { planId: plan };
|
|
2182
|
+
});
|
|
2183
|
+
return [4 /*yield*/, window.$memberstackDom.signupMemberEmailPassword({
|
|
2184
|
+
email: emailInput.value,
|
|
2185
|
+
password: passwordInput.value,
|
|
2186
|
+
plans: plans
|
|
2187
|
+
})];
|
|
2188
|
+
case 2:
|
|
2189
|
+
data = (_b.sent()).data;
|
|
2190
|
+
onSuccessSignup({ type: "SIGNUP", data: data });
|
|
2191
|
+
$$invalidate(2, showLoader = false);
|
|
2192
|
+
return [3 /*break*/, 4];
|
|
2193
|
+
case 3:
|
|
2194
|
+
err_2 = _b.sent();
|
|
2195
|
+
$$invalidate(2, showLoader = false);
|
|
2196
|
+
window.$memberstackDom._showMessage(err_2.message, true);
|
|
2197
|
+
return [3 /*break*/, 4];
|
|
2198
|
+
case 4: return [2 /*return*/];
|
|
2199
|
+
}
|
|
2200
|
+
});
|
|
2201
|
+
});
|
|
2202
|
+
}
|
|
2203
|
+
function emailinput_emailInputValid_binding(value) {
|
|
2204
|
+
emailInputValid = value;
|
|
2205
|
+
$$invalidate(3, emailInputValid);
|
|
2206
|
+
}
|
|
2207
|
+
function passwordinput_passwordInputValid_binding(value) {
|
|
2208
|
+
passwordInputValid = value;
|
|
2209
|
+
$$invalidate(4, passwordInputValid);
|
|
2210
|
+
}
|
|
2211
|
+
var click_handler = function () { return $$invalidate(0, display = "login"); };
|
|
2212
|
+
$$self.$$set = function ($$props) {
|
|
2213
|
+
if ('closeModal' in $$props)
|
|
2214
|
+
$$invalidate(1, closeModal = $$props.closeModal);
|
|
2215
|
+
if ('display' in $$props)
|
|
2216
|
+
$$invalidate(0, display = $$props.display);
|
|
2217
|
+
if ('onSuccessSignup' in $$props)
|
|
2218
|
+
$$invalidate(6, onSuccessSignup = $$props.onSuccessSignup);
|
|
2219
|
+
if ('params' in $$props)
|
|
2220
|
+
$$invalidate(7, params = $$props.params);
|
|
2221
|
+
};
|
|
2222
|
+
return [
|
|
2223
|
+
display,
|
|
2224
|
+
closeModal,
|
|
2225
|
+
showLoader,
|
|
2226
|
+
emailInputValid,
|
|
2227
|
+
passwordInputValid,
|
|
2228
|
+
submitSignup,
|
|
2229
|
+
onSuccessSignup,
|
|
2230
|
+
params,
|
|
2231
|
+
emailinput_emailInputValid_binding,
|
|
2232
|
+
passwordinput_passwordInputValid_binding,
|
|
2233
|
+
click_handler
|
|
2234
|
+
];
|
|
2235
|
+
}
|
|
2236
|
+
var SignupModal = /** @class */ (function (_super) {
|
|
2237
|
+
__extends(SignupModal, _super);
|
|
2238
|
+
function SignupModal(options) {
|
|
2239
|
+
var _this = _super.call(this) || this;
|
|
2240
|
+
init(_this, options, instance$8, create_fragment$g, safe_not_equal, {
|
|
2241
|
+
closeModal: 1,
|
|
2242
|
+
display: 0,
|
|
2243
|
+
onSuccessSignup: 6,
|
|
2244
|
+
params: 7
|
|
2245
|
+
});
|
|
2246
|
+
return _this;
|
|
2247
|
+
}
|
|
2248
|
+
return SignupModal;
|
|
2249
|
+
}(SvelteComponent));
|
|
2250
|
+
/* src/icons/BackIcon.svelte generated by Svelte v3.48.0 */
|
|
2251
|
+
function create_fragment$f(ctx) {
|
|
2252
|
+
var svg;
|
|
2253
|
+
var path;
|
|
2254
|
+
return {
|
|
2255
|
+
c: function () {
|
|
2256
|
+
svg = svg_element("svg");
|
|
2257
|
+
path = svg_element("path");
|
|
2258
|
+
attr(path, "fill", "currentColor");
|
|
2259
|
+
attr(path, "d", "M7.41 1.41L6 0L0 6L6 12L7.41 10.59L2.83 6L7.41 1.41Z");
|
|
2260
|
+
attr(svg, "fill", "none");
|
|
2261
|
+
attr(svg, "viewBox", "0 0 8 12");
|
|
2262
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
2263
|
+
},
|
|
2264
|
+
m: function (target, anchor) {
|
|
2265
|
+
insert(target, svg, anchor);
|
|
2266
|
+
append(svg, path);
|
|
2267
|
+
},
|
|
2268
|
+
p: noop,
|
|
2269
|
+
i: noop,
|
|
2270
|
+
o: noop,
|
|
2271
|
+
d: function (detaching) {
|
|
2272
|
+
if (detaching)
|
|
2273
|
+
detach(svg);
|
|
2274
|
+
}
|
|
2275
|
+
};
|
|
2276
|
+
}
|
|
2277
|
+
var BackIcon = /** @class */ (function (_super) {
|
|
2278
|
+
__extends(BackIcon, _super);
|
|
2279
|
+
function BackIcon(options) {
|
|
2280
|
+
var _this = _super.call(this) || this;
|
|
2281
|
+
init(_this, options, null, create_fragment$f, safe_not_equal, {});
|
|
2282
|
+
return _this;
|
|
2283
|
+
}
|
|
2284
|
+
return BackIcon;
|
|
2285
|
+
}(SvelteComponent));
|
|
2286
|
+
/* src/modals/PassResetModal.svelte generated by Svelte v3.48.0 */
|
|
2287
|
+
function create_fragment$e(ctx) {
|
|
2288
|
+
var div3;
|
|
2289
|
+
var div0;
|
|
2290
|
+
var button;
|
|
2291
|
+
var backicon;
|
|
2292
|
+
var t0;
|
|
2293
|
+
var closebutton;
|
|
2294
|
+
var t1;
|
|
2295
|
+
var div2;
|
|
2296
|
+
var figureelement;
|
|
2297
|
+
var t2;
|
|
2298
|
+
var h2;
|
|
2299
|
+
var t4;
|
|
2300
|
+
var p;
|
|
2301
|
+
var t6;
|
|
2302
|
+
var form;
|
|
2303
|
+
var emailinput;
|
|
2304
|
+
var updating_emailInputValid;
|
|
2305
|
+
var t7;
|
|
2306
|
+
var submitbutton;
|
|
2307
|
+
var t8;
|
|
2308
|
+
var div1;
|
|
2309
|
+
var t11;
|
|
2310
|
+
var modalfooter;
|
|
2311
|
+
var current;
|
|
2312
|
+
var mounted;
|
|
2313
|
+
var dispose;
|
|
2314
|
+
backicon = new BackIcon({});
|
|
2315
|
+
closebutton = new CloseButton({
|
|
2316
|
+
props: { closeModal: /*closeModal*/ ctx[1] }
|
|
2317
|
+
});
|
|
2318
|
+
figureelement = new FigureElement({});
|
|
2319
|
+
function emailinput_emailInputValid_binding(value) {
|
|
2320
|
+
/*emailinput_emailInputValid_binding*/ ctx[6](value);
|
|
2321
|
+
}
|
|
2322
|
+
var emailinput_props = {};
|
|
2323
|
+
if ( /*emailInputValid*/ctx[2] !== void 0) {
|
|
2324
|
+
emailinput_props.emailInputValid = /*emailInputValid*/ ctx[2];
|
|
2325
|
+
}
|
|
2326
|
+
emailinput = new EmailInput({ props: emailinput_props });
|
|
2327
|
+
binding_callbacks.push(function () { return bind(emailinput, 'emailInputValid', emailinput_emailInputValid_binding); });
|
|
2328
|
+
submitbutton = new SubmitButton({
|
|
2329
|
+
props: {
|
|
2330
|
+
buttonText: "Send Link",
|
|
2331
|
+
isLoading: /*showLoader*/ ctx[3]
|
|
2332
|
+
}
|
|
2333
|
+
});
|
|
2334
|
+
modalfooter = new ModalFooter({});
|
|
2335
|
+
return {
|
|
2336
|
+
c: function () {
|
|
2337
|
+
div3 = element("div");
|
|
2338
|
+
div0 = element("div");
|
|
2339
|
+
button = element("button");
|
|
2340
|
+
create_component(backicon.$$.fragment);
|
|
2341
|
+
t0 = space();
|
|
2342
|
+
create_component(closebutton.$$.fragment);
|
|
2343
|
+
t1 = space();
|
|
2344
|
+
div2 = element("div");
|
|
2345
|
+
create_component(figureelement.$$.fragment);
|
|
2346
|
+
t2 = space();
|
|
2347
|
+
h2 = element("h2");
|
|
2348
|
+
h2.textContent = "Reset your password";
|
|
2349
|
+
t4 = space();
|
|
2350
|
+
p = element("p");
|
|
2351
|
+
p.textContent = "We’ll email you a secure link to reset the password for your account.";
|
|
2352
|
+
t6 = space();
|
|
2353
|
+
form = element("form");
|
|
2354
|
+
create_component(emailinput.$$.fragment);
|
|
2355
|
+
t7 = space();
|
|
2356
|
+
create_component(submitbutton.$$.fragment);
|
|
2357
|
+
t8 = space();
|
|
2358
|
+
div1 = element("div");
|
|
2359
|
+
div1.innerHTML = "<a class=\"ms-form__link\" href=\"#\">Still need help? <u>Contact us</u></a>";
|
|
2360
|
+
t11 = space();
|
|
2361
|
+
create_component(modalfooter.$$.fragment);
|
|
2362
|
+
attr(div0, "class", "ms-modal__back");
|
|
2363
|
+
attr(h2, "class", "ms-modal__title ms-modal__title--sub-text");
|
|
2364
|
+
attr(p, "class", "ms-modal__text");
|
|
2365
|
+
attr(div1, "class", "ms-form__flex ms-form__flex--centered");
|
|
2366
|
+
attr(form, "class", "ms-form");
|
|
2367
|
+
attr(form, "action", "");
|
|
2368
|
+
attr(form, "method", "post");
|
|
2369
|
+
attr(form, "autocomplete", "off");
|
|
2370
|
+
attr(div2, "class", "ms-modal__content");
|
|
2371
|
+
attr(div3, "class", "ms-modal");
|
|
2372
|
+
attr(div3, "id", "PasswordResetModal");
|
|
2373
|
+
},
|
|
2374
|
+
m: function (target, anchor) {
|
|
2375
|
+
insert(target, div3, anchor);
|
|
2376
|
+
append(div3, div0);
|
|
2377
|
+
append(div0, button);
|
|
2378
|
+
mount_component(backicon, button, null);
|
|
2379
|
+
append(div3, t0);
|
|
2380
|
+
mount_component(closebutton, div3, null);
|
|
2381
|
+
append(div3, t1);
|
|
2382
|
+
append(div3, div2);
|
|
2383
|
+
mount_component(figureelement, div2, null);
|
|
2384
|
+
append(div2, t2);
|
|
2385
|
+
append(div2, h2);
|
|
2386
|
+
append(div2, t4);
|
|
2387
|
+
append(div2, p);
|
|
2388
|
+
append(div2, t6);
|
|
2389
|
+
append(div2, form);
|
|
2390
|
+
mount_component(emailinput, form, null);
|
|
2391
|
+
append(form, t7);
|
|
2392
|
+
mount_component(submitbutton, form, null);
|
|
2393
|
+
append(form, t8);
|
|
2394
|
+
append(form, div1);
|
|
2395
|
+
append(div3, t11);
|
|
2396
|
+
mount_component(modalfooter, div3, null);
|
|
2397
|
+
current = true;
|
|
2398
|
+
if (!mounted) {
|
|
2399
|
+
dispose = [
|
|
2400
|
+
listen(button, "click", /*click_handler*/ ctx[5]),
|
|
2401
|
+
listen(form, "submit", stop_propagation(prevent_default(/*submitPasswordReset*/ ctx[4])))
|
|
2402
|
+
];
|
|
2403
|
+
mounted = true;
|
|
2404
|
+
}
|
|
2405
|
+
},
|
|
2406
|
+
p: function (ctx, _a) {
|
|
2407
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
2408
|
+
var closebutton_changes = {};
|
|
2409
|
+
if (dirty & /*closeModal*/ 2)
|
|
2410
|
+
closebutton_changes.closeModal = /*closeModal*/ ctx[1];
|
|
2411
|
+
closebutton.$set(closebutton_changes);
|
|
2412
|
+
var emailinput_changes = {};
|
|
2413
|
+
if (!updating_emailInputValid && dirty & /*emailInputValid*/ 4) {
|
|
2414
|
+
updating_emailInputValid = true;
|
|
2415
|
+
emailinput_changes.emailInputValid = /*emailInputValid*/ ctx[2];
|
|
2416
|
+
add_flush_callback(function () { return updating_emailInputValid = false; });
|
|
2417
|
+
}
|
|
2418
|
+
emailinput.$set(emailinput_changes);
|
|
2419
|
+
var submitbutton_changes = {};
|
|
2420
|
+
if (dirty & /*showLoader*/ 8)
|
|
2421
|
+
submitbutton_changes.isLoading = /*showLoader*/ ctx[3];
|
|
2422
|
+
submitbutton.$set(submitbutton_changes);
|
|
2423
|
+
},
|
|
2424
|
+
i: function (local) {
|
|
2425
|
+
if (current)
|
|
2426
|
+
return;
|
|
2427
|
+
transition_in(backicon.$$.fragment, local);
|
|
2428
|
+
transition_in(closebutton.$$.fragment, local);
|
|
2429
|
+
transition_in(figureelement.$$.fragment, local);
|
|
2430
|
+
transition_in(emailinput.$$.fragment, local);
|
|
2431
|
+
transition_in(submitbutton.$$.fragment, local);
|
|
2432
|
+
transition_in(modalfooter.$$.fragment, local);
|
|
2433
|
+
current = true;
|
|
2434
|
+
},
|
|
2435
|
+
o: function (local) {
|
|
2436
|
+
transition_out(backicon.$$.fragment, local);
|
|
2437
|
+
transition_out(closebutton.$$.fragment, local);
|
|
2438
|
+
transition_out(figureelement.$$.fragment, local);
|
|
2439
|
+
transition_out(emailinput.$$.fragment, local);
|
|
2440
|
+
transition_out(submitbutton.$$.fragment, local);
|
|
2441
|
+
transition_out(modalfooter.$$.fragment, local);
|
|
2442
|
+
current = false;
|
|
2443
|
+
},
|
|
2444
|
+
d: function (detaching) {
|
|
2445
|
+
if (detaching)
|
|
2446
|
+
detach(div3);
|
|
2447
|
+
destroy_component(backicon);
|
|
2448
|
+
destroy_component(closebutton);
|
|
2449
|
+
destroy_component(figureelement);
|
|
2450
|
+
destroy_component(emailinput);
|
|
2451
|
+
destroy_component(submitbutton);
|
|
2452
|
+
destroy_component(modalfooter);
|
|
2453
|
+
mounted = false;
|
|
2454
|
+
run_all(dispose);
|
|
2455
|
+
}
|
|
2456
|
+
};
|
|
2457
|
+
}
|
|
2458
|
+
function instance$7($$self, $$props, $$invalidate) {
|
|
2459
|
+
var closeModal = $$props.closeModal;
|
|
2460
|
+
var display = $$props.display;
|
|
2461
|
+
var emailInputValid = false;
|
|
2462
|
+
var showLoader = false;
|
|
2463
|
+
function submitPasswordReset(e) {
|
|
2464
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2465
|
+
var emailInput, err_3;
|
|
2466
|
+
return __generator(this, function (_a) {
|
|
2467
|
+
switch (_a.label) {
|
|
2468
|
+
case 0:
|
|
2469
|
+
emailInput = e.target[0];
|
|
2470
|
+
if (!emailInputValid)
|
|
2471
|
+
return [2 /*return*/];
|
|
2472
|
+
$$invalidate(3, showLoader = true);
|
|
2473
|
+
_a.label = 1;
|
|
2474
|
+
case 1:
|
|
2475
|
+
_a.trys.push([1, 3, , 4]);
|
|
2476
|
+
return [4 /*yield*/, window.$memberstackDom.sendMemberResetPasswordEmail({ email: emailInput.value })];
|
|
2477
|
+
case 2:
|
|
2478
|
+
_a.sent();
|
|
2479
|
+
$$invalidate(0, display = "reset_password");
|
|
2480
|
+
return [3 /*break*/, 4];
|
|
2481
|
+
case 3:
|
|
2482
|
+
err_3 = _a.sent();
|
|
2483
|
+
console.log(err_3);
|
|
2484
|
+
$$invalidate(3, showLoader = false);
|
|
2485
|
+
if (err_3.message) {
|
|
2486
|
+
window.$memberstackDom._showMessage(err_3.message, false);
|
|
2487
|
+
}
|
|
2488
|
+
return [3 /*break*/, 4];
|
|
2489
|
+
case 4: return [2 /*return*/];
|
|
2490
|
+
}
|
|
2491
|
+
});
|
|
2492
|
+
});
|
|
2493
|
+
}
|
|
2494
|
+
var click_handler = function () { return $$invalidate(0, display = "login"); };
|
|
2495
|
+
function emailinput_emailInputValid_binding(value) {
|
|
2496
|
+
emailInputValid = value;
|
|
2497
|
+
$$invalidate(2, emailInputValid);
|
|
2498
|
+
}
|
|
2499
|
+
$$self.$$set = function ($$props) {
|
|
2500
|
+
if ('closeModal' in $$props)
|
|
2501
|
+
$$invalidate(1, closeModal = $$props.closeModal);
|
|
2502
|
+
if ('display' in $$props)
|
|
2503
|
+
$$invalidate(0, display = $$props.display);
|
|
2504
|
+
};
|
|
2505
|
+
return [
|
|
2506
|
+
display,
|
|
2507
|
+
closeModal,
|
|
2508
|
+
emailInputValid,
|
|
2509
|
+
showLoader,
|
|
2510
|
+
submitPasswordReset,
|
|
2511
|
+
click_handler,
|
|
2512
|
+
emailinput_emailInputValid_binding
|
|
2513
|
+
];
|
|
2514
|
+
}
|
|
2515
|
+
var PassResetModal = /** @class */ (function (_super) {
|
|
2516
|
+
__extends(PassResetModal, _super);
|
|
2517
|
+
function PassResetModal(options) {
|
|
2518
|
+
var _this = _super.call(this) || this;
|
|
2519
|
+
init(_this, options, instance$7, create_fragment$e, safe_not_equal, { closeModal: 1, display: 0 });
|
|
2520
|
+
return _this;
|
|
2521
|
+
}
|
|
2522
|
+
return PassResetModal;
|
|
2523
|
+
}(SvelteComponent));
|
|
2524
|
+
/* src/modals/PassTokenModal.svelte generated by Svelte v3.48.0 */
|
|
2525
|
+
function create_if_block$2(ctx) {
|
|
2526
|
+
var div;
|
|
2527
|
+
var erroricon;
|
|
2528
|
+
var t;
|
|
2529
|
+
var current;
|
|
2530
|
+
erroricon = new ErrorIcon({});
|
|
2531
|
+
return {
|
|
2532
|
+
c: function () {
|
|
2533
|
+
div = element("div");
|
|
2534
|
+
create_component(erroricon.$$.fragment);
|
|
2535
|
+
t = text(" Please enter a valid token");
|
|
2536
|
+
attr(div, "class", "ms-form__error");
|
|
2537
|
+
},
|
|
2538
|
+
m: function (target, anchor) {
|
|
2539
|
+
insert(target, div, anchor);
|
|
2540
|
+
mount_component(erroricon, div, null);
|
|
2541
|
+
append(div, t);
|
|
2542
|
+
current = true;
|
|
2543
|
+
},
|
|
2544
|
+
i: function (local) {
|
|
2545
|
+
if (current)
|
|
2546
|
+
return;
|
|
2547
|
+
transition_in(erroricon.$$.fragment, local);
|
|
2548
|
+
current = true;
|
|
2549
|
+
},
|
|
2550
|
+
o: function (local) {
|
|
2551
|
+
transition_out(erroricon.$$.fragment, local);
|
|
2552
|
+
current = false;
|
|
2553
|
+
},
|
|
2554
|
+
d: function (detaching) {
|
|
2555
|
+
if (detaching)
|
|
2556
|
+
detach(div);
|
|
2557
|
+
destroy_component(erroricon);
|
|
2558
|
+
}
|
|
2559
|
+
};
|
|
2560
|
+
}
|
|
2561
|
+
function create_fragment$d(ctx) {
|
|
2562
|
+
var div4;
|
|
2563
|
+
var div0;
|
|
2564
|
+
var button;
|
|
2565
|
+
var backicon;
|
|
2566
|
+
var t0;
|
|
2567
|
+
var closebutton;
|
|
2568
|
+
var t1;
|
|
2569
|
+
var div3;
|
|
2570
|
+
var figureelement;
|
|
2571
|
+
var t2;
|
|
2572
|
+
var h2;
|
|
2573
|
+
var t4;
|
|
2574
|
+
var form;
|
|
2575
|
+
var div1;
|
|
2576
|
+
var label;
|
|
2577
|
+
var t6;
|
|
2578
|
+
var fieldset;
|
|
2579
|
+
var t12;
|
|
2580
|
+
var t13;
|
|
2581
|
+
var passwordinput;
|
|
2582
|
+
var updating_passwordInputValid;
|
|
2583
|
+
var t14;
|
|
2584
|
+
var submitbutton;
|
|
2585
|
+
var t15;
|
|
2586
|
+
var div2;
|
|
2587
|
+
var t18;
|
|
2588
|
+
var modalfooter;
|
|
2589
|
+
var current;
|
|
2590
|
+
var mounted;
|
|
2591
|
+
var dispose;
|
|
2592
|
+
backicon = new BackIcon({});
|
|
2593
|
+
closebutton = new CloseButton({
|
|
2594
|
+
props: { closeModal: /*closeModal*/ ctx[1] }
|
|
2595
|
+
});
|
|
2596
|
+
figureelement = new FigureElement({});
|
|
2597
|
+
var if_block = !ctx[2] && create_if_block$2();
|
|
2598
|
+
function passwordinput_passwordInputValid_binding(value) {
|
|
2599
|
+
/*passwordinput_passwordInputValid_binding*/ ctx[7](value);
|
|
2600
|
+
}
|
|
2601
|
+
var passwordinput_props = { passwordLabel: "Choose a new password" };
|
|
2602
|
+
if ( /*passwordInputValid*/ctx[3] !== void 0) {
|
|
2603
|
+
passwordinput_props.passwordInputValid = /*passwordInputValid*/ ctx[3];
|
|
2604
|
+
}
|
|
2605
|
+
passwordinput = new PasswordInput({ props: passwordinput_props });
|
|
2606
|
+
binding_callbacks.push(function () { return bind(passwordinput, 'passwordInputValid', passwordinput_passwordInputValid_binding); });
|
|
2607
|
+
submitbutton = new SubmitButton({
|
|
2608
|
+
props: {
|
|
2609
|
+
buttonText: "Confirm & Reset",
|
|
2610
|
+
isLoading: false
|
|
2611
|
+
}
|
|
2612
|
+
});
|
|
2613
|
+
modalfooter = new ModalFooter({});
|
|
2614
|
+
return {
|
|
2615
|
+
c: function () {
|
|
2616
|
+
div4 = element("div");
|
|
2617
|
+
div0 = element("div");
|
|
2618
|
+
button = element("button");
|
|
2619
|
+
create_component(backicon.$$.fragment);
|
|
2620
|
+
t0 = space();
|
|
2621
|
+
create_component(closebutton.$$.fragment);
|
|
2622
|
+
t1 = space();
|
|
2623
|
+
div3 = element("div");
|
|
2624
|
+
create_component(figureelement.$$.fragment);
|
|
2625
|
+
t2 = space();
|
|
2626
|
+
h2 = element("h2");
|
|
2627
|
+
h2.textContent = "Reset your password";
|
|
2628
|
+
t4 = space();
|
|
2629
|
+
form = element("form");
|
|
2630
|
+
div1 = element("div");
|
|
2631
|
+
label = element("label");
|
|
2632
|
+
label.textContent = "Enter your 6-digit token";
|
|
2633
|
+
t6 = space();
|
|
2634
|
+
fieldset = element("fieldset");
|
|
2635
|
+
fieldset.innerHTML = "<input name=\"token\" class=\"ms-form__input ms-form__input--token\" required=\"\"/> \n <input name=\"token\" class=\"ms-form__input ms-form__input--token\" required=\"\"/> \n <input name=\"token\" class=\"ms-form__input ms-form__input--token\" required=\"\"/> \n <input name=\"token\" class=\"ms-form__input ms-form__input--token\" required=\"\"/> \n <input name=\"token\" class=\"ms-form__input ms-form__input--token\" required=\"\"/> \n <input name=\"token\" class=\"ms-form__input ms-form__input--token\"/>";
|
|
2636
|
+
t12 = space();
|
|
2637
|
+
if (if_block)
|
|
2638
|
+
if_block.c();
|
|
2639
|
+
t13 = space();
|
|
2640
|
+
create_component(passwordinput.$$.fragment);
|
|
2641
|
+
t14 = space();
|
|
2642
|
+
create_component(submitbutton.$$.fragment);
|
|
2643
|
+
t15 = space();
|
|
2644
|
+
div2 = element("div");
|
|
2645
|
+
div2.innerHTML = "<a class=\"ms-form__link\" href=\"#\">Still need help? <u>Contact us</u></a>";
|
|
2646
|
+
t18 = space();
|
|
2647
|
+
create_component(modalfooter.$$.fragment);
|
|
2648
|
+
attr(div0, "class", "ms-modal__back");
|
|
2649
|
+
attr(h2, "class", "ms-modal__title");
|
|
2650
|
+
attr(label, "class", "ms-form__label");
|
|
2651
|
+
attr(label, "for", "token-fieldset");
|
|
2652
|
+
attr(fieldset, "class", "ms-form__fieldset");
|
|
2653
|
+
attr(fieldset, "name", "token-fieldset");
|
|
2654
|
+
attr(div1, "class", "ms-form__group");
|
|
2655
|
+
attr(div2, "class", "ms-form__flex ms-form__flex--centered");
|
|
2656
|
+
attr(form, "class", "ms-form");
|
|
2657
|
+
attr(form, "action", "");
|
|
2658
|
+
attr(form, "method", "post");
|
|
2659
|
+
attr(form, "autocomplete", "off");
|
|
2660
|
+
attr(div3, "class", "ms-modal__content");
|
|
2661
|
+
attr(div4, "class", "ms-modal");
|
|
2662
|
+
attr(div4, "id", "PasswordTokenModal");
|
|
2663
|
+
},
|
|
2664
|
+
m: function (target, anchor) {
|
|
2665
|
+
insert(target, div4, anchor);
|
|
2666
|
+
append(div4, div0);
|
|
2667
|
+
append(div0, button);
|
|
2668
|
+
mount_component(backicon, button, null);
|
|
2669
|
+
append(div4, t0);
|
|
2670
|
+
mount_component(closebutton, div4, null);
|
|
2671
|
+
append(div4, t1);
|
|
2672
|
+
append(div4, div3);
|
|
2673
|
+
mount_component(figureelement, div3, null);
|
|
2674
|
+
append(div3, t2);
|
|
2675
|
+
append(div3, h2);
|
|
2676
|
+
append(div3, t4);
|
|
2677
|
+
append(div3, form);
|
|
2678
|
+
append(form, div1);
|
|
2679
|
+
append(div1, label);
|
|
2680
|
+
append(div1, t6);
|
|
2681
|
+
append(div1, fieldset);
|
|
2682
|
+
append(div1, t12);
|
|
2683
|
+
if (if_block)
|
|
2684
|
+
if_block.m(div1, null);
|
|
2685
|
+
append(form, t13);
|
|
2686
|
+
mount_component(passwordinput, form, null);
|
|
2687
|
+
append(form, t14);
|
|
2688
|
+
mount_component(submitbutton, form, null);
|
|
2689
|
+
append(form, t15);
|
|
2690
|
+
append(form, div2);
|
|
2691
|
+
append(div4, t18);
|
|
2692
|
+
mount_component(modalfooter, div4, null);
|
|
2693
|
+
current = true;
|
|
2694
|
+
if (!mounted) {
|
|
2695
|
+
dispose = [
|
|
2696
|
+
listen(button, "click", /*click_handler*/ ctx[6]),
|
|
2697
|
+
listen(form, "submit", stop_propagation(prevent_default(/*submitPasswordToken*/ ctx[4])))
|
|
2698
|
+
];
|
|
2699
|
+
mounted = true;
|
|
2700
|
+
}
|
|
2701
|
+
},
|
|
2702
|
+
p: function (ctx, _a) {
|
|
2703
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
2704
|
+
var closebutton_changes = {};
|
|
2705
|
+
if (dirty & /*closeModal*/ 2)
|
|
2706
|
+
closebutton_changes.closeModal = /*closeModal*/ ctx[1];
|
|
2707
|
+
closebutton.$set(closebutton_changes);
|
|
2708
|
+
if (!ctx[2]) {
|
|
2709
|
+
if (if_block) {
|
|
2710
|
+
if (dirty & /*tokenInputValid*/ 4) {
|
|
2711
|
+
transition_in(if_block, 1);
|
|
2712
|
+
}
|
|
2713
|
+
}
|
|
2714
|
+
else {
|
|
2715
|
+
if_block = create_if_block$2();
|
|
2716
|
+
if_block.c();
|
|
2717
|
+
transition_in(if_block, 1);
|
|
2718
|
+
if_block.m(div1, null);
|
|
2719
|
+
}
|
|
2720
|
+
}
|
|
2721
|
+
else if (if_block) {
|
|
2722
|
+
group_outros();
|
|
2723
|
+
transition_out(if_block, 1, 1, function () {
|
|
2724
|
+
if_block = null;
|
|
2725
|
+
});
|
|
2726
|
+
check_outros();
|
|
2727
|
+
}
|
|
2728
|
+
var passwordinput_changes = {};
|
|
2729
|
+
if (!updating_passwordInputValid && dirty & /*passwordInputValid*/ 8) {
|
|
2730
|
+
updating_passwordInputValid = true;
|
|
2731
|
+
passwordinput_changes.passwordInputValid = /*passwordInputValid*/ ctx[3];
|
|
2732
|
+
add_flush_callback(function () { return updating_passwordInputValid = false; });
|
|
2733
|
+
}
|
|
2734
|
+
passwordinput.$set(passwordinput_changes);
|
|
2735
|
+
},
|
|
2736
|
+
i: function (local) {
|
|
2737
|
+
if (current)
|
|
2738
|
+
return;
|
|
2739
|
+
transition_in(backicon.$$.fragment, local);
|
|
2740
|
+
transition_in(closebutton.$$.fragment, local);
|
|
2741
|
+
transition_in(figureelement.$$.fragment, local);
|
|
2742
|
+
transition_in(if_block);
|
|
2743
|
+
transition_in(passwordinput.$$.fragment, local);
|
|
2744
|
+
transition_in(submitbutton.$$.fragment, local);
|
|
2745
|
+
transition_in(modalfooter.$$.fragment, local);
|
|
2746
|
+
current = true;
|
|
2747
|
+
},
|
|
2748
|
+
o: function (local) {
|
|
2749
|
+
transition_out(backicon.$$.fragment, local);
|
|
2750
|
+
transition_out(closebutton.$$.fragment, local);
|
|
2751
|
+
transition_out(figureelement.$$.fragment, local);
|
|
2752
|
+
transition_out(if_block);
|
|
2753
|
+
transition_out(passwordinput.$$.fragment, local);
|
|
2754
|
+
transition_out(submitbutton.$$.fragment, local);
|
|
2755
|
+
transition_out(modalfooter.$$.fragment, local);
|
|
2756
|
+
current = false;
|
|
2757
|
+
},
|
|
2758
|
+
d: function (detaching) {
|
|
2759
|
+
if (detaching)
|
|
2760
|
+
detach(div4);
|
|
2761
|
+
destroy_component(backicon);
|
|
2762
|
+
destroy_component(closebutton);
|
|
2763
|
+
destroy_component(figureelement);
|
|
2764
|
+
if (if_block)
|
|
2765
|
+
if_block.d();
|
|
2766
|
+
destroy_component(passwordinput);
|
|
2767
|
+
destroy_component(submitbutton);
|
|
2768
|
+
destroy_component(modalfooter);
|
|
2769
|
+
mounted = false;
|
|
2770
|
+
run_all(dispose);
|
|
2771
|
+
}
|
|
2772
|
+
};
|
|
2773
|
+
}
|
|
2774
|
+
function instance$6($$self, $$props, $$invalidate) {
|
|
2775
|
+
var closeModal = $$props.closeModal;
|
|
2776
|
+
var display = $$props.display;
|
|
2777
|
+
var onSuccessPasswordReset = $$props.onSuccessPasswordReset;
|
|
2778
|
+
var tokenInputValid = true;
|
|
2779
|
+
var passwordInputValid = true;
|
|
2780
|
+
onMount(function () {
|
|
2781
|
+
var tokenElements = __spreadArray([], __read(document.querySelectorAll("input.ms-form__input--token")), false);
|
|
2782
|
+
tokenElements.forEach(function (ele, index) {
|
|
2783
|
+
ele.addEventListener("keydown", function (e) {
|
|
2784
|
+
if (e.keyCode === 8 && e.target.value === "")
|
|
2785
|
+
tokenElements[Math.max(0, index - 1)].focus();
|
|
2786
|
+
});
|
|
2787
|
+
ele.addEventListener("input", function (e) {
|
|
2788
|
+
var _a = __read(e.target.value), first = _a[0], rest = _a.slice(1);
|
|
2789
|
+
e.target.value = first !== null && first !== void 0 ? first : "";
|
|
2790
|
+
var lastInputBox = index === tokenElements.length - 1;
|
|
2791
|
+
var insertedContent = first !== undefined;
|
|
2792
|
+
if (insertedContent && !lastInputBox) {
|
|
2793
|
+
tokenElements[index + 1].focus();
|
|
2794
|
+
tokenElements[index + 1].value = rest.join("");
|
|
2795
|
+
tokenElements[index + 1].dispatchEvent(new Event("input"));
|
|
2796
|
+
}
|
|
2797
|
+
});
|
|
2798
|
+
});
|
|
2799
|
+
});
|
|
2800
|
+
var validateFields = function (e) {
|
|
2801
|
+
var tokenElements = __spreadArray([], __read(document.querySelectorAll("input.ms-form__input--token")), false);
|
|
2802
|
+
var hasEmpty = tokenElements.some(function (el) {
|
|
2803
|
+
if (!el.value) {
|
|
2804
|
+
return true;
|
|
2805
|
+
}
|
|
2806
|
+
return false;
|
|
2807
|
+
});
|
|
2808
|
+
if (hasEmpty) {
|
|
2809
|
+
$$invalidate(2, tokenInputValid = false);
|
|
2810
|
+
}
|
|
2811
|
+
else {
|
|
2812
|
+
$$invalidate(2, tokenInputValid = true);
|
|
2813
|
+
}
|
|
2814
|
+
return !hasEmpty;
|
|
2815
|
+
};
|
|
2816
|
+
function submitPasswordToken(e) {
|
|
2817
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2818
|
+
var passwordInput, isValid, token, data, err_4;
|
|
2819
|
+
return __generator(this, function (_a) {
|
|
2820
|
+
switch (_a.label) {
|
|
2821
|
+
case 0:
|
|
2822
|
+
passwordInput = e.target[7];
|
|
2823
|
+
isValid = validateFields();
|
|
2824
|
+
if (!isValid)
|
|
2825
|
+
return [2 /*return*/];
|
|
2826
|
+
token = __spreadArray([], __read(document.getElementsByName("token")), false).filter(function (_a) {
|
|
2827
|
+
var name = _a.name;
|
|
2828
|
+
return name;
|
|
2829
|
+
}).map(function (_a) {
|
|
2830
|
+
var value = _a.value;
|
|
2831
|
+
return value;
|
|
2832
|
+
}).join("");
|
|
2833
|
+
_a.label = 1;
|
|
2834
|
+
case 1:
|
|
2835
|
+
_a.trys.push([1, 3, , 4]);
|
|
2836
|
+
return [4 /*yield*/, window.$memberstackDom.resetMemberPassword({ token: token, newPassword: passwordInput.value })];
|
|
2837
|
+
case 2:
|
|
2838
|
+
data = (_a.sent()).data;
|
|
2839
|
+
onSuccessPasswordReset({ type: "PASSWORD_RESET", data: data });
|
|
2840
|
+
showLoader = false;
|
|
2841
|
+
return [3 /*break*/, 4];
|
|
2842
|
+
case 3:
|
|
2843
|
+
err_4 = _a.sent();
|
|
2844
|
+
console.log(err_4);
|
|
2845
|
+
//
|
|
2846
|
+
if (err_4.message) {
|
|
2847
|
+
window.$memberstackDom._showMessage(err_4.message, true);
|
|
2848
|
+
}
|
|
2849
|
+
return [3 /*break*/, 4];
|
|
2850
|
+
case 4: return [2 /*return*/];
|
|
2851
|
+
}
|
|
2852
|
+
});
|
|
2853
|
+
});
|
|
2854
|
+
}
|
|
2855
|
+
var click_handler = function () { return $$invalidate(0, display = "forgot_password"); };
|
|
2856
|
+
function passwordinput_passwordInputValid_binding(value) {
|
|
2857
|
+
passwordInputValid = value;
|
|
2858
|
+
$$invalidate(3, passwordInputValid);
|
|
2859
|
+
}
|
|
2860
|
+
$$self.$$set = function ($$props) {
|
|
2861
|
+
if ('closeModal' in $$props)
|
|
2862
|
+
$$invalidate(1, closeModal = $$props.closeModal);
|
|
2863
|
+
if ('display' in $$props)
|
|
2864
|
+
$$invalidate(0, display = $$props.display);
|
|
2865
|
+
if ('onSuccessPasswordReset' in $$props)
|
|
2866
|
+
$$invalidate(5, onSuccessPasswordReset = $$props.onSuccessPasswordReset);
|
|
2867
|
+
};
|
|
2868
|
+
return [
|
|
2869
|
+
display,
|
|
2870
|
+
closeModal,
|
|
2871
|
+
tokenInputValid,
|
|
2872
|
+
passwordInputValid,
|
|
2873
|
+
submitPasswordToken,
|
|
2874
|
+
onSuccessPasswordReset,
|
|
2875
|
+
click_handler,
|
|
2876
|
+
passwordinput_passwordInputValid_binding
|
|
2877
|
+
];
|
|
2878
|
+
}
|
|
2879
|
+
var PassTokenModal = /** @class */ (function (_super) {
|
|
2880
|
+
__extends(PassTokenModal, _super);
|
|
2881
|
+
function PassTokenModal(options) {
|
|
2882
|
+
var _this = _super.call(this) || this;
|
|
2883
|
+
init(_this, options, instance$6, create_fragment$d, safe_not_equal, {
|
|
2884
|
+
closeModal: 1,
|
|
2885
|
+
display: 0,
|
|
2886
|
+
onSuccessPasswordReset: 5
|
|
2887
|
+
});
|
|
2888
|
+
return _this;
|
|
2889
|
+
}
|
|
2890
|
+
return PassTokenModal;
|
|
2891
|
+
}(SvelteComponent));
|
|
2892
|
+
/* src/icons/ProfileIcon.svelte generated by Svelte v3.48.0 */
|
|
2893
|
+
function create_fragment$c(ctx) {
|
|
2894
|
+
var svg;
|
|
2895
|
+
var path;
|
|
2896
|
+
return {
|
|
2897
|
+
c: function () {
|
|
2898
|
+
svg = svg_element("svg");
|
|
2899
|
+
path = svg_element("path");
|
|
2900
|
+
attr(path, "d", "m8 8c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z");
|
|
2901
|
+
attr(path, "fill", "currentColor");
|
|
2902
|
+
attr(svg, "fill", "none");
|
|
2903
|
+
attr(svg, "viewBox", "0 0 16 16");
|
|
2904
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
2905
|
+
},
|
|
2906
|
+
m: function (target, anchor) {
|
|
2907
|
+
insert(target, svg, anchor);
|
|
2908
|
+
append(svg, path);
|
|
2909
|
+
},
|
|
2910
|
+
p: noop,
|
|
2911
|
+
i: noop,
|
|
2912
|
+
o: noop,
|
|
2913
|
+
d: function (detaching) {
|
|
2914
|
+
if (detaching)
|
|
2915
|
+
detach(svg);
|
|
2916
|
+
}
|
|
2917
|
+
};
|
|
2918
|
+
}
|
|
2919
|
+
var ProfileIcon = /** @class */ (function (_super) {
|
|
2920
|
+
__extends(ProfileIcon, _super);
|
|
2921
|
+
function ProfileIcon(options) {
|
|
2922
|
+
var _this = _super.call(this) || this;
|
|
2923
|
+
init(_this, options, null, create_fragment$c, safe_not_equal, {});
|
|
2924
|
+
return _this;
|
|
2925
|
+
}
|
|
2926
|
+
return ProfileIcon;
|
|
2927
|
+
}(SvelteComponent));
|
|
2928
|
+
/* src/icons/SecurityIcon.svelte generated by Svelte v3.48.0 */
|
|
2929
|
+
function create_fragment$b(ctx) {
|
|
2930
|
+
var svg;
|
|
2931
|
+
var path;
|
|
2932
|
+
return {
|
|
2933
|
+
c: function () {
|
|
2934
|
+
svg = svg_element("svg");
|
|
2935
|
+
path = svg_element("path");
|
|
2936
|
+
attr(path, "d", "m9 0-9 4v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12v-6l-9-4zm0 10.99h7c-0.53 4.12-3.28 7.79-7 8.94v-8.93h-7v-5.7l7-3.11v8.8z");
|
|
2937
|
+
attr(path, "fill", "currentColor");
|
|
2938
|
+
attr(svg, "fill", "none");
|
|
2939
|
+
attr(svg, "viewBox", "0 0 18 22");
|
|
2940
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
2941
|
+
},
|
|
2942
|
+
m: function (target, anchor) {
|
|
2943
|
+
insert(target, svg, anchor);
|
|
2944
|
+
append(svg, path);
|
|
2945
|
+
},
|
|
2946
|
+
p: noop,
|
|
2947
|
+
i: noop,
|
|
2948
|
+
o: noop,
|
|
2949
|
+
d: function (detaching) {
|
|
2950
|
+
if (detaching)
|
|
2951
|
+
detach(svg);
|
|
2952
|
+
}
|
|
2953
|
+
};
|
|
2954
|
+
}
|
|
2955
|
+
var SecurityIcon = /** @class */ (function (_super) {
|
|
2956
|
+
__extends(SecurityIcon, _super);
|
|
2957
|
+
function SecurityIcon(options) {
|
|
2958
|
+
var _this = _super.call(this) || this;
|
|
2959
|
+
init(_this, options, null, create_fragment$b, safe_not_equal, {});
|
|
2960
|
+
return _this;
|
|
2961
|
+
}
|
|
2962
|
+
return SecurityIcon;
|
|
2963
|
+
}(SvelteComponent));
|
|
2964
|
+
/* src/icons/ProductsIcon.svelte generated by Svelte v3.48.0 */
|
|
2965
|
+
function create_fragment$a(ctx) {
|
|
2966
|
+
var svg;
|
|
2967
|
+
var path;
|
|
2968
|
+
return {
|
|
2969
|
+
c: function () {
|
|
2970
|
+
svg = svg_element("svg");
|
|
2971
|
+
path = svg_element("path");
|
|
2972
|
+
attr(path, "d", "m14.55 11c0.75 0 1.41-0.41 1.75-1.03l3.58-6.49c0.37-0.66-0.11-1.48-0.87-1.48h-14.8l-0.94-2h-3.27v2h2l3.6 7.59-1.35 2.44c-0.73 1.34 0.23 2.97 1.75 2.97h12v-2h-12l1.1-2h7.45zm-9.39-7h12.15l-2.76 5h-7.02l-2.37-5zm0.84 12c-1.1 0-1.99 0.9-1.99 2s0.89 2 1.99 2 2-0.9 2-2-0.9-2-2-2zm10 0c-1.1 0-1.99 0.9-1.99 2s0.89 2 1.99 2 2-0.9 2-2-0.9-2-2-2z");
|
|
2973
|
+
attr(path, "fill", "currentColor");
|
|
2974
|
+
attr(svg, "fill", "none");
|
|
2975
|
+
attr(svg, "viewBox", "0 0 21 20");
|
|
2976
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
2977
|
+
},
|
|
2978
|
+
m: function (target, anchor) {
|
|
2979
|
+
insert(target, svg, anchor);
|
|
2980
|
+
append(svg, path);
|
|
2981
|
+
},
|
|
2982
|
+
p: noop,
|
|
2983
|
+
i: noop,
|
|
2984
|
+
o: noop,
|
|
2985
|
+
d: function (detaching) {
|
|
2986
|
+
if (detaching)
|
|
2987
|
+
detach(svg);
|
|
2988
|
+
}
|
|
2989
|
+
};
|
|
2990
|
+
}
|
|
2991
|
+
var ProductsIcon = /** @class */ (function (_super) {
|
|
2992
|
+
__extends(ProductsIcon, _super);
|
|
2993
|
+
function ProductsIcon(options) {
|
|
2994
|
+
var _this = _super.call(this) || this;
|
|
2995
|
+
init(_this, options, null, create_fragment$a, safe_not_equal, {});
|
|
2996
|
+
return _this;
|
|
2997
|
+
}
|
|
2998
|
+
return ProductsIcon;
|
|
2999
|
+
}(SvelteComponent));
|
|
3000
|
+
/* src/icons/InvoicesIcon.svelte generated by Svelte v3.48.0 */
|
|
3001
|
+
function create_fragment$9(ctx) {
|
|
3002
|
+
var svg;
|
|
3003
|
+
var path0;
|
|
3004
|
+
var path1;
|
|
3005
|
+
var path2;
|
|
3006
|
+
var path3;
|
|
3007
|
+
var path4;
|
|
3008
|
+
return {
|
|
3009
|
+
c: function () {
|
|
3010
|
+
svg = svg_element("svg");
|
|
3011
|
+
path0 = svg_element("path");
|
|
3012
|
+
path1 = svg_element("path");
|
|
3013
|
+
path2 = svg_element("path");
|
|
3014
|
+
path3 = svg_element("path");
|
|
3015
|
+
path4 = svg_element("path");
|
|
3016
|
+
attr(path0, "d", "m16.5 1.5-1.5-1.5-1.5 1.5-1.5-1.5-1.5 1.5-1.5-1.5-1.5 1.5-1.5-1.5-1.5 1.5-1.5-1.5v14h-3v3c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3v-17l-1.5 1.5zm-4.5 16.5h-9c-0.55 0-1-0.45-1-1v-1h10v2zm4-1c0 0.55-0.45 1-1 1s-1-0.45-1-1v-3h-9v-11h11v14z");
|
|
3017
|
+
attr(path0, "fill", "currentColor");
|
|
3018
|
+
attr(path1, "d", "M12 5H6V7H12V5Z");
|
|
3019
|
+
attr(path1, "fill", "currentColor");
|
|
3020
|
+
attr(path2, "d", "m15 5h-2v2h2v-2z");
|
|
3021
|
+
attr(path2, "fill", "currentColor");
|
|
3022
|
+
attr(path3, "d", "m12 8h-6v2h6v-2z");
|
|
3023
|
+
attr(path3, "fill", "currentColor");
|
|
3024
|
+
attr(path4, "d", "m15 8h-2v2h2v-2z");
|
|
3025
|
+
attr(path4, "fill", "currentColor");
|
|
3026
|
+
attr(svg, "viewBox", "0 0 18 20");
|
|
3027
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
3028
|
+
},
|
|
3029
|
+
m: function (target, anchor) {
|
|
3030
|
+
insert(target, svg, anchor);
|
|
3031
|
+
append(svg, path0);
|
|
3032
|
+
append(svg, path1);
|
|
3033
|
+
append(svg, path2);
|
|
3034
|
+
append(svg, path3);
|
|
3035
|
+
append(svg, path4);
|
|
3036
|
+
},
|
|
3037
|
+
p: noop,
|
|
3038
|
+
i: noop,
|
|
3039
|
+
o: noop,
|
|
3040
|
+
d: function (detaching) {
|
|
3041
|
+
if (detaching)
|
|
3042
|
+
detach(svg);
|
|
3043
|
+
}
|
|
3044
|
+
};
|
|
3045
|
+
}
|
|
3046
|
+
var InvoicesIcon = /** @class */ (function (_super) {
|
|
3047
|
+
__extends(InvoicesIcon, _super);
|
|
3048
|
+
function InvoicesIcon(options) {
|
|
3049
|
+
var _this = _super.call(this) || this;
|
|
3050
|
+
init(_this, options, null, create_fragment$9, safe_not_equal, {});
|
|
3051
|
+
return _this;
|
|
3052
|
+
}
|
|
3053
|
+
return InvoicesIcon;
|
|
3054
|
+
}(SvelteComponent));
|
|
3055
|
+
/* src/icons/PaymentIcon.svelte generated by Svelte v3.48.0 */
|
|
3056
|
+
function create_fragment$8(ctx) {
|
|
3057
|
+
var svg;
|
|
3058
|
+
var path;
|
|
3059
|
+
return {
|
|
3060
|
+
c: function () {
|
|
3061
|
+
svg = svg_element("svg");
|
|
3062
|
+
path = svg_element("path");
|
|
3063
|
+
attr(path, "d", "m18 0h-16c-1.11 0-1.99 0.89-1.99 2l-0.01 12c0 1.11 0.89 2 2 2h16c1.11 0 2-0.89 2-2v-12c0-1.11-0.89-2-2-2zm0 14h-16v-6h16v6zm0-10h-16v-2h16v2z");
|
|
3064
|
+
attr(path, "fill", "currentColor");
|
|
3065
|
+
attr(svg, "fill", "none");
|
|
3066
|
+
attr(svg, "viewBox", "0 0 20 16");
|
|
3067
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
3068
|
+
},
|
|
3069
|
+
m: function (target, anchor) {
|
|
3070
|
+
insert(target, svg, anchor);
|
|
3071
|
+
append(svg, path);
|
|
3072
|
+
},
|
|
3073
|
+
p: noop,
|
|
3074
|
+
i: noop,
|
|
3075
|
+
o: noop,
|
|
3076
|
+
d: function (detaching) {
|
|
3077
|
+
if (detaching)
|
|
3078
|
+
detach(svg);
|
|
3079
|
+
}
|
|
3080
|
+
};
|
|
3081
|
+
}
|
|
3082
|
+
var PaymentIcon = /** @class */ (function (_super) {
|
|
3083
|
+
__extends(PaymentIcon, _super);
|
|
3084
|
+
function PaymentIcon(options) {
|
|
3085
|
+
var _this = _super.call(this) || this;
|
|
3086
|
+
init(_this, options, null, create_fragment$8, safe_not_equal, {});
|
|
3087
|
+
return _this;
|
|
3088
|
+
}
|
|
3089
|
+
return PaymentIcon;
|
|
3090
|
+
}(SvelteComponent));
|
|
3091
|
+
/* src/icons/LogoutIcon.svelte generated by Svelte v3.48.0 */
|
|
3092
|
+
function create_fragment$7(ctx) {
|
|
3093
|
+
var svg;
|
|
3094
|
+
var path;
|
|
3095
|
+
return {
|
|
3096
|
+
c: function () {
|
|
3097
|
+
svg = svg_element("svg");
|
|
3098
|
+
path = svg_element("path");
|
|
3099
|
+
attr(path, "d", "M16 7H3.83L9.42 1.41L8 0L0 8L8 16L9.41 14.59L3.83 9H16V7Z");
|
|
3100
|
+
attr(path, "fill", "currentColor");
|
|
3101
|
+
attr(svg, "width", "16");
|
|
3102
|
+
attr(svg, "height", "16");
|
|
3103
|
+
attr(svg, "viewBox", "0 0 16 16");
|
|
3104
|
+
attr(svg, "fill", "none");
|
|
3105
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
3106
|
+
},
|
|
3107
|
+
m: function (target, anchor) {
|
|
3108
|
+
insert(target, svg, anchor);
|
|
3109
|
+
append(svg, path);
|
|
3110
|
+
},
|
|
3111
|
+
p: noop,
|
|
3112
|
+
i: noop,
|
|
3113
|
+
o: noop,
|
|
3114
|
+
d: function (detaching) {
|
|
3115
|
+
if (detaching)
|
|
3116
|
+
detach(svg);
|
|
3117
|
+
}
|
|
3118
|
+
};
|
|
3119
|
+
}
|
|
3120
|
+
var LogoutIcon = /** @class */ (function (_super) {
|
|
3121
|
+
__extends(LogoutIcon, _super);
|
|
3122
|
+
function LogoutIcon(options) {
|
|
3123
|
+
var _this = _super.call(this) || this;
|
|
3124
|
+
init(_this, options, null, create_fragment$7, safe_not_equal, {});
|
|
3125
|
+
return _this;
|
|
3126
|
+
}
|
|
3127
|
+
return LogoutIcon;
|
|
3128
|
+
}(SvelteComponent));
|
|
3129
|
+
/* src/components/ProfileModalNav.svelte generated by Svelte v3.48.0 */
|
|
3130
|
+
function create_fragment$6(ctx) {
|
|
3131
|
+
var div0;
|
|
3132
|
+
var profileicon;
|
|
3133
|
+
var t0;
|
|
3134
|
+
var t1;
|
|
3135
|
+
var div1;
|
|
3136
|
+
var securityicon;
|
|
3137
|
+
var t2;
|
|
3138
|
+
var t3;
|
|
3139
|
+
var div2;
|
|
3140
|
+
var productsicon;
|
|
3141
|
+
var t4;
|
|
3142
|
+
var t5;
|
|
3143
|
+
var div3;
|
|
3144
|
+
var invoicesicon;
|
|
3145
|
+
var t6;
|
|
3146
|
+
var t7;
|
|
3147
|
+
var div4;
|
|
3148
|
+
var paymenticon;
|
|
3149
|
+
var t8;
|
|
3150
|
+
var t9;
|
|
3151
|
+
var div5;
|
|
3152
|
+
var logouticon;
|
|
3153
|
+
var t10;
|
|
3154
|
+
var current;
|
|
3155
|
+
var mounted;
|
|
3156
|
+
var dispose;
|
|
3157
|
+
profileicon = new ProfileIcon({});
|
|
3158
|
+
securityicon = new SecurityIcon({});
|
|
3159
|
+
productsicon = new ProductsIcon({});
|
|
3160
|
+
invoicesicon = new InvoicesIcon({});
|
|
3161
|
+
paymenticon = new PaymentIcon({});
|
|
3162
|
+
logouticon = new LogoutIcon({});
|
|
3163
|
+
return {
|
|
3164
|
+
c: function () {
|
|
3165
|
+
div0 = element("div");
|
|
3166
|
+
create_component(profileicon.$$.fragment);
|
|
3167
|
+
t0 = text(" Profile");
|
|
3168
|
+
t1 = space();
|
|
3169
|
+
div1 = element("div");
|
|
3170
|
+
create_component(securityicon.$$.fragment);
|
|
3171
|
+
t2 = text(" Security");
|
|
3172
|
+
t3 = space();
|
|
3173
|
+
div2 = element("div");
|
|
3174
|
+
create_component(productsicon.$$.fragment);
|
|
3175
|
+
t4 = text(" Products");
|
|
3176
|
+
t5 = space();
|
|
3177
|
+
div3 = element("div");
|
|
3178
|
+
create_component(invoicesicon.$$.fragment);
|
|
3179
|
+
t6 = text(" Invoices");
|
|
3180
|
+
t7 = space();
|
|
3181
|
+
div4 = element("div");
|
|
3182
|
+
create_component(paymenticon.$$.fragment);
|
|
3183
|
+
t8 = text(" Payment Methods");
|
|
3184
|
+
t9 = space();
|
|
3185
|
+
div5 = element("div");
|
|
3186
|
+
create_component(logouticon.$$.fragment);
|
|
3187
|
+
t10 = text(" Logout");
|
|
3188
|
+
attr(div0, "class", "ms-modal__profile-option ");
|
|
3189
|
+
toggle_class(div0, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "profile");
|
|
3190
|
+
attr(div1, "class", "ms-modal__profile-option");
|
|
3191
|
+
toggle_class(div1, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "security" || /*displayProfile*/ ctx[0] === "changePassword");
|
|
3192
|
+
attr(div2, "class", "ms-modal__profile-option");
|
|
3193
|
+
attr(div3, "class", "ms-modal__profile-option");
|
|
3194
|
+
attr(div4, "class", "ms-modal__profile-option");
|
|
3195
|
+
attr(div5, "class", "ms-modal__profile-option");
|
|
3196
|
+
},
|
|
3197
|
+
m: function (target, anchor) {
|
|
3198
|
+
insert(target, div0, anchor);
|
|
3199
|
+
mount_component(profileicon, div0, null);
|
|
3200
|
+
append(div0, t0);
|
|
3201
|
+
insert(target, t1, anchor);
|
|
3202
|
+
insert(target, div1, anchor);
|
|
3203
|
+
mount_component(securityicon, div1, null);
|
|
3204
|
+
append(div1, t2);
|
|
3205
|
+
insert(target, t3, anchor);
|
|
3206
|
+
insert(target, div2, anchor);
|
|
3207
|
+
mount_component(productsicon, div2, null);
|
|
3208
|
+
append(div2, t4);
|
|
3209
|
+
insert(target, t5, anchor);
|
|
3210
|
+
insert(target, div3, anchor);
|
|
3211
|
+
mount_component(invoicesicon, div3, null);
|
|
3212
|
+
append(div3, t6);
|
|
3213
|
+
insert(target, t7, anchor);
|
|
3214
|
+
insert(target, div4, anchor);
|
|
3215
|
+
mount_component(paymenticon, div4, null);
|
|
3216
|
+
append(div4, t8);
|
|
3217
|
+
insert(target, t9, anchor);
|
|
3218
|
+
insert(target, div5, anchor);
|
|
3219
|
+
mount_component(logouticon, div5, null);
|
|
3220
|
+
append(div5, t10);
|
|
3221
|
+
current = true;
|
|
3222
|
+
if (!mounted) {
|
|
3223
|
+
dispose = [
|
|
3224
|
+
listen(div0, "click", /*click_handler*/ ctx[1]),
|
|
3225
|
+
listen(div1, "click", /*click_handler_1*/ ctx[2])
|
|
3226
|
+
];
|
|
3227
|
+
mounted = true;
|
|
3228
|
+
}
|
|
3229
|
+
},
|
|
3230
|
+
p: function (ctx, _a) {
|
|
3231
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
3232
|
+
if (dirty & /*displayProfile*/ 1) {
|
|
3233
|
+
toggle_class(div0, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "profile");
|
|
3234
|
+
}
|
|
3235
|
+
if (dirty & /*displayProfile*/ 1) {
|
|
3236
|
+
toggle_class(div1, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "security" || /*displayProfile*/ ctx[0] === "changePassword");
|
|
3237
|
+
}
|
|
3238
|
+
},
|
|
3239
|
+
i: function (local) {
|
|
3240
|
+
if (current)
|
|
3241
|
+
return;
|
|
3242
|
+
transition_in(profileicon.$$.fragment, local);
|
|
3243
|
+
transition_in(securityicon.$$.fragment, local);
|
|
3244
|
+
transition_in(productsicon.$$.fragment, local);
|
|
3245
|
+
transition_in(invoicesicon.$$.fragment, local);
|
|
3246
|
+
transition_in(paymenticon.$$.fragment, local);
|
|
3247
|
+
transition_in(logouticon.$$.fragment, local);
|
|
3248
|
+
current = true;
|
|
3249
|
+
},
|
|
3250
|
+
o: function (local) {
|
|
3251
|
+
transition_out(profileicon.$$.fragment, local);
|
|
3252
|
+
transition_out(securityicon.$$.fragment, local);
|
|
3253
|
+
transition_out(productsicon.$$.fragment, local);
|
|
3254
|
+
transition_out(invoicesicon.$$.fragment, local);
|
|
3255
|
+
transition_out(paymenticon.$$.fragment, local);
|
|
3256
|
+
transition_out(logouticon.$$.fragment, local);
|
|
3257
|
+
current = false;
|
|
3258
|
+
},
|
|
3259
|
+
d: function (detaching) {
|
|
3260
|
+
if (detaching)
|
|
3261
|
+
detach(div0);
|
|
3262
|
+
destroy_component(profileicon);
|
|
3263
|
+
if (detaching)
|
|
3264
|
+
detach(t1);
|
|
3265
|
+
if (detaching)
|
|
3266
|
+
detach(div1);
|
|
3267
|
+
destroy_component(securityicon);
|
|
3268
|
+
if (detaching)
|
|
3269
|
+
detach(t3);
|
|
3270
|
+
if (detaching)
|
|
3271
|
+
detach(div2);
|
|
3272
|
+
destroy_component(productsicon);
|
|
3273
|
+
if (detaching)
|
|
3274
|
+
detach(t5);
|
|
3275
|
+
if (detaching)
|
|
3276
|
+
detach(div3);
|
|
3277
|
+
destroy_component(invoicesicon);
|
|
3278
|
+
if (detaching)
|
|
3279
|
+
detach(t7);
|
|
3280
|
+
if (detaching)
|
|
3281
|
+
detach(div4);
|
|
3282
|
+
destroy_component(paymenticon);
|
|
3283
|
+
if (detaching)
|
|
3284
|
+
detach(t9);
|
|
3285
|
+
if (detaching)
|
|
3286
|
+
detach(div5);
|
|
3287
|
+
destroy_component(logouticon);
|
|
3288
|
+
mounted = false;
|
|
3289
|
+
run_all(dispose);
|
|
3290
|
+
}
|
|
3291
|
+
};
|
|
3292
|
+
}
|
|
3293
|
+
function instance$5($$self, $$props, $$invalidate) {
|
|
3294
|
+
var displayProfile = $$props.displayProfile;
|
|
3295
|
+
var click_handler = function () { return $$invalidate(0, displayProfile = "profile"); };
|
|
3296
|
+
var click_handler_1 = function () { return $$invalidate(0, displayProfile = "security"); };
|
|
3297
|
+
$$self.$$set = function ($$props) {
|
|
3298
|
+
if ('displayProfile' in $$props)
|
|
3299
|
+
$$invalidate(0, displayProfile = $$props.displayProfile);
|
|
3300
|
+
};
|
|
3301
|
+
return [displayProfile, click_handler, click_handler_1];
|
|
3302
|
+
}
|
|
3303
|
+
var ProfileModalNav = /** @class */ (function (_super) {
|
|
3304
|
+
__extends(ProfileModalNav, _super);
|
|
3305
|
+
function ProfileModalNav(options) {
|
|
3306
|
+
var _this = _super.call(this) || this;
|
|
3307
|
+
init(_this, options, instance$5, create_fragment$6, safe_not_equal, { displayProfile: 0 });
|
|
3308
|
+
return _this;
|
|
3309
|
+
}
|
|
3310
|
+
return ProfileModalNav;
|
|
3311
|
+
}(SvelteComponent));
|
|
3312
|
+
/* src/components/ProfieInfoContent.svelte generated by Svelte v3.48.0 */
|
|
3313
|
+
function get_each_context(ctx, list, i) {
|
|
3314
|
+
var child_ctx = ctx.slice();
|
|
3315
|
+
child_ctx[1] = list[i];
|
|
3316
|
+
child_ctx[3] = i;
|
|
3317
|
+
return child_ctx;
|
|
3318
|
+
}
|
|
3319
|
+
// (32:1) {#each customFields as customField, i}
|
|
3320
|
+
function create_each_block(ctx) {
|
|
3321
|
+
var div1;
|
|
3322
|
+
var div0;
|
|
3323
|
+
var label;
|
|
3324
|
+
var t0_value = /*customField*/ ctx[1].label + "";
|
|
3325
|
+
var t0;
|
|
3326
|
+
var label_for_value;
|
|
3327
|
+
var t1;
|
|
3328
|
+
var input;
|
|
3329
|
+
var input_placeholder_value;
|
|
3330
|
+
var input_name_value;
|
|
3331
|
+
var input_value_value;
|
|
3332
|
+
var t2;
|
|
3333
|
+
return {
|
|
3334
|
+
c: function () {
|
|
3335
|
+
div1 = element("div");
|
|
3336
|
+
div0 = element("div");
|
|
3337
|
+
label = element("label");
|
|
3338
|
+
t0 = text(t0_value);
|
|
3339
|
+
t1 = space();
|
|
3340
|
+
input = element("input");
|
|
3341
|
+
t2 = space();
|
|
3342
|
+
attr(label, "class", "ms-form__label");
|
|
3343
|
+
attr(label, "for", label_for_value = /*customField*/ ctx[1].id);
|
|
3344
|
+
attr(input, "class", "ms-form__input");
|
|
3345
|
+
attr(input, "type", "text");
|
|
3346
|
+
attr(input, "placeholder", input_placeholder_value = /*customField*/ ctx[1].value);
|
|
3347
|
+
attr(input, "name", input_name_value = /*customField*/ ctx[1].id);
|
|
3348
|
+
input.value = input_value_value = /*customField*/ ctx[1].value;
|
|
3349
|
+
attr(div0, "class", "ms-form__group");
|
|
3350
|
+
attr(div1, "class", "ms-modal__custom-field-container");
|
|
3351
|
+
},
|
|
3352
|
+
m: function (target, anchor) {
|
|
3353
|
+
insert(target, div1, anchor);
|
|
3354
|
+
append(div1, div0);
|
|
3355
|
+
append(div0, label);
|
|
3356
|
+
append(label, t0);
|
|
3357
|
+
append(div0, t1);
|
|
3358
|
+
append(div0, input);
|
|
3359
|
+
append(div1, t2);
|
|
3360
|
+
},
|
|
3361
|
+
p: noop,
|
|
3362
|
+
d: function (detaching) {
|
|
3363
|
+
if (detaching)
|
|
3364
|
+
detach(div1);
|
|
3365
|
+
}
|
|
3366
|
+
};
|
|
3367
|
+
}
|
|
3368
|
+
function create_fragment$5(ctx) {
|
|
3369
|
+
var div1;
|
|
3370
|
+
var t5;
|
|
3371
|
+
var form;
|
|
3372
|
+
var mounted;
|
|
3373
|
+
var dispose;
|
|
3374
|
+
var each_value = /*customFields*/ ctx[0];
|
|
3375
|
+
var each_blocks = [];
|
|
3376
|
+
for (var i = 0; i < each_value.length; i += 1) {
|
|
3377
|
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
3378
|
+
}
|
|
3379
|
+
return {
|
|
3380
|
+
c: function () {
|
|
3381
|
+
div1 = element("div");
|
|
3382
|
+
div1.innerHTML = "<h2 class=\"ms-modal__title ms-modal__title--profile\">Profile Information</h2> \n <div class=\"ms-modal__action-container\"><button class=\"ms-modal__cancel-button\">Cancel</button> \n <button class=\"ms-modal__save-button\">Save</button></div>";
|
|
3383
|
+
t5 = space();
|
|
3384
|
+
form = element("form");
|
|
3385
|
+
for (var i = 0; i < each_blocks.length; i += 1) {
|
|
3386
|
+
each_blocks[i].c();
|
|
3387
|
+
}
|
|
3388
|
+
attr(div1, "class", "ms-modal__title-container");
|
|
3389
|
+
attr(form, "class", "ms-form");
|
|
3390
|
+
attr(form, "action", "");
|
|
3391
|
+
attr(form, "method", "post");
|
|
3392
|
+
attr(form, "autocomplete", "off");
|
|
3393
|
+
},
|
|
3394
|
+
m: function (target, anchor) {
|
|
3395
|
+
insert(target, div1, anchor);
|
|
3396
|
+
insert(target, t5, anchor);
|
|
3397
|
+
insert(target, form, anchor);
|
|
3398
|
+
for (var i = 0; i < each_blocks.length; i += 1) {
|
|
3399
|
+
each_blocks[i].m(form, null);
|
|
3400
|
+
}
|
|
3401
|
+
if (!mounted) {
|
|
3402
|
+
dispose = listen(form, "submit", stop_propagation(prevent_default(submitProfile)));
|
|
3403
|
+
mounted = true;
|
|
3404
|
+
}
|
|
3405
|
+
},
|
|
3406
|
+
p: function (ctx, _a) {
|
|
3407
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
3408
|
+
if (dirty & /*customFields*/ 1) {
|
|
3409
|
+
each_value = /*customFields*/ ctx[0];
|
|
3410
|
+
var i = void 0;
|
|
3411
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
3412
|
+
var child_ctx = get_each_context(ctx, each_value, i);
|
|
3413
|
+
if (each_blocks[i]) {
|
|
3414
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
3415
|
+
}
|
|
3416
|
+
else {
|
|
3417
|
+
each_blocks[i] = create_each_block(child_ctx);
|
|
3418
|
+
each_blocks[i].c();
|
|
3419
|
+
each_blocks[i].m(form, null);
|
|
3420
|
+
}
|
|
3421
|
+
}
|
|
3422
|
+
for (; i < each_blocks.length; i += 1) {
|
|
3423
|
+
each_blocks[i].d(1);
|
|
3424
|
+
}
|
|
3425
|
+
each_blocks.length = each_value.length;
|
|
3426
|
+
}
|
|
3427
|
+
},
|
|
3428
|
+
i: noop,
|
|
3429
|
+
o: noop,
|
|
3430
|
+
d: function (detaching) {
|
|
3431
|
+
if (detaching)
|
|
3432
|
+
detach(div1);
|
|
3433
|
+
if (detaching)
|
|
3434
|
+
detach(t5);
|
|
3435
|
+
if (detaching)
|
|
3436
|
+
detach(form);
|
|
3437
|
+
destroy_each(each_blocks, detaching);
|
|
3438
|
+
mounted = false;
|
|
3439
|
+
dispose();
|
|
3440
|
+
}
|
|
3441
|
+
};
|
|
3442
|
+
}
|
|
3443
|
+
function getMember() {
|
|
3444
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3445
|
+
var member;
|
|
3446
|
+
return __generator(this, function (_a) {
|
|
3447
|
+
switch (_a.label) {
|
|
3448
|
+
case 0: return [4 /*yield*/, window.$memberstackDom.getCurrentMember()];
|
|
3449
|
+
case 1:
|
|
3450
|
+
member = _a.sent();
|
|
3451
|
+
console.log(member.data);
|
|
3452
|
+
console.log(member.data.customFields);
|
|
3453
|
+
return [2 /*return*/];
|
|
3454
|
+
}
|
|
3455
|
+
});
|
|
3456
|
+
});
|
|
3457
|
+
}
|
|
3458
|
+
function submitProfile(e) {
|
|
3459
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3460
|
+
return __generator(this, function (_a) {
|
|
3461
|
+
console.log(e);
|
|
3462
|
+
return [2 /*return*/];
|
|
3463
|
+
});
|
|
3464
|
+
});
|
|
3465
|
+
}
|
|
3466
|
+
function instance$4($$self) {
|
|
3467
|
+
var customFields = [
|
|
3468
|
+
{
|
|
3469
|
+
id: "firstname",
|
|
3470
|
+
label: "First Name",
|
|
3471
|
+
value: "Bob"
|
|
3472
|
+
},
|
|
3473
|
+
{
|
|
3474
|
+
id: "lastname",
|
|
3475
|
+
label: "Last Name",
|
|
3476
|
+
value: "Barker"
|
|
3477
|
+
}
|
|
3478
|
+
];
|
|
3479
|
+
getMember();
|
|
3480
|
+
return [customFields];
|
|
3481
|
+
}
|
|
3482
|
+
var ProfieInfoContent = /** @class */ (function (_super) {
|
|
3483
|
+
__extends(ProfieInfoContent, _super);
|
|
3484
|
+
function ProfieInfoContent(options) {
|
|
3485
|
+
var _this = _super.call(this) || this;
|
|
3486
|
+
init(_this, options, instance$4, create_fragment$5, safe_not_equal, {});
|
|
3487
|
+
return _this;
|
|
3488
|
+
}
|
|
3489
|
+
return ProfieInfoContent;
|
|
3490
|
+
}(SvelteComponent));
|
|
3491
|
+
/* src/icons/PasswordLockIcon.svelte generated by Svelte v3.48.0 */
|
|
3492
|
+
function create_fragment$4(ctx) {
|
|
3493
|
+
var svg;
|
|
3494
|
+
var path;
|
|
3495
|
+
return {
|
|
3496
|
+
c: function () {
|
|
3497
|
+
svg = svg_element("svg");
|
|
3498
|
+
path = svg_element("path");
|
|
3499
|
+
attr(path, "fill", "currentColor");
|
|
3500
|
+
attr(path, "d", "m14 7h-1v-2c0-2.76-2.24-5-5-5s-5 2.24-5 5v2h-1c-1.1 0-2 0.9-2 2v10c0 1.1 0.9 2 2 2h12c1.1 0 2-0.9 2-2v-10c0-1.1-0.9-2-2-2zm-9-2c0-1.66 1.34-3 3-3s3 1.34 3 3v2h-6v-2zm9 14h-12v-10h12v10zm-6-3c1.1 0 2-0.9 2-2s-0.9-2-2-2-2 0.9-2 2 0.9 2 2 2z");
|
|
3501
|
+
attr(svg, "fill", "none");
|
|
3502
|
+
attr(svg, "viewBox", "0 0 16 21");
|
|
3503
|
+
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
3504
|
+
},
|
|
3505
|
+
m: function (target, anchor) {
|
|
3506
|
+
insert(target, svg, anchor);
|
|
3507
|
+
append(svg, path);
|
|
3508
|
+
},
|
|
3509
|
+
p: noop,
|
|
3510
|
+
i: noop,
|
|
3511
|
+
o: noop,
|
|
3512
|
+
d: function (detaching) {
|
|
3513
|
+
if (detaching)
|
|
3514
|
+
detach(svg);
|
|
3515
|
+
}
|
|
3516
|
+
};
|
|
3517
|
+
}
|
|
3518
|
+
var PasswordLockIcon = /** @class */ (function (_super) {
|
|
3519
|
+
__extends(PasswordLockIcon, _super);
|
|
3520
|
+
function PasswordLockIcon(options) {
|
|
3521
|
+
var _this = _super.call(this) || this;
|
|
3522
|
+
init(_this, options, null, create_fragment$4, safe_not_equal, {});
|
|
3523
|
+
return _this;
|
|
3524
|
+
}
|
|
3525
|
+
return PasswordLockIcon;
|
|
3526
|
+
}(SvelteComponent));
|
|
3527
|
+
/* src/components/SecurityInfoContent.svelte generated by Svelte v3.48.0 */
|
|
3528
|
+
function create_fragment$3(ctx) {
|
|
3529
|
+
var div1;
|
|
3530
|
+
var t5;
|
|
3531
|
+
var form;
|
|
3532
|
+
var emailinput;
|
|
3533
|
+
var t6;
|
|
3534
|
+
var label;
|
|
3535
|
+
var t8;
|
|
3536
|
+
var button2;
|
|
3537
|
+
var passwordlockicon;
|
|
3538
|
+
var t9;
|
|
3539
|
+
var current;
|
|
3540
|
+
var mounted;
|
|
3541
|
+
var dispose;
|
|
3542
|
+
emailinput = new EmailInput({});
|
|
3543
|
+
passwordlockicon = new PasswordLockIcon({});
|
|
3544
|
+
return {
|
|
3545
|
+
c: function () {
|
|
3546
|
+
div1 = element("div");
|
|
3547
|
+
div1.innerHTML = "<h2 class=\"ms-modal__title ms-modal__title--profile\">Security</h2> \n <div class=\"ms-modal__action-container\"><button class=\"ms-modal__cancel-button\">Cancel</button> \n <button class=\"ms-modal__save-button\">Save</button></div>";
|
|
3548
|
+
t5 = space();
|
|
3549
|
+
form = element("form");
|
|
3550
|
+
create_component(emailinput.$$.fragment);
|
|
3551
|
+
t6 = space();
|
|
3552
|
+
label = element("label");
|
|
3553
|
+
label.textContent = "Password";
|
|
3554
|
+
t8 = space();
|
|
3555
|
+
button2 = element("button");
|
|
3556
|
+
create_component(passwordlockicon.$$.fragment);
|
|
3557
|
+
t9 = text(" Set Password");
|
|
3558
|
+
attr(div1, "class", "ms-modal__title-container");
|
|
3559
|
+
attr(form, "class", "ms-form");
|
|
3560
|
+
attr(form, "action", "");
|
|
3561
|
+
attr(form, "method", "post");
|
|
3562
|
+
attr(form, "autocomplete", "off");
|
|
3563
|
+
attr(label, "class", "ms-modal__button-label");
|
|
3564
|
+
attr(label, "for", "setPassword");
|
|
3565
|
+
attr(button2, "class", "ms-modal__outline-button");
|
|
3566
|
+
attr(button2, "name", "setPassword");
|
|
3567
|
+
},
|
|
3568
|
+
m: function (target, anchor) {
|
|
3569
|
+
insert(target, div1, anchor);
|
|
3570
|
+
insert(target, t5, anchor);
|
|
3571
|
+
insert(target, form, anchor);
|
|
3572
|
+
mount_component(emailinput, form, null);
|
|
3573
|
+
insert(target, t6, anchor);
|
|
3574
|
+
insert(target, label, anchor);
|
|
3575
|
+
insert(target, t8, anchor);
|
|
3576
|
+
insert(target, button2, anchor);
|
|
3577
|
+
mount_component(passwordlockicon, button2, null);
|
|
3578
|
+
append(button2, t9);
|
|
3579
|
+
current = true;
|
|
3580
|
+
if (!mounted) {
|
|
3581
|
+
dispose = [
|
|
3582
|
+
listen(form, "submit", stop_propagation(prevent_default(submitEmailChange))),
|
|
3583
|
+
listen(button2, "click", /*click_handler*/ ctx[1])
|
|
3584
|
+
];
|
|
3585
|
+
mounted = true;
|
|
3586
|
+
}
|
|
3587
|
+
},
|
|
3588
|
+
p: noop,
|
|
3589
|
+
i: function (local) {
|
|
3590
|
+
if (current)
|
|
3591
|
+
return;
|
|
3592
|
+
transition_in(emailinput.$$.fragment, local);
|
|
3593
|
+
transition_in(passwordlockicon.$$.fragment, local);
|
|
3594
|
+
current = true;
|
|
3595
|
+
},
|
|
3596
|
+
o: function (local) {
|
|
3597
|
+
transition_out(emailinput.$$.fragment, local);
|
|
3598
|
+
transition_out(passwordlockicon.$$.fragment, local);
|
|
3599
|
+
current = false;
|
|
3600
|
+
},
|
|
3601
|
+
d: function (detaching) {
|
|
3602
|
+
if (detaching)
|
|
3603
|
+
detach(div1);
|
|
3604
|
+
if (detaching)
|
|
3605
|
+
detach(t5);
|
|
3606
|
+
if (detaching)
|
|
3607
|
+
detach(form);
|
|
3608
|
+
destroy_component(emailinput);
|
|
3609
|
+
if (detaching)
|
|
3610
|
+
detach(t6);
|
|
3611
|
+
if (detaching)
|
|
3612
|
+
detach(label);
|
|
3613
|
+
if (detaching)
|
|
3614
|
+
detach(t8);
|
|
3615
|
+
if (detaching)
|
|
3616
|
+
detach(button2);
|
|
3617
|
+
destroy_component(passwordlockicon);
|
|
3618
|
+
mounted = false;
|
|
3619
|
+
run_all(dispose);
|
|
3620
|
+
}
|
|
3621
|
+
};
|
|
3622
|
+
}
|
|
3623
|
+
function submitEmailChange(e) {
|
|
3624
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3625
|
+
return __generator(this, function (_a) {
|
|
3626
|
+
console.log(e);
|
|
3627
|
+
return [2 /*return*/];
|
|
3628
|
+
});
|
|
3629
|
+
});
|
|
3630
|
+
}
|
|
3631
|
+
function instance$3($$self, $$props, $$invalidate) {
|
|
3632
|
+
var displayProfile = $$props.displayProfile;
|
|
3633
|
+
var click_handler = function () { return $$invalidate(0, displayProfile = "changePassword"); };
|
|
3634
|
+
$$self.$$set = function ($$props) {
|
|
3635
|
+
if ('displayProfile' in $$props)
|
|
3636
|
+
$$invalidate(0, displayProfile = $$props.displayProfile);
|
|
3637
|
+
};
|
|
3638
|
+
return [displayProfile, click_handler];
|
|
3639
|
+
}
|
|
3640
|
+
var SecurityInfoContent = /** @class */ (function (_super) {
|
|
3641
|
+
__extends(SecurityInfoContent, _super);
|
|
3642
|
+
function SecurityInfoContent(options) {
|
|
3643
|
+
var _this = _super.call(this) || this;
|
|
3644
|
+
init(_this, options, instance$3, create_fragment$3, safe_not_equal, { displayProfile: 0 });
|
|
3645
|
+
return _this;
|
|
3646
|
+
}
|
|
3647
|
+
return SecurityInfoContent;
|
|
3648
|
+
}(SvelteComponent));
|
|
3649
|
+
/* src/components/PasswordInfoContent.svelte generated by Svelte v3.48.0 */
|
|
3650
|
+
function create_fragment$2(ctx) {
|
|
3651
|
+
var div3;
|
|
3652
|
+
var div1;
|
|
3653
|
+
var div0;
|
|
3654
|
+
var button0;
|
|
3655
|
+
var backicon;
|
|
3656
|
+
var t0;
|
|
3657
|
+
var h2;
|
|
3658
|
+
var t2;
|
|
3659
|
+
var div2;
|
|
3660
|
+
var t6;
|
|
3661
|
+
var form;
|
|
3662
|
+
var passwordinput0;
|
|
3663
|
+
var t7;
|
|
3664
|
+
var passwordinput1;
|
|
3665
|
+
var t8;
|
|
3666
|
+
var passwordinput2;
|
|
3667
|
+
var current;
|
|
3668
|
+
var mounted;
|
|
3669
|
+
var dispose;
|
|
3670
|
+
backicon = new BackIcon({});
|
|
3671
|
+
passwordinput0 = new PasswordInput({
|
|
3672
|
+
props: {
|
|
3673
|
+
passwordLabel: "Current Password",
|
|
3674
|
+
passwordPlaceholder: "Enter a strong password"
|
|
3675
|
+
}
|
|
3676
|
+
});
|
|
3677
|
+
passwordinput1 = new PasswordInput({
|
|
3678
|
+
props: {
|
|
3679
|
+
passwordLabel: "New Password",
|
|
3680
|
+
passwordPlaceholder: "Enter a strong password"
|
|
3681
|
+
}
|
|
3682
|
+
});
|
|
3683
|
+
passwordinput2 = new PasswordInput({
|
|
3684
|
+
props: {
|
|
3685
|
+
passwordLabel: "Confirm New Password",
|
|
3686
|
+
passwordPlaceholder: "Enter a strong password"
|
|
3687
|
+
}
|
|
3688
|
+
});
|
|
3689
|
+
return {
|
|
3690
|
+
c: function () {
|
|
3691
|
+
div3 = element("div");
|
|
3692
|
+
div1 = element("div");
|
|
3693
|
+
div0 = element("div");
|
|
3694
|
+
button0 = element("button");
|
|
3695
|
+
create_component(backicon.$$.fragment);
|
|
3696
|
+
t0 = space();
|
|
3697
|
+
h2 = element("h2");
|
|
3698
|
+
h2.textContent = "Change Password";
|
|
3699
|
+
t2 = space();
|
|
3700
|
+
div2 = element("div");
|
|
3701
|
+
div2.innerHTML = "<button class=\"ms-modal__cancel-button\">Cancel</button> \n <button class=\"ms-modal__save-button\">Save</button>";
|
|
3702
|
+
t6 = space();
|
|
3703
|
+
form = element("form");
|
|
3704
|
+
create_component(passwordinput0.$$.fragment);
|
|
3705
|
+
t7 = space();
|
|
3706
|
+
create_component(passwordinput1.$$.fragment);
|
|
3707
|
+
t8 = space();
|
|
3708
|
+
create_component(passwordinput2.$$.fragment);
|
|
3709
|
+
attr(div0, "class", "ms-modal__profile-back");
|
|
3710
|
+
attr(h2, "class", "ms-modal__title ms-modal__title--profile");
|
|
3711
|
+
attr(div1, "class", "ms-modal__title-group");
|
|
3712
|
+
attr(div2, "class", "ms-modal__action-container");
|
|
3713
|
+
attr(div3, "class", "ms-modal__title-container");
|
|
3714
|
+
attr(form, "class", "ms-form");
|
|
3715
|
+
attr(form, "action", "");
|
|
3716
|
+
attr(form, "method", "post");
|
|
3717
|
+
attr(form, "autocomplete", "off");
|
|
3718
|
+
},
|
|
3719
|
+
m: function (target, anchor) {
|
|
3720
|
+
insert(target, div3, anchor);
|
|
3721
|
+
append(div3, div1);
|
|
3722
|
+
append(div1, div0);
|
|
3723
|
+
append(div0, button0);
|
|
3724
|
+
mount_component(backicon, button0, null);
|
|
3725
|
+
append(div1, t0);
|
|
3726
|
+
append(div1, h2);
|
|
3727
|
+
append(div3, t2);
|
|
3728
|
+
append(div3, div2);
|
|
3729
|
+
insert(target, t6, anchor);
|
|
3730
|
+
insert(target, form, anchor);
|
|
3731
|
+
mount_component(passwordinput0, form, null);
|
|
3732
|
+
append(form, t7);
|
|
3733
|
+
mount_component(passwordinput1, form, null);
|
|
3734
|
+
append(form, t8);
|
|
3735
|
+
mount_component(passwordinput2, form, null);
|
|
3736
|
+
current = true;
|
|
3737
|
+
if (!mounted) {
|
|
3738
|
+
dispose = [
|
|
3739
|
+
listen(button0, "click", /*click_handler*/ ctx[1]),
|
|
3740
|
+
listen(form, "submit", stop_propagation(prevent_default(submitPasswordChange)))
|
|
3741
|
+
];
|
|
3742
|
+
mounted = true;
|
|
3743
|
+
}
|
|
3744
|
+
},
|
|
3745
|
+
p: noop,
|
|
3746
|
+
i: function (local) {
|
|
3747
|
+
if (current)
|
|
3748
|
+
return;
|
|
3749
|
+
transition_in(backicon.$$.fragment, local);
|
|
3750
|
+
transition_in(passwordinput0.$$.fragment, local);
|
|
3751
|
+
transition_in(passwordinput1.$$.fragment, local);
|
|
3752
|
+
transition_in(passwordinput2.$$.fragment, local);
|
|
3753
|
+
current = true;
|
|
3754
|
+
},
|
|
3755
|
+
o: function (local) {
|
|
3756
|
+
transition_out(backicon.$$.fragment, local);
|
|
3757
|
+
transition_out(passwordinput0.$$.fragment, local);
|
|
3758
|
+
transition_out(passwordinput1.$$.fragment, local);
|
|
3759
|
+
transition_out(passwordinput2.$$.fragment, local);
|
|
3760
|
+
current = false;
|
|
3761
|
+
},
|
|
3762
|
+
d: function (detaching) {
|
|
3763
|
+
if (detaching)
|
|
3764
|
+
detach(div3);
|
|
3765
|
+
destroy_component(backicon);
|
|
3766
|
+
if (detaching)
|
|
3767
|
+
detach(t6);
|
|
3768
|
+
if (detaching)
|
|
3769
|
+
detach(form);
|
|
3770
|
+
destroy_component(passwordinput0);
|
|
3771
|
+
destroy_component(passwordinput1);
|
|
3772
|
+
destroy_component(passwordinput2);
|
|
3773
|
+
mounted = false;
|
|
3774
|
+
run_all(dispose);
|
|
3775
|
+
}
|
|
3776
|
+
};
|
|
3777
|
+
}
|
|
3778
|
+
function submitPasswordChange(e) {
|
|
3779
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3780
|
+
return __generator(this, function (_a) {
|
|
3781
|
+
console.log(e);
|
|
3782
|
+
return [2 /*return*/];
|
|
3783
|
+
});
|
|
3784
|
+
});
|
|
3785
|
+
}
|
|
3786
|
+
function instance$2($$self, $$props, $$invalidate) {
|
|
3787
|
+
var displayProfile = $$props.displayProfile;
|
|
3788
|
+
var click_handler = function () { return $$invalidate(0, displayProfile = "security"); };
|
|
3789
|
+
$$self.$$set = function ($$props) {
|
|
3790
|
+
if ('displayProfile' in $$props)
|
|
3791
|
+
$$invalidate(0, displayProfile = $$props.displayProfile);
|
|
3792
|
+
};
|
|
3793
|
+
return [displayProfile, click_handler];
|
|
3794
|
+
}
|
|
3795
|
+
var PasswordInfoContent = /** @class */ (function (_super) {
|
|
3796
|
+
__extends(PasswordInfoContent, _super);
|
|
3797
|
+
function PasswordInfoContent(options) {
|
|
3798
|
+
var _this = _super.call(this) || this;
|
|
3799
|
+
init(_this, options, instance$2, create_fragment$2, safe_not_equal, { displayProfile: 0 });
|
|
3800
|
+
return _this;
|
|
3801
|
+
}
|
|
3802
|
+
return PasswordInfoContent;
|
|
3803
|
+
}(SvelteComponent));
|
|
3804
|
+
/* src/modals/ProfileModal.svelte generated by Svelte v3.48.0 */
|
|
3805
|
+
function create_if_block_2$1(ctx) {
|
|
3806
|
+
var passwordinfocontent;
|
|
3807
|
+
var updating_displayProfile;
|
|
3808
|
+
var current;
|
|
3809
|
+
function passwordinfocontent_displayProfile_binding(value) {
|
|
3810
|
+
/*passwordinfocontent_displayProfile_binding*/ ctx[5](value);
|
|
3811
|
+
}
|
|
3812
|
+
var passwordinfocontent_props = {};
|
|
3813
|
+
if ( /*displayProfile*/ctx[0] !== void 0) {
|
|
3814
|
+
passwordinfocontent_props.displayProfile = /*displayProfile*/ ctx[0];
|
|
3815
|
+
}
|
|
3816
|
+
passwordinfocontent = new PasswordInfoContent({ props: passwordinfocontent_props });
|
|
3817
|
+
binding_callbacks.push(function () { return bind(passwordinfocontent, 'displayProfile', passwordinfocontent_displayProfile_binding); });
|
|
3818
|
+
return {
|
|
3819
|
+
c: function () {
|
|
3820
|
+
create_component(passwordinfocontent.$$.fragment);
|
|
3821
|
+
},
|
|
3822
|
+
m: function (target, anchor) {
|
|
3823
|
+
mount_component(passwordinfocontent, target, anchor);
|
|
3824
|
+
current = true;
|
|
3825
|
+
},
|
|
3826
|
+
p: function (ctx, dirty) {
|
|
3827
|
+
var passwordinfocontent_changes = {};
|
|
3828
|
+
if (!updating_displayProfile && dirty & /*displayProfile*/ 1) {
|
|
3829
|
+
updating_displayProfile = true;
|
|
3830
|
+
passwordinfocontent_changes.displayProfile = /*displayProfile*/ ctx[0];
|
|
3831
|
+
add_flush_callback(function () { return updating_displayProfile = false; });
|
|
3832
|
+
}
|
|
3833
|
+
passwordinfocontent.$set(passwordinfocontent_changes);
|
|
3834
|
+
},
|
|
3835
|
+
i: function (local) {
|
|
3836
|
+
if (current)
|
|
3837
|
+
return;
|
|
3838
|
+
transition_in(passwordinfocontent.$$.fragment, local);
|
|
3839
|
+
current = true;
|
|
3840
|
+
},
|
|
3841
|
+
o: function (local) {
|
|
3842
|
+
transition_out(passwordinfocontent.$$.fragment, local);
|
|
3843
|
+
current = false;
|
|
3844
|
+
},
|
|
3845
|
+
d: function (detaching) {
|
|
3846
|
+
destroy_component(passwordinfocontent, detaching);
|
|
3847
|
+
}
|
|
3848
|
+
};
|
|
3849
|
+
}
|
|
3850
|
+
// (34:46)
|
|
3851
|
+
function create_if_block_1$1(ctx) {
|
|
3852
|
+
var securityinfocontent;
|
|
3853
|
+
var updating_displayProfile;
|
|
3854
|
+
var current;
|
|
3855
|
+
function securityinfocontent_displayProfile_binding(value) {
|
|
3856
|
+
/*securityinfocontent_displayProfile_binding*/ ctx[4](value);
|
|
3857
|
+
}
|
|
3858
|
+
var securityinfocontent_props = {};
|
|
3859
|
+
if ( /*displayProfile*/ctx[0] !== void 0) {
|
|
3860
|
+
securityinfocontent_props.displayProfile = /*displayProfile*/ ctx[0];
|
|
3861
|
+
}
|
|
3862
|
+
securityinfocontent = new SecurityInfoContent({ props: securityinfocontent_props });
|
|
3863
|
+
binding_callbacks.push(function () { return bind(securityinfocontent, 'displayProfile', securityinfocontent_displayProfile_binding); });
|
|
3864
|
+
return {
|
|
3865
|
+
c: function () {
|
|
3866
|
+
create_component(securityinfocontent.$$.fragment);
|
|
3867
|
+
},
|
|
3868
|
+
m: function (target, anchor) {
|
|
3869
|
+
mount_component(securityinfocontent, target, anchor);
|
|
3870
|
+
current = true;
|
|
3871
|
+
},
|
|
3872
|
+
p: function (ctx, dirty) {
|
|
3873
|
+
var securityinfocontent_changes = {};
|
|
3874
|
+
if (!updating_displayProfile && dirty & /*displayProfile*/ 1) {
|
|
3875
|
+
updating_displayProfile = true;
|
|
3876
|
+
securityinfocontent_changes.displayProfile = /*displayProfile*/ ctx[0];
|
|
3877
|
+
add_flush_callback(function () { return updating_displayProfile = false; });
|
|
3878
|
+
}
|
|
3879
|
+
securityinfocontent.$set(securityinfocontent_changes);
|
|
3880
|
+
},
|
|
3881
|
+
i: function (local) {
|
|
3882
|
+
if (current)
|
|
3883
|
+
return;
|
|
3884
|
+
transition_in(securityinfocontent.$$.fragment, local);
|
|
3885
|
+
current = true;
|
|
3886
|
+
},
|
|
3887
|
+
o: function (local) {
|
|
3888
|
+
transition_out(securityinfocontent.$$.fragment, local);
|
|
3889
|
+
current = false;
|
|
3890
|
+
},
|
|
3891
|
+
d: function (detaching) {
|
|
3892
|
+
destroy_component(securityinfocontent, detaching);
|
|
3893
|
+
}
|
|
3894
|
+
};
|
|
3895
|
+
}
|
|
3896
|
+
// (32:6) {#if displayProfile === "profile"}
|
|
3897
|
+
function create_if_block$1(ctx) {
|
|
3898
|
+
var profileinfocontent;
|
|
3899
|
+
var current;
|
|
3900
|
+
profileinfocontent = new ProfieInfoContent({});
|
|
3901
|
+
return {
|
|
3902
|
+
c: function () {
|
|
3903
|
+
create_component(profileinfocontent.$$.fragment);
|
|
3904
|
+
},
|
|
3905
|
+
m: function (target, anchor) {
|
|
3906
|
+
mount_component(profileinfocontent, target, anchor);
|
|
3907
|
+
current = true;
|
|
3908
|
+
},
|
|
3909
|
+
p: noop,
|
|
3910
|
+
i: function (local) {
|
|
3911
|
+
if (current)
|
|
3912
|
+
return;
|
|
3913
|
+
transition_in(profileinfocontent.$$.fragment, local);
|
|
3914
|
+
current = true;
|
|
3915
|
+
},
|
|
3916
|
+
o: function (local) {
|
|
3917
|
+
transition_out(profileinfocontent.$$.fragment, local);
|
|
3918
|
+
current = false;
|
|
3919
|
+
},
|
|
3920
|
+
d: function (detaching) {
|
|
3921
|
+
destroy_component(profileinfocontent, detaching);
|
|
3922
|
+
}
|
|
3923
|
+
};
|
|
3924
|
+
}
|
|
3925
|
+
function create_fragment$1(ctx) {
|
|
3926
|
+
var div5;
|
|
3927
|
+
var div1;
|
|
3928
|
+
var figure;
|
|
3929
|
+
var memberstackicon;
|
|
3930
|
+
var t0;
|
|
3931
|
+
var div0;
|
|
3932
|
+
var t2;
|
|
3933
|
+
var closebutton;
|
|
3934
|
+
var t3;
|
|
3935
|
+
var div4;
|
|
3936
|
+
var div2;
|
|
3937
|
+
var profilemodalnav;
|
|
3938
|
+
var updating_displayProfile;
|
|
3939
|
+
var t4;
|
|
3940
|
+
var div3;
|
|
3941
|
+
var current_block_type_index;
|
|
3942
|
+
var if_block;
|
|
3943
|
+
var t5;
|
|
3944
|
+
var modalfooter;
|
|
3945
|
+
var current;
|
|
3946
|
+
memberstackicon = new MemberstackIcon({});
|
|
3947
|
+
closebutton = new CloseButton({
|
|
3948
|
+
props: { closeModal: /*closeModal*/ ctx[1] }
|
|
3949
|
+
});
|
|
3950
|
+
function profilemodalnav_displayProfile_binding(value) {
|
|
3951
|
+
/*profilemodalnav_displayProfile_binding*/ ctx[3](value);
|
|
3952
|
+
}
|
|
3953
|
+
var profilemodalnav_props = {};
|
|
3954
|
+
if ( /*displayProfile*/ctx[0] !== void 0) {
|
|
3955
|
+
profilemodalnav_props.displayProfile = /*displayProfile*/ ctx[0];
|
|
3956
|
+
}
|
|
3957
|
+
profilemodalnav = new ProfileModalNav({ props: profilemodalnav_props });
|
|
3958
|
+
binding_callbacks.push(function () { return bind(profilemodalnav, 'displayProfile', profilemodalnav_displayProfile_binding); });
|
|
3959
|
+
var if_block_creators = [create_if_block$1, create_if_block_1$1, create_if_block_2$1];
|
|
3960
|
+
var if_blocks = [];
|
|
3961
|
+
function select_block_type(ctx, dirty) {
|
|
3962
|
+
if ( /*displayProfile*/ctx[0] === "profile")
|
|
3963
|
+
return 0;
|
|
3964
|
+
if ( /*displayProfile*/ctx[0] === "security")
|
|
3965
|
+
return 1;
|
|
3966
|
+
if ( /*displayProfile*/ctx[0] === "changePassword")
|
|
3967
|
+
return 2;
|
|
3968
|
+
return -1;
|
|
3969
|
+
}
|
|
3970
|
+
if (~(current_block_type_index = select_block_type(ctx))) {
|
|
3971
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
3972
|
+
}
|
|
3973
|
+
modalfooter = new ModalFooter({});
|
|
3974
|
+
return {
|
|
3975
|
+
c: function () {
|
|
3976
|
+
div5 = element("div");
|
|
3977
|
+
div1 = element("div");
|
|
3978
|
+
figure = element("figure");
|
|
3979
|
+
create_component(memberstackicon.$$.fragment);
|
|
3980
|
+
t0 = space();
|
|
3981
|
+
div0 = element("div");
|
|
3982
|
+
div0.textContent = "bob@barker.com";
|
|
3983
|
+
t2 = space();
|
|
3984
|
+
create_component(closebutton.$$.fragment);
|
|
3985
|
+
t3 = space();
|
|
3986
|
+
div4 = element("div");
|
|
3987
|
+
div2 = element("div");
|
|
3988
|
+
create_component(profilemodalnav.$$.fragment);
|
|
3989
|
+
t4 = space();
|
|
3990
|
+
div3 = element("div");
|
|
3991
|
+
if (if_block)
|
|
3992
|
+
if_block.c();
|
|
3993
|
+
t5 = space();
|
|
3994
|
+
create_component(modalfooter.$$.fragment);
|
|
3995
|
+
attr(figure, "class", "ms-modal__figure ms-modal__figure--profile");
|
|
3996
|
+
attr(div1, "class", "ms-modal__header");
|
|
3997
|
+
attr(div2, "class", "ms-modal__content-left");
|
|
3998
|
+
attr(div3, "class", "ms-modal__content-right");
|
|
3999
|
+
attr(div4, "class", "ms-modal__content ms-modal__content--profile");
|
|
4000
|
+
attr(div5, "class", "ms-modal ms-modal--profile");
|
|
4001
|
+
attr(div5, "id", "ProfileModal");
|
|
4002
|
+
},
|
|
4003
|
+
m: function (target, anchor) {
|
|
4004
|
+
insert(target, div5, anchor);
|
|
4005
|
+
append(div5, div1);
|
|
4006
|
+
append(div1, figure);
|
|
4007
|
+
mount_component(memberstackicon, figure, null);
|
|
4008
|
+
append(div1, t0);
|
|
4009
|
+
append(div1, div0);
|
|
4010
|
+
append(div1, t2);
|
|
4011
|
+
mount_component(closebutton, div1, null);
|
|
4012
|
+
append(div5, t3);
|
|
4013
|
+
append(div5, div4);
|
|
4014
|
+
append(div4, div2);
|
|
4015
|
+
mount_component(profilemodalnav, div2, null);
|
|
4016
|
+
append(div4, t4);
|
|
4017
|
+
append(div4, div3);
|
|
4018
|
+
if (~current_block_type_index) {
|
|
4019
|
+
if_blocks[current_block_type_index].m(div3, null);
|
|
4020
|
+
}
|
|
4021
|
+
append(div5, t5);
|
|
4022
|
+
mount_component(modalfooter, div5, null);
|
|
4023
|
+
current = true;
|
|
4024
|
+
},
|
|
4025
|
+
p: function (ctx, _a) {
|
|
4026
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
4027
|
+
var closebutton_changes = {};
|
|
4028
|
+
if (dirty & /*closeModal*/ 2)
|
|
4029
|
+
closebutton_changes.closeModal = /*closeModal*/ ctx[1];
|
|
4030
|
+
closebutton.$set(closebutton_changes);
|
|
4031
|
+
var profilemodalnav_changes = {};
|
|
4032
|
+
if (!updating_displayProfile && dirty & /*displayProfile*/ 1) {
|
|
4033
|
+
updating_displayProfile = true;
|
|
4034
|
+
profilemodalnav_changes.displayProfile = /*displayProfile*/ ctx[0];
|
|
4035
|
+
add_flush_callback(function () { return updating_displayProfile = false; });
|
|
4036
|
+
}
|
|
4037
|
+
profilemodalnav.$set(profilemodalnav_changes);
|
|
4038
|
+
var previous_block_index = current_block_type_index;
|
|
4039
|
+
current_block_type_index = select_block_type(ctx);
|
|
4040
|
+
if (current_block_type_index === previous_block_index) {
|
|
4041
|
+
if (~current_block_type_index) {
|
|
4042
|
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
|
4043
|
+
}
|
|
4044
|
+
}
|
|
4045
|
+
else {
|
|
4046
|
+
if (if_block) {
|
|
4047
|
+
group_outros();
|
|
4048
|
+
transition_out(if_blocks[previous_block_index], 1, 1, function () {
|
|
4049
|
+
if_blocks[previous_block_index] = null;
|
|
4050
|
+
});
|
|
4051
|
+
check_outros();
|
|
4052
|
+
}
|
|
4053
|
+
if (~current_block_type_index) {
|
|
4054
|
+
if_block = if_blocks[current_block_type_index];
|
|
4055
|
+
if (!if_block) {
|
|
4056
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
4057
|
+
if_block.c();
|
|
4058
|
+
}
|
|
4059
|
+
else {
|
|
4060
|
+
if_block.p(ctx, dirty);
|
|
4061
|
+
}
|
|
4062
|
+
transition_in(if_block, 1);
|
|
4063
|
+
if_block.m(div3, null);
|
|
4064
|
+
}
|
|
4065
|
+
else {
|
|
4066
|
+
if_block = null;
|
|
4067
|
+
}
|
|
4068
|
+
}
|
|
4069
|
+
},
|
|
4070
|
+
i: function (local) {
|
|
4071
|
+
if (current)
|
|
4072
|
+
return;
|
|
4073
|
+
transition_in(memberstackicon.$$.fragment, local);
|
|
4074
|
+
transition_in(closebutton.$$.fragment, local);
|
|
4075
|
+
transition_in(profilemodalnav.$$.fragment, local);
|
|
4076
|
+
transition_in(if_block);
|
|
4077
|
+
transition_in(modalfooter.$$.fragment, local);
|
|
4078
|
+
current = true;
|
|
4079
|
+
},
|
|
4080
|
+
o: function (local) {
|
|
4081
|
+
transition_out(memberstackicon.$$.fragment, local);
|
|
4082
|
+
transition_out(closebutton.$$.fragment, local);
|
|
4083
|
+
transition_out(profilemodalnav.$$.fragment, local);
|
|
4084
|
+
transition_out(if_block);
|
|
4085
|
+
transition_out(modalfooter.$$.fragment, local);
|
|
4086
|
+
current = false;
|
|
4087
|
+
},
|
|
4088
|
+
d: function (detaching) {
|
|
4089
|
+
if (detaching)
|
|
4090
|
+
detach(div5);
|
|
4091
|
+
destroy_component(memberstackicon);
|
|
4092
|
+
destroy_component(closebutton);
|
|
4093
|
+
destroy_component(profilemodalnav);
|
|
4094
|
+
if (~current_block_type_index) {
|
|
4095
|
+
if_blocks[current_block_type_index].d();
|
|
4096
|
+
}
|
|
4097
|
+
destroy_component(modalfooter);
|
|
4098
|
+
}
|
|
4099
|
+
};
|
|
4100
|
+
}
|
|
4101
|
+
function instance$1($$self, $$props, $$invalidate) {
|
|
4102
|
+
var closeModal = $$props.closeModal;
|
|
4103
|
+
var logout = $$props.logout;
|
|
4104
|
+
var _a = $$props.displayProfile, displayProfile = _a === void 0 ? "profile" : _a;
|
|
4105
|
+
function profilemodalnav_displayProfile_binding(value) {
|
|
4106
|
+
displayProfile = value;
|
|
4107
|
+
$$invalidate(0, displayProfile);
|
|
4108
|
+
}
|
|
4109
|
+
function securityinfocontent_displayProfile_binding(value) {
|
|
4110
|
+
displayProfile = value;
|
|
4111
|
+
$$invalidate(0, displayProfile);
|
|
4112
|
+
}
|
|
4113
|
+
function passwordinfocontent_displayProfile_binding(value) {
|
|
4114
|
+
displayProfile = value;
|
|
4115
|
+
$$invalidate(0, displayProfile);
|
|
4116
|
+
}
|
|
4117
|
+
$$self.$$set = function ($$props) {
|
|
4118
|
+
if ('closeModal' in $$props)
|
|
4119
|
+
$$invalidate(1, closeModal = $$props.closeModal);
|
|
4120
|
+
if ('logout' in $$props)
|
|
4121
|
+
$$invalidate(2, logout = $$props.logout);
|
|
4122
|
+
if ('displayProfile' in $$props)
|
|
4123
|
+
$$invalidate(0, displayProfile = $$props.displayProfile);
|
|
4124
|
+
};
|
|
4125
|
+
return [
|
|
4126
|
+
displayProfile,
|
|
4127
|
+
closeModal,
|
|
4128
|
+
logout,
|
|
4129
|
+
profilemodalnav_displayProfile_binding,
|
|
4130
|
+
securityinfocontent_displayProfile_binding,
|
|
4131
|
+
passwordinfocontent_displayProfile_binding
|
|
4132
|
+
];
|
|
4133
|
+
}
|
|
4134
|
+
var ProfileModal = /** @class */ (function (_super) {
|
|
4135
|
+
__extends(ProfileModal, _super);
|
|
4136
|
+
function ProfileModal(options) {
|
|
4137
|
+
var _this = _super.call(this) || this;
|
|
4138
|
+
init(_this, options, instance$1, create_fragment$1, safe_not_equal, {
|
|
4139
|
+
closeModal: 1,
|
|
4140
|
+
logout: 2,
|
|
4141
|
+
displayProfile: 0
|
|
4142
|
+
});
|
|
4143
|
+
return _this;
|
|
4144
|
+
}
|
|
4145
|
+
return ProfileModal;
|
|
4146
|
+
}(SvelteComponent));
|
|
4147
|
+
/* src/Main.svelte generated by Svelte v3.48.0 */
|
|
4148
|
+
function add_css(target) {
|
|
4149
|
+
append_styles(target, "svelte-tmmzoj", "@import url(\"https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap\");#msOverlay.svelte-tmmzoj{position:fixed;display:flex;justify-content:center;align-items:center;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);z-index:2;overflow:scroll;font-family:\"Plus Jakarta Sans\", sans-serif}.--hide{display:none}.ms__loader{position:relative;z-index:10000000}#msLoader path{fill:#007ace}.ms-modal{box-sizing:border-box;margin:auto;min-width:0;position:relative;outline:none;background:white;border-radius:16px;box-shadow:2px 2px 12px rgb(0 0 0 / 10%);width:360px;color:rgb(10, 10, 10)}.ms-modal--profile{width:700px}.ms-modal__close{box-sizing:border-box;margin:0;min-width:0;position:absolute;top:16px;right:16px;z-index:10;line-height:0}.ms-modal__close button{appearance:none;padding:0;outline:none;width:12px;border:0;background:transparent;cursor:pointer;color:#5c5c5c}.ms-modal__close button:hover{color:#0a0a0a}.ms-modal__back{box-sizing:border-box;margin:0;min-width:0;position:absolute;top:16px;left:16px;z-index:10;line-height:0}.ms-modal__back button{appearance:none;padding:0;outline:none;width:12px;border:0;background:transparent;cursor:pointer;color:#5c5c5c}.ms-modal__back button:hover, .ms-modal__profile-back button:hover{color:#0a0a0a}.ms-modal__back svg{height:12px}.ms-modal__profile-back button{appearance:none;padding:5px;margin-right:6px;outline:none;width:25px;height:25px;border:0;background:transparent;cursor:pointer;color:#5c5c5c;display:flex;align-items:stretch;justify-content:center}.ms-modal__header{display:flex;align-items:center;padding:12px}.ms-modal__content{padding:28px 28px 20px;width:100%;box-sizing:border-box;margin:0 auto}.ms-modal__content--profile{padding:0;display:flex;flex-wrap:wrap;align-content:stretch;align-items:stretch;border-top:1px solid #DDDDDD}.ms-modal__content-left{padding:20px;border-right:1px solid #DDDDDD}.ms-modal__content-right{padding:20px;flex-grow:1}.ms-modal__figure{box-sizing:border-box;margin:8px auto;display:flex;width:44px;height:44px;border-radius:100%;border:1px solid rgb(235, 235, 235);box-shadow:rgb(0 0 0 / 4%) 0px 2px 2px 0px;padding:7px}.ms-modal__figure--profile{width:24px;height:24px;padding:3px;margin:0px 8px 0px 0px}.ms-modal__title-container{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.ms-modal__title{margin-bottom:36px;margin-top:0;text-align:center;font-size:24px;line-height:32px;font-weight:500}.ms-modal__title--profile{margin-bottom:0px}.ms-modal__title-group{display:flex;align-items:center}.ms-modal__title--sub-text{margin-bottom:8px}.ms-modal__text{font-weight:500;font-size:16px;line-height:28px;text-align:center;margin:0 0 20px 0}.ms-form{width:100%}.ms-form__group{margin-bottom:20px}.ms-form__flex{display:flex;justify-content:space-between;align-content:center}.ms-form__flex--centered{justify-content:center}.ms-form__label{margin-bottom:4px;margin-top:0px;font-size:14px;line-height:28px;font-weight:500}.ms-form__fieldset{display:flex;justify-content:space-between;padding:0;border:none}.ms-form__input{box-sizing:border-box;margin:0px;border:1px solid rgb(201, 201, 201);border-radius:6px;font-size:16px;font-weight:400;padding:15px;width:100%}.ms-form__password-container{display:flex;justify-content:space-between;align-content:center;box-sizing:border-box;margin:0px;border:1px solid rgb(201, 201, 201);border-radius:6px;width:100%}.ms-form__password-container:focus-within{border:1px solid rgb(0, 68, 252);outline:rgb(0, 68, 252) solid 1px}.ms-form__password-container:focus-within input{outline:none;border-color:rgb(201, 201, 201);box-shadow:none}.ms-form__input--password{border:none}.ms-form__input--token{font-weight:500;font-size:24.19px;line-height:32px;text-align:center;color:#000000;padding:9px;max-width:42px}.ms-form__show-toggle{cursor:pointer;background:transparent;border-radius:0px 6px 6px 0px;padding:0px 8px;display:flex;align-items:center}.ms-form__eye{display:block;width:22px}.ms-form__eye-slash{display:block;width:22px}.ms-form__error{font-weight:500;font-size:12px;line-height:16px;color:#e40023;margin-top:4px;display:flex;align-items:baseline}.ms-form__error svg{width:10px;height:10px;margin-right:5px}.ms-form__label--right a{color:rgb(10, 10, 10) !important;text-decoration:none;font-weight:400}.ms-form__button{border-radius:6px;font-weight:700;font-size:16px;padding-left:22px;padding-right:22px;height:52px;border:none;display:block;width:100%;background-color:rgb(41, 98, 255);color:#fff;transition:background-color 0.5s ease;cursor:pointer}.ms-form__button:hover{background-color:#0745ff}.ms-form__button:disabled{background-color:#96C0FE;color:#fff;pointer-events:none}#msFormLoader path{fill:#fff}a.ms-form__link{margin-top:8px;font-weight:500;font-size:14px;line-height:24px;color:rgb(10, 10, 10) !important;text-decoration:none}.ms-modal__cancel-button{background:#F6F6F6;color:#828282;padding:8px;margin-right:8px;border-radius:4px;border:none;font-weight:700;font-size:14px;line-height:16px;cursor:pointer}.ms-modal__save-button{background:#2962FF;color:#fff;padding:8px;border-radius:4px;border:none;font-weight:700;font-size:14px;line-height:16px;cursor:pointer}.ms-modal__outline-button{background:#fff;color:#0A0A0A;font-weight:700;font-size:14px;line-height:16px;padding:12px;margin-right:8px;border-radius:4px;border:1px solid #DDDDDD;cursor:pointer}.ms-modal__outline-button svg{height:14px;margin-right:6px}.ms-modal__button-label{margin-bottom:4px;margin-top:0px;font-size:14px;line-height:28px;font-weight:500}.ms-modal__profile-option{cursor:pointer;margin-bottom:20px;font-weight:500;font-size:16px;line-height:28px}.ms-modal__profile-option svg{height:14px;margin-right:8px}.ms-modal__profile-option:hover{color:#2962FF}.ms-modal__profile-option--active{color:#2962FF}.ms-modal__social-divider{display:flex;align-items:center;margin:20px 0px}.ms-modal__divider-line{text-align:center;background:#dddddd;height:1px;width:100%}.ms-modal__divider-text{padding:0px 4px}.ms-modal__footer{text-align:center;width:100%;box-sizing:border-box;margin:0;min-width:0;background:#f6f6f6;padding-top:10px;padding-bottom:10px;border-bottom-left-radius:16px;border-bottom-right-radius:16px;border-top:1px solid;border-top-color:#dddddd;font-size:12px;line-height:16px;font-weight:500}.ms-modal__footer a{color:rgb(10, 10, 10);text-decoration:none}.ms-modal__footer svg{height:12px;width:12px}");
|
|
4150
|
+
}
|
|
4151
|
+
// (23:2) {#if showLoader}
|
|
4152
|
+
function create_if_block_5(ctx) {
|
|
4153
|
+
var loader;
|
|
4154
|
+
var current;
|
|
4155
|
+
loader = new Loader({});
|
|
4156
|
+
return {
|
|
4157
|
+
c: function () {
|
|
4158
|
+
create_component(loader.$$.fragment);
|
|
4159
|
+
},
|
|
4160
|
+
m: function (target, anchor) {
|
|
4161
|
+
mount_component(loader, target, anchor);
|
|
4162
|
+
current = true;
|
|
4163
|
+
},
|
|
4164
|
+
i: function (local) {
|
|
4165
|
+
if (current)
|
|
4166
|
+
return;
|
|
4167
|
+
transition_in(loader.$$.fragment, local);
|
|
4168
|
+
current = true;
|
|
4169
|
+
},
|
|
4170
|
+
o: function (local) {
|
|
4171
|
+
transition_out(loader.$$.fragment, local);
|
|
4172
|
+
current = false;
|
|
4173
|
+
},
|
|
4174
|
+
d: function (detaching) {
|
|
4175
|
+
destroy_component(loader, detaching);
|
|
4176
|
+
}
|
|
4177
|
+
};
|
|
4178
|
+
}
|
|
4179
|
+
// (35:34)
|
|
4180
|
+
function create_if_block_4(ctx) {
|
|
4181
|
+
var profilemodal;
|
|
4182
|
+
var updating_display;
|
|
4183
|
+
var current;
|
|
4184
|
+
function profilemodal_display_binding(value) {
|
|
4185
|
+
/*profilemodal_display_binding*/ ctx[11](value);
|
|
4186
|
+
}
|
|
4187
|
+
var profilemodal_props = { closeModal: /*closeModal*/ ctx[4] };
|
|
4188
|
+
if ( /*display*/ctx[0] !== void 0) {
|
|
4189
|
+
profilemodal_props.display = /*display*/ ctx[0];
|
|
4190
|
+
}
|
|
4191
|
+
profilemodal = new ProfileModal({ props: profilemodal_props });
|
|
4192
|
+
binding_callbacks.push(function () { return bind(profilemodal, 'display', profilemodal_display_binding); });
|
|
4193
|
+
return {
|
|
4194
|
+
c: function () {
|
|
4195
|
+
create_component(profilemodal.$$.fragment);
|
|
4196
|
+
},
|
|
4197
|
+
m: function (target, anchor) {
|
|
4198
|
+
mount_component(profilemodal, target, anchor);
|
|
4199
|
+
current = true;
|
|
4200
|
+
},
|
|
4201
|
+
p: function (ctx, dirty) {
|
|
4202
|
+
var profilemodal_changes = {};
|
|
4203
|
+
if (!updating_display && dirty & /*display*/ 1) {
|
|
4204
|
+
updating_display = true;
|
|
4205
|
+
profilemodal_changes.display = /*display*/ ctx[0];
|
|
4206
|
+
add_flush_callback(function () { return updating_display = false; });
|
|
4207
|
+
}
|
|
4208
|
+
profilemodal.$set(profilemodal_changes);
|
|
4209
|
+
},
|
|
4210
|
+
i: function (local) {
|
|
4211
|
+
if (current)
|
|
4212
|
+
return;
|
|
4213
|
+
transition_in(profilemodal.$$.fragment, local);
|
|
4214
|
+
current = true;
|
|
4215
|
+
},
|
|
4216
|
+
o: function (local) {
|
|
4217
|
+
transition_out(profilemodal.$$.fragment, local);
|
|
4218
|
+
current = false;
|
|
4219
|
+
},
|
|
4220
|
+
d: function (detaching) {
|
|
4221
|
+
destroy_component(profilemodal, detaching);
|
|
4222
|
+
}
|
|
4223
|
+
};
|
|
4224
|
+
}
|
|
4225
|
+
// (33:41)
|
|
4226
|
+
function create_if_block_3(ctx) {
|
|
4227
|
+
var passwordtokenmodal;
|
|
4228
|
+
var updating_display;
|
|
4229
|
+
var current;
|
|
4230
|
+
function passwordtokenmodal_display_binding(value) {
|
|
4231
|
+
/*passwordtokenmodal_display_binding*/ ctx[10](value);
|
|
4232
|
+
}
|
|
4233
|
+
var passwordtokenmodal_props = {
|
|
4234
|
+
closeModal: /*closeModal*/ ctx[4],
|
|
4235
|
+
onSuccessPasswordReset: /*onSuccess*/ ctx[3]
|
|
4236
|
+
};
|
|
4237
|
+
if ( /*display*/ctx[0] !== void 0) {
|
|
4238
|
+
passwordtokenmodal_props.display = /*display*/ ctx[0];
|
|
4239
|
+
}
|
|
4240
|
+
passwordtokenmodal = new PassTokenModal({ props: passwordtokenmodal_props });
|
|
4241
|
+
binding_callbacks.push(function () { return bind(passwordtokenmodal, 'display', passwordtokenmodal_display_binding); });
|
|
4242
|
+
return {
|
|
4243
|
+
c: function () {
|
|
4244
|
+
create_component(passwordtokenmodal.$$.fragment);
|
|
4245
|
+
},
|
|
4246
|
+
m: function (target, anchor) {
|
|
4247
|
+
mount_component(passwordtokenmodal, target, anchor);
|
|
4248
|
+
current = true;
|
|
4249
|
+
},
|
|
4250
|
+
p: function (ctx, dirty) {
|
|
4251
|
+
var passwordtokenmodal_changes = {};
|
|
4252
|
+
if (dirty & /*onSuccess*/ 8)
|
|
4253
|
+
passwordtokenmodal_changes.onSuccessPasswordReset = /*onSuccess*/ ctx[3];
|
|
4254
|
+
if (!updating_display && dirty & /*display*/ 1) {
|
|
4255
|
+
updating_display = true;
|
|
4256
|
+
passwordtokenmodal_changes.display = /*display*/ ctx[0];
|
|
4257
|
+
add_flush_callback(function () { return updating_display = false; });
|
|
4258
|
+
}
|
|
4259
|
+
passwordtokenmodal.$set(passwordtokenmodal_changes);
|
|
4260
|
+
},
|
|
4261
|
+
i: function (local) {
|
|
4262
|
+
if (current)
|
|
4263
|
+
return;
|
|
4264
|
+
transition_in(passwordtokenmodal.$$.fragment, local);
|
|
4265
|
+
current = true;
|
|
4266
|
+
},
|
|
4267
|
+
o: function (local) {
|
|
4268
|
+
transition_out(passwordtokenmodal.$$.fragment, local);
|
|
4269
|
+
current = false;
|
|
4270
|
+
},
|
|
4271
|
+
d: function (detaching) {
|
|
4272
|
+
destroy_component(passwordtokenmodal, detaching);
|
|
4273
|
+
}
|
|
4274
|
+
};
|
|
4275
|
+
}
|
|
4276
|
+
// (31:42)
|
|
4277
|
+
function create_if_block_2(ctx) {
|
|
4278
|
+
var passwordresetmodal;
|
|
4279
|
+
var updating_display;
|
|
4280
|
+
var current;
|
|
4281
|
+
function passwordresetmodal_display_binding(value) {
|
|
4282
|
+
/*passwordresetmodal_display_binding*/ ctx[9](value);
|
|
4283
|
+
}
|
|
4284
|
+
var passwordresetmodal_props = { closeModal: /*closeModal*/ ctx[4] };
|
|
4285
|
+
if ( /*display*/ctx[0] !== void 0) {
|
|
4286
|
+
passwordresetmodal_props.display = /*display*/ ctx[0];
|
|
4287
|
+
}
|
|
4288
|
+
passwordresetmodal = new PassResetModal({ props: passwordresetmodal_props });
|
|
4289
|
+
binding_callbacks.push(function () { return bind(passwordresetmodal, 'display', passwordresetmodal_display_binding); });
|
|
4290
|
+
return {
|
|
4291
|
+
c: function () {
|
|
4292
|
+
create_component(passwordresetmodal.$$.fragment);
|
|
4293
|
+
},
|
|
4294
|
+
m: function (target, anchor) {
|
|
4295
|
+
mount_component(passwordresetmodal, target, anchor);
|
|
4296
|
+
current = true;
|
|
4297
|
+
},
|
|
4298
|
+
p: function (ctx, dirty) {
|
|
4299
|
+
var passwordresetmodal_changes = {};
|
|
4300
|
+
if (!updating_display && dirty & /*display*/ 1) {
|
|
4301
|
+
updating_display = true;
|
|
4302
|
+
passwordresetmodal_changes.display = /*display*/ ctx[0];
|
|
4303
|
+
add_flush_callback(function () { return updating_display = false; });
|
|
4304
|
+
}
|
|
4305
|
+
passwordresetmodal.$set(passwordresetmodal_changes);
|
|
4306
|
+
},
|
|
4307
|
+
i: function (local) {
|
|
4308
|
+
if (current)
|
|
4309
|
+
return;
|
|
4310
|
+
transition_in(passwordresetmodal.$$.fragment, local);
|
|
4311
|
+
current = true;
|
|
4312
|
+
},
|
|
4313
|
+
o: function (local) {
|
|
4314
|
+
transition_out(passwordresetmodal.$$.fragment, local);
|
|
4315
|
+
current = false;
|
|
4316
|
+
},
|
|
4317
|
+
d: function (detaching) {
|
|
4318
|
+
destroy_component(passwordresetmodal, detaching);
|
|
4319
|
+
}
|
|
4320
|
+
};
|
|
4321
|
+
}
|
|
4322
|
+
// (29:33)
|
|
4323
|
+
function create_if_block_1(ctx) {
|
|
4324
|
+
var signupmodal;
|
|
4325
|
+
var updating_display;
|
|
4326
|
+
var updating_params;
|
|
4327
|
+
var current;
|
|
4328
|
+
function signupmodal_display_binding(value) {
|
|
4329
|
+
/*signupmodal_display_binding*/ ctx[7](value);
|
|
4330
|
+
}
|
|
4331
|
+
function signupmodal_params_binding(value) {
|
|
4332
|
+
/*signupmodal_params_binding*/ ctx[8](value);
|
|
4333
|
+
}
|
|
4334
|
+
var signupmodal_props = {
|
|
4335
|
+
closeModal: /*closeModal*/ ctx[4],
|
|
4336
|
+
onSuccessSignup: /*onSuccess*/ ctx[3]
|
|
4337
|
+
};
|
|
4338
|
+
if ( /*display*/ctx[0] !== void 0) {
|
|
4339
|
+
signupmodal_props.display = /*display*/ ctx[0];
|
|
4340
|
+
}
|
|
4341
|
+
if ( /*params*/ctx[1] !== void 0) {
|
|
4342
|
+
signupmodal_props.params = /*params*/ ctx[1];
|
|
4343
|
+
}
|
|
4344
|
+
signupmodal = new SignupModal({ props: signupmodal_props });
|
|
4345
|
+
binding_callbacks.push(function () { return bind(signupmodal, 'display', signupmodal_display_binding); });
|
|
4346
|
+
binding_callbacks.push(function () { return bind(signupmodal, 'params', signupmodal_params_binding); });
|
|
4347
|
+
return {
|
|
4348
|
+
c: function () {
|
|
4349
|
+
create_component(signupmodal.$$.fragment);
|
|
4350
|
+
},
|
|
4351
|
+
m: function (target, anchor) {
|
|
4352
|
+
mount_component(signupmodal, target, anchor);
|
|
4353
|
+
current = true;
|
|
4354
|
+
},
|
|
4355
|
+
p: function (ctx, dirty) {
|
|
4356
|
+
var signupmodal_changes = {};
|
|
4357
|
+
if (dirty & /*onSuccess*/ 8)
|
|
4358
|
+
signupmodal_changes.onSuccessSignup = /*onSuccess*/ ctx[3];
|
|
4359
|
+
if (!updating_display && dirty & /*display*/ 1) {
|
|
4360
|
+
updating_display = true;
|
|
4361
|
+
signupmodal_changes.display = /*display*/ ctx[0];
|
|
4362
|
+
add_flush_callback(function () { return updating_display = false; });
|
|
4363
|
+
}
|
|
4364
|
+
if (!updating_params && dirty & /*params*/ 2) {
|
|
4365
|
+
updating_params = true;
|
|
4366
|
+
signupmodal_changes.params = /*params*/ ctx[1];
|
|
4367
|
+
add_flush_callback(function () { return updating_params = false; });
|
|
4368
|
+
}
|
|
4369
|
+
signupmodal.$set(signupmodal_changes);
|
|
4370
|
+
},
|
|
4371
|
+
i: function (local) {
|
|
4372
|
+
if (current)
|
|
4373
|
+
return;
|
|
4374
|
+
transition_in(signupmodal.$$.fragment, local);
|
|
4375
|
+
current = true;
|
|
4376
|
+
},
|
|
4377
|
+
o: function (local) {
|
|
4378
|
+
transition_out(signupmodal.$$.fragment, local);
|
|
4379
|
+
current = false;
|
|
4380
|
+
},
|
|
4381
|
+
d: function (detaching) {
|
|
4382
|
+
destroy_component(signupmodal, detaching);
|
|
4383
|
+
}
|
|
4384
|
+
};
|
|
4385
|
+
}
|
|
4386
|
+
// (27:2) {#if display === "login"}
|
|
4387
|
+
function create_if_block(ctx) {
|
|
4388
|
+
var loginmodal;
|
|
4389
|
+
var updating_display;
|
|
4390
|
+
var updating_params;
|
|
4391
|
+
var current;
|
|
4392
|
+
function loginmodal_display_binding(value) {
|
|
4393
|
+
/*loginmodal_display_binding*/ ctx[5](value);
|
|
4394
|
+
}
|
|
4395
|
+
function loginmodal_params_binding(value) {
|
|
4396
|
+
/*loginmodal_params_binding*/ ctx[6](value);
|
|
4397
|
+
}
|
|
4398
|
+
var loginmodal_props = {
|
|
4399
|
+
closeModal: /*closeModal*/ ctx[4],
|
|
4400
|
+
onSuccessLogin: /*onSuccess*/ ctx[3]
|
|
4401
|
+
};
|
|
4402
|
+
if ( /*display*/ctx[0] !== void 0) {
|
|
4403
|
+
loginmodal_props.display = /*display*/ ctx[0];
|
|
4404
|
+
}
|
|
4405
|
+
if ( /*params*/ctx[1] !== void 0) {
|
|
4406
|
+
loginmodal_props.params = /*params*/ ctx[1];
|
|
4407
|
+
}
|
|
4408
|
+
loginmodal = new LoginModal({ props: loginmodal_props });
|
|
4409
|
+
binding_callbacks.push(function () { return bind(loginmodal, 'display', loginmodal_display_binding); });
|
|
4410
|
+
binding_callbacks.push(function () { return bind(loginmodal, 'params', loginmodal_params_binding); });
|
|
4411
|
+
return {
|
|
4412
|
+
c: function () {
|
|
4413
|
+
create_component(loginmodal.$$.fragment);
|
|
4414
|
+
},
|
|
4415
|
+
m: function (target, anchor) {
|
|
4416
|
+
mount_component(loginmodal, target, anchor);
|
|
4417
|
+
current = true;
|
|
4418
|
+
},
|
|
4419
|
+
p: function (ctx, dirty) {
|
|
4420
|
+
var loginmodal_changes = {};
|
|
4421
|
+
if (dirty & /*onSuccess*/ 8)
|
|
4422
|
+
loginmodal_changes.onSuccessLogin = /*onSuccess*/ ctx[3];
|
|
4423
|
+
if (!updating_display && dirty & /*display*/ 1) {
|
|
4424
|
+
updating_display = true;
|
|
4425
|
+
loginmodal_changes.display = /*display*/ ctx[0];
|
|
4426
|
+
add_flush_callback(function () { return updating_display = false; });
|
|
4427
|
+
}
|
|
4428
|
+
if (!updating_params && dirty & /*params*/ 2) {
|
|
4429
|
+
updating_params = true;
|
|
4430
|
+
loginmodal_changes.params = /*params*/ ctx[1];
|
|
4431
|
+
add_flush_callback(function () { return updating_params = false; });
|
|
4432
|
+
}
|
|
4433
|
+
loginmodal.$set(loginmodal_changes);
|
|
4434
|
+
},
|
|
4435
|
+
i: function (local) {
|
|
4436
|
+
if (current)
|
|
4437
|
+
return;
|
|
4438
|
+
transition_in(loginmodal.$$.fragment, local);
|
|
4439
|
+
current = true;
|
|
4440
|
+
},
|
|
4441
|
+
o: function (local) {
|
|
4442
|
+
transition_out(loginmodal.$$.fragment, local);
|
|
4443
|
+
current = false;
|
|
4444
|
+
},
|
|
4445
|
+
d: function (detaching) {
|
|
4446
|
+
destroy_component(loginmodal, detaching);
|
|
4447
|
+
}
|
|
4448
|
+
};
|
|
4449
|
+
}
|
|
4450
|
+
function create_fragment(ctx) {
|
|
4451
|
+
var main;
|
|
4452
|
+
var t;
|
|
4453
|
+
var current_block_type_index;
|
|
4454
|
+
var if_block1;
|
|
4455
|
+
var current;
|
|
4456
|
+
var if_block0 = /*showLoader*/ ctx[2] && create_if_block_5();
|
|
4457
|
+
var if_block_creators = [
|
|
4458
|
+
create_if_block,
|
|
4459
|
+
create_if_block_1,
|
|
4460
|
+
create_if_block_2,
|
|
4461
|
+
create_if_block_3,
|
|
4462
|
+
create_if_block_4
|
|
4463
|
+
];
|
|
4464
|
+
var if_blocks = [];
|
|
4465
|
+
function select_block_type(ctx, dirty) {
|
|
4466
|
+
if ( /*display*/ctx[0] === "login")
|
|
4467
|
+
return 0;
|
|
4468
|
+
if ( /*display*/ctx[0] === "signup")
|
|
4469
|
+
return 1;
|
|
4470
|
+
if ( /*display*/ctx[0] === "forgot_password")
|
|
4471
|
+
return 2;
|
|
4472
|
+
if ( /*display*/ctx[0] === "reset_password")
|
|
4473
|
+
return 3;
|
|
4474
|
+
if ( /*display*/ctx[0] === "profile")
|
|
4475
|
+
return 4;
|
|
4476
|
+
return -1;
|
|
4477
|
+
}
|
|
4478
|
+
if (~(current_block_type_index = select_block_type(ctx))) {
|
|
4479
|
+
if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
4480
|
+
}
|
|
4481
|
+
return {
|
|
4482
|
+
c: function () {
|
|
4483
|
+
main = element("main");
|
|
4484
|
+
if (if_block0)
|
|
4485
|
+
if_block0.c();
|
|
4486
|
+
t = space();
|
|
4487
|
+
if (if_block1)
|
|
4488
|
+
if_block1.c();
|
|
4489
|
+
attr(main, "id", "msOverlay");
|
|
4490
|
+
attr(main, "class", "svelte-tmmzoj");
|
|
4491
|
+
},
|
|
4492
|
+
m: function (target, anchor) {
|
|
4493
|
+
insert(target, main, anchor);
|
|
4494
|
+
if (if_block0)
|
|
4495
|
+
if_block0.m(main, null);
|
|
4496
|
+
append(main, t);
|
|
4497
|
+
if (~current_block_type_index) {
|
|
4498
|
+
if_blocks[current_block_type_index].m(main, null);
|
|
4499
|
+
}
|
|
4500
|
+
current = true;
|
|
4501
|
+
},
|
|
4502
|
+
p: function (ctx, _a) {
|
|
4503
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
4504
|
+
if ( /*showLoader*/ctx[2]) {
|
|
4505
|
+
if (if_block0) {
|
|
4506
|
+
if (dirty & /*showLoader*/ 4) {
|
|
4507
|
+
transition_in(if_block0, 1);
|
|
4508
|
+
}
|
|
4509
|
+
}
|
|
4510
|
+
else {
|
|
4511
|
+
if_block0 = create_if_block_5();
|
|
4512
|
+
if_block0.c();
|
|
4513
|
+
transition_in(if_block0, 1);
|
|
4514
|
+
if_block0.m(main, t);
|
|
4515
|
+
}
|
|
4516
|
+
}
|
|
4517
|
+
else if (if_block0) {
|
|
4518
|
+
group_outros();
|
|
4519
|
+
transition_out(if_block0, 1, 1, function () {
|
|
4520
|
+
if_block0 = null;
|
|
4521
|
+
});
|
|
4522
|
+
check_outros();
|
|
4523
|
+
}
|
|
4524
|
+
var previous_block_index = current_block_type_index;
|
|
4525
|
+
current_block_type_index = select_block_type(ctx);
|
|
4526
|
+
if (current_block_type_index === previous_block_index) {
|
|
4527
|
+
if (~current_block_type_index) {
|
|
4528
|
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
|
4529
|
+
}
|
|
4530
|
+
}
|
|
4531
|
+
else {
|
|
4532
|
+
if (if_block1) {
|
|
4533
|
+
group_outros();
|
|
4534
|
+
transition_out(if_blocks[previous_block_index], 1, 1, function () {
|
|
4535
|
+
if_blocks[previous_block_index] = null;
|
|
4536
|
+
});
|
|
4537
|
+
check_outros();
|
|
4538
|
+
}
|
|
4539
|
+
if (~current_block_type_index) {
|
|
4540
|
+
if_block1 = if_blocks[current_block_type_index];
|
|
4541
|
+
if (!if_block1) {
|
|
4542
|
+
if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
4543
|
+
if_block1.c();
|
|
4544
|
+
}
|
|
4545
|
+
else {
|
|
4546
|
+
if_block1.p(ctx, dirty);
|
|
4547
|
+
}
|
|
4548
|
+
transition_in(if_block1, 1);
|
|
4549
|
+
if_block1.m(main, null);
|
|
4550
|
+
}
|
|
4551
|
+
else {
|
|
4552
|
+
if_block1 = null;
|
|
4553
|
+
}
|
|
4554
|
+
}
|
|
4555
|
+
},
|
|
4556
|
+
i: function (local) {
|
|
4557
|
+
if (current)
|
|
4558
|
+
return;
|
|
4559
|
+
transition_in(if_block0);
|
|
4560
|
+
transition_in(if_block1);
|
|
4561
|
+
current = true;
|
|
4562
|
+
},
|
|
4563
|
+
o: function (local) {
|
|
4564
|
+
transition_out(if_block0);
|
|
4565
|
+
transition_out(if_block1);
|
|
4566
|
+
current = false;
|
|
4567
|
+
},
|
|
4568
|
+
d: function (detaching) {
|
|
4569
|
+
if (detaching)
|
|
4570
|
+
detach(main);
|
|
4571
|
+
if (if_block0)
|
|
4572
|
+
if_block0.d();
|
|
4573
|
+
if (~current_block_type_index) {
|
|
4574
|
+
if_blocks[current_block_type_index].d();
|
|
4575
|
+
}
|
|
4576
|
+
}
|
|
4577
|
+
};
|
|
4578
|
+
}
|
|
4579
|
+
function instance($$self, $$props, $$invalidate) {
|
|
4580
|
+
var _a = $$props.showLoader, showLoader = _a === void 0 ? false : _a;
|
|
4581
|
+
var _b = $$props.display, display = _b === void 0 ? "login" : _b; // or "signup", "forgot_password", "reset_password", and "profile"
|
|
4582
|
+
var onSuccess = $$props.onSuccess;
|
|
4583
|
+
var params = $$props.params;
|
|
4584
|
+
function closeModal() {
|
|
4585
|
+
onSuccess({ type: "CLOSED" });
|
|
4586
|
+
document.querySelector("#msOverlay").remove();
|
|
4587
|
+
}
|
|
4588
|
+
function loginmodal_display_binding(value) {
|
|
4589
|
+
display = value;
|
|
4590
|
+
$$invalidate(0, display);
|
|
4591
|
+
}
|
|
4592
|
+
function loginmodal_params_binding(value) {
|
|
4593
|
+
params = value;
|
|
4594
|
+
$$invalidate(1, params);
|
|
4595
|
+
}
|
|
4596
|
+
function signupmodal_display_binding(value) {
|
|
4597
|
+
display = value;
|
|
4598
|
+
$$invalidate(0, display);
|
|
4599
|
+
}
|
|
4600
|
+
function signupmodal_params_binding(value) {
|
|
4601
|
+
params = value;
|
|
4602
|
+
$$invalidate(1, params);
|
|
4603
|
+
}
|
|
4604
|
+
function passwordresetmodal_display_binding(value) {
|
|
4605
|
+
display = value;
|
|
4606
|
+
$$invalidate(0, display);
|
|
4607
|
+
}
|
|
4608
|
+
function passwordtokenmodal_display_binding(value) {
|
|
4609
|
+
display = value;
|
|
4610
|
+
$$invalidate(0, display);
|
|
4611
|
+
}
|
|
4612
|
+
function profilemodal_display_binding(value) {
|
|
4613
|
+
display = value;
|
|
4614
|
+
$$invalidate(0, display);
|
|
4615
|
+
}
|
|
4616
|
+
$$self.$$set = function ($$props) {
|
|
4617
|
+
if ('showLoader' in $$props)
|
|
4618
|
+
$$invalidate(2, showLoader = $$props.showLoader);
|
|
4619
|
+
if ('display' in $$props)
|
|
4620
|
+
$$invalidate(0, display = $$props.display);
|
|
4621
|
+
if ('onSuccess' in $$props)
|
|
4622
|
+
$$invalidate(3, onSuccess = $$props.onSuccess);
|
|
4623
|
+
if ('params' in $$props)
|
|
4624
|
+
$$invalidate(1, params = $$props.params);
|
|
4625
|
+
};
|
|
4626
|
+
return [
|
|
4627
|
+
display,
|
|
4628
|
+
params,
|
|
4629
|
+
showLoader,
|
|
4630
|
+
onSuccess,
|
|
4631
|
+
closeModal,
|
|
4632
|
+
loginmodal_display_binding,
|
|
4633
|
+
loginmodal_params_binding,
|
|
4634
|
+
signupmodal_display_binding,
|
|
4635
|
+
signupmodal_params_binding,
|
|
4636
|
+
passwordresetmodal_display_binding,
|
|
4637
|
+
passwordtokenmodal_display_binding,
|
|
4638
|
+
profilemodal_display_binding
|
|
4639
|
+
];
|
|
4640
|
+
}
|
|
4641
|
+
var Main = /** @class */ (function (_super) {
|
|
4642
|
+
__extends(Main, _super);
|
|
4643
|
+
function Main(options) {
|
|
4644
|
+
var _this = _super.call(this) || this;
|
|
4645
|
+
init(_this, options, instance, create_fragment, safe_not_equal, {
|
|
4646
|
+
showLoader: 2,
|
|
4647
|
+
display: 0,
|
|
4648
|
+
onSuccess: 3,
|
|
4649
|
+
params: 1
|
|
4650
|
+
}, add_css);
|
|
4651
|
+
return _this;
|
|
4652
|
+
}
|
|
4653
|
+
return Main;
|
|
4654
|
+
}(SvelteComponent));
|
|
4655
|
+
exports.default = Main;
|