@native-systems/ui 1.0.0

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.
@@ -0,0 +1,1320 @@
1
+ import * as React from 'react';
2
+ import React__default, {
3
+ useState,
4
+ createContext,
5
+ useRef,
6
+ useContext,
7
+ } from 'react';
8
+ import { useForm } from 'react-hook-form';
9
+ import {
10
+ PatternCompiler,
11
+ eqPlugin,
12
+ stringPlugin,
13
+ timezonePlugin,
14
+ userTimezonePlugin,
15
+ urlPlugin,
16
+ } from '@native-systems/utility';
17
+
18
+ // shim for using process in browser
19
+ // based off https://github.com/defunctzombie/node-process/blob/master/browser.js
20
+
21
+ var env = {};
22
+
23
+ var browser$1 = {
24
+ env: env,
25
+ };
26
+
27
+ var jsxRuntime = { exports: {} };
28
+
29
+ var reactJsxRuntime_production = {};
30
+
31
+ /**
32
+ * @license React
33
+ * react-jsx-runtime.production.js
34
+ *
35
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
36
+ *
37
+ * This source code is licensed under the MIT license found in the
38
+ * LICENSE file in the root directory of this source tree.
39
+ */
40
+
41
+ var hasRequiredReactJsxRuntime_production;
42
+
43
+ function requireReactJsxRuntime_production() {
44
+ if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
45
+ hasRequiredReactJsxRuntime_production = 1;
46
+ var REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element'),
47
+ REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
48
+ function jsxProd(type, config, maybeKey) {
49
+ var key = null;
50
+ void 0 !== maybeKey && (key = '' + maybeKey);
51
+ void 0 !== config.key && (key = '' + config.key);
52
+ if ('key' in config) {
53
+ maybeKey = {};
54
+ for (var propName in config)
55
+ 'key' !== propName && (maybeKey[propName] = config[propName]);
56
+ } else maybeKey = config;
57
+ config = maybeKey.ref;
58
+ return {
59
+ $$typeof: REACT_ELEMENT_TYPE,
60
+ type: type,
61
+ key: key,
62
+ ref: void 0 !== config ? config : null,
63
+ props: maybeKey,
64
+ };
65
+ }
66
+ reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
67
+ reactJsxRuntime_production.jsx = jsxProd;
68
+ reactJsxRuntime_production.jsxs = jsxProd;
69
+ return reactJsxRuntime_production;
70
+ }
71
+
72
+ var reactJsxRuntime_development = {};
73
+
74
+ var hasRequiredReactJsxRuntime_development;
75
+
76
+ function requireReactJsxRuntime_development() {
77
+ if (hasRequiredReactJsxRuntime_development)
78
+ return reactJsxRuntime_development;
79
+ hasRequiredReactJsxRuntime_development = 1;
80
+ 'production' !== browser$1.env.NODE_ENV &&
81
+ (function () {
82
+ function getComponentNameFromType(type) {
83
+ if (null == type) return null;
84
+ if ('function' === typeof type)
85
+ return type.$$typeof === REACT_CLIENT_REFERENCE
86
+ ? null
87
+ : type.displayName || type.name || null;
88
+ if ('string' === typeof type) return type;
89
+ switch (type) {
90
+ case REACT_FRAGMENT_TYPE:
91
+ return 'Fragment';
92
+ case REACT_PROFILER_TYPE:
93
+ return 'Profiler';
94
+ case REACT_STRICT_MODE_TYPE:
95
+ return 'StrictMode';
96
+ case REACT_SUSPENSE_TYPE:
97
+ return 'Suspense';
98
+ case REACT_SUSPENSE_LIST_TYPE:
99
+ return 'SuspenseList';
100
+ case REACT_ACTIVITY_TYPE:
101
+ return 'Activity';
102
+ }
103
+ if ('object' === typeof type)
104
+ switch (
105
+ ('number' === typeof type.tag &&
106
+ console.error(
107
+ 'Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.'
108
+ ),
109
+ type.$$typeof)
110
+ ) {
111
+ case REACT_PORTAL_TYPE:
112
+ return 'Portal';
113
+ case REACT_CONTEXT_TYPE:
114
+ return (type.displayName || 'Context') + '.Provider';
115
+ case REACT_CONSUMER_TYPE:
116
+ return (type._context.displayName || 'Context') + '.Consumer';
117
+ case REACT_FORWARD_REF_TYPE:
118
+ var innerType = type.render;
119
+ type = type.displayName;
120
+ type ||
121
+ ((type = innerType.displayName || innerType.name || ''),
122
+ (type =
123
+ '' !== type ? 'ForwardRef(' + type + ')' : 'ForwardRef'));
124
+ return type;
125
+ case REACT_MEMO_TYPE:
126
+ return (
127
+ (innerType = type.displayName || null),
128
+ null !== innerType
129
+ ? innerType
130
+ : getComponentNameFromType(type.type) || 'Memo'
131
+ );
132
+ case REACT_LAZY_TYPE:
133
+ innerType = type._payload;
134
+ type = type._init;
135
+ try {
136
+ return getComponentNameFromType(type(innerType));
137
+ } catch (x) {}
138
+ }
139
+ return null;
140
+ }
141
+ function testStringCoercion(value) {
142
+ return '' + value;
143
+ }
144
+ function checkKeyStringCoercion(value) {
145
+ try {
146
+ testStringCoercion(value);
147
+ var JSCompiler_inline_result = !1;
148
+ } catch (e) {
149
+ JSCompiler_inline_result = true;
150
+ }
151
+ if (JSCompiler_inline_result) {
152
+ JSCompiler_inline_result = console;
153
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
154
+ var JSCompiler_inline_result$jscomp$0 =
155
+ ('function' === typeof Symbol &&
156
+ Symbol.toStringTag &&
157
+ value[Symbol.toStringTag]) ||
158
+ value.constructor.name ||
159
+ 'Object';
160
+ JSCompiler_temp_const.call(
161
+ JSCompiler_inline_result,
162
+ 'The provided key is an unsupported type %s. This value must be coerced to a string before using it here.',
163
+ JSCompiler_inline_result$jscomp$0
164
+ );
165
+ return testStringCoercion(value);
166
+ }
167
+ }
168
+ function getTaskName(type) {
169
+ if (type === REACT_FRAGMENT_TYPE) return '<>';
170
+ if (
171
+ 'object' === typeof type &&
172
+ null !== type &&
173
+ type.$$typeof === REACT_LAZY_TYPE
174
+ )
175
+ return '<...>';
176
+ try {
177
+ var name = getComponentNameFromType(type);
178
+ return name ? '<' + name + '>' : '<...>';
179
+ } catch (x) {
180
+ return '<...>';
181
+ }
182
+ }
183
+ function getOwner() {
184
+ var dispatcher = ReactSharedInternals.A;
185
+ return null === dispatcher ? null : dispatcher.getOwner();
186
+ }
187
+ function UnknownOwner() {
188
+ return Error('react-stack-top-frame');
189
+ }
190
+ function hasValidKey(config) {
191
+ if (hasOwnProperty.call(config, 'key')) {
192
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
193
+ if (getter && getter.isReactWarning) return false;
194
+ }
195
+ return void 0 !== config.key;
196
+ }
197
+ function defineKeyPropWarningGetter(props, displayName) {
198
+ function warnAboutAccessingKey() {
199
+ specialPropKeyWarningShown ||
200
+ ((specialPropKeyWarningShown = true),
201
+ console.error(
202
+ '%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)',
203
+ displayName
204
+ ));
205
+ }
206
+ warnAboutAccessingKey.isReactWarning = true;
207
+ Object.defineProperty(props, 'key', {
208
+ get: warnAboutAccessingKey,
209
+ configurable: true,
210
+ });
211
+ }
212
+ function elementRefGetterWithDeprecationWarning() {
213
+ var componentName = getComponentNameFromType(this.type);
214
+ didWarnAboutElementRef[componentName] ||
215
+ ((didWarnAboutElementRef[componentName] = true),
216
+ console.error(
217
+ 'Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.'
218
+ ));
219
+ componentName = this.props.ref;
220
+ return void 0 !== componentName ? componentName : null;
221
+ }
222
+ function ReactElement(
223
+ type,
224
+ key,
225
+ self,
226
+ source,
227
+ owner,
228
+ props,
229
+ debugStack,
230
+ debugTask
231
+ ) {
232
+ self = props.ref;
233
+ type = {
234
+ $$typeof: REACT_ELEMENT_TYPE,
235
+ type: type,
236
+ key: key,
237
+ props: props,
238
+ _owner: owner,
239
+ };
240
+ null !== (void 0 !== self ? self : null)
241
+ ? Object.defineProperty(type, 'ref', {
242
+ enumerable: false,
243
+ get: elementRefGetterWithDeprecationWarning,
244
+ })
245
+ : Object.defineProperty(type, 'ref', {
246
+ enumerable: false,
247
+ value: null,
248
+ });
249
+ type._store = {};
250
+ Object.defineProperty(type._store, 'validated', {
251
+ configurable: false,
252
+ enumerable: false,
253
+ writable: true,
254
+ value: 0,
255
+ });
256
+ Object.defineProperty(type, '_debugInfo', {
257
+ configurable: false,
258
+ enumerable: false,
259
+ writable: true,
260
+ value: null,
261
+ });
262
+ Object.defineProperty(type, '_debugStack', {
263
+ configurable: false,
264
+ enumerable: false,
265
+ writable: true,
266
+ value: debugStack,
267
+ });
268
+ Object.defineProperty(type, '_debugTask', {
269
+ configurable: false,
270
+ enumerable: false,
271
+ writable: true,
272
+ value: debugTask,
273
+ });
274
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
275
+ return type;
276
+ }
277
+ function jsxDEVImpl(
278
+ type,
279
+ config,
280
+ maybeKey,
281
+ isStaticChildren,
282
+ source,
283
+ self,
284
+ debugStack,
285
+ debugTask
286
+ ) {
287
+ var children = config.children;
288
+ if (void 0 !== children)
289
+ if (isStaticChildren)
290
+ if (isArrayImpl(children)) {
291
+ for (
292
+ isStaticChildren = 0;
293
+ isStaticChildren < children.length;
294
+ isStaticChildren++
295
+ )
296
+ validateChildKeys(children[isStaticChildren]);
297
+ Object.freeze && Object.freeze(children);
298
+ } else
299
+ console.error(
300
+ 'React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.'
301
+ );
302
+ else validateChildKeys(children);
303
+ if (hasOwnProperty.call(config, 'key')) {
304
+ children = getComponentNameFromType(type);
305
+ var keys = Object.keys(config).filter(function (k) {
306
+ return 'key' !== k;
307
+ });
308
+ isStaticChildren =
309
+ 0 < keys.length
310
+ ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}'
311
+ : '{key: someKey}';
312
+ didWarnAboutKeySpread[children + isStaticChildren] ||
313
+ ((keys =
314
+ 0 < keys.length ? '{' + keys.join(': ..., ') + ': ...}' : '{}'),
315
+ console.error(
316
+ 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
317
+ isStaticChildren,
318
+ children,
319
+ keys,
320
+ children
321
+ ),
322
+ (didWarnAboutKeySpread[children + isStaticChildren] = true));
323
+ }
324
+ children = null;
325
+ void 0 !== maybeKey &&
326
+ (checkKeyStringCoercion(maybeKey), (children = '' + maybeKey));
327
+ hasValidKey(config) &&
328
+ (checkKeyStringCoercion(config.key), (children = '' + config.key));
329
+ if ('key' in config) {
330
+ maybeKey = {};
331
+ for (var propName in config)
332
+ 'key' !== propName && (maybeKey[propName] = config[propName]);
333
+ } else maybeKey = config;
334
+ children &&
335
+ defineKeyPropWarningGetter(
336
+ maybeKey,
337
+ 'function' === typeof type
338
+ ? type.displayName || type.name || 'Unknown'
339
+ : type
340
+ );
341
+ return ReactElement(
342
+ type,
343
+ children,
344
+ self,
345
+ source,
346
+ getOwner(),
347
+ maybeKey,
348
+ debugStack,
349
+ debugTask
350
+ );
351
+ }
352
+ function validateChildKeys(node) {
353
+ 'object' === typeof node &&
354
+ null !== node &&
355
+ node.$$typeof === REACT_ELEMENT_TYPE &&
356
+ node._store &&
357
+ (node._store.validated = 1);
358
+ }
359
+ var React = React__default,
360
+ REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element'),
361
+ REACT_PORTAL_TYPE = Symbol.for('react.portal'),
362
+ REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'),
363
+ REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'),
364
+ REACT_PROFILER_TYPE = Symbol.for('react.profiler');
365
+ var REACT_CONSUMER_TYPE = Symbol.for('react.consumer'),
366
+ REACT_CONTEXT_TYPE = Symbol.for('react.context'),
367
+ REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'),
368
+ REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'),
369
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'),
370
+ REACT_MEMO_TYPE = Symbol.for('react.memo'),
371
+ REACT_LAZY_TYPE = Symbol.for('react.lazy'),
372
+ REACT_ACTIVITY_TYPE = Symbol.for('react.activity'),
373
+ REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference'),
374
+ ReactSharedInternals =
375
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
376
+ hasOwnProperty = Object.prototype.hasOwnProperty,
377
+ isArrayImpl = Array.isArray,
378
+ createTask = console.createTask
379
+ ? console.createTask
380
+ : function () {
381
+ return null;
382
+ };
383
+ React = {
384
+ react_stack_bottom_frame: function (callStackForError) {
385
+ return callStackForError();
386
+ },
387
+ };
388
+ var specialPropKeyWarningShown;
389
+ var didWarnAboutElementRef = {};
390
+ var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
391
+ React,
392
+ UnknownOwner
393
+ )();
394
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
395
+ var didWarnAboutKeySpread = {};
396
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
397
+ reactJsxRuntime_development.jsx = function (
398
+ type,
399
+ config,
400
+ maybeKey,
401
+ source,
402
+ self
403
+ ) {
404
+ var trackActualOwner =
405
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
406
+ return jsxDEVImpl(
407
+ type,
408
+ config,
409
+ maybeKey,
410
+ false,
411
+ source,
412
+ self,
413
+ trackActualOwner
414
+ ? Error('react-stack-top-frame')
415
+ : unknownOwnerDebugStack,
416
+ trackActualOwner
417
+ ? createTask(getTaskName(type))
418
+ : unknownOwnerDebugTask
419
+ );
420
+ };
421
+ reactJsxRuntime_development.jsxs = function (
422
+ type,
423
+ config,
424
+ maybeKey,
425
+ source,
426
+ self
427
+ ) {
428
+ var trackActualOwner =
429
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
430
+ return jsxDEVImpl(
431
+ type,
432
+ config,
433
+ maybeKey,
434
+ true,
435
+ source,
436
+ self,
437
+ trackActualOwner
438
+ ? Error('react-stack-top-frame')
439
+ : unknownOwnerDebugStack,
440
+ trackActualOwner
441
+ ? createTask(getTaskName(type))
442
+ : unknownOwnerDebugTask
443
+ );
444
+ };
445
+ })();
446
+ return reactJsxRuntime_development;
447
+ }
448
+
449
+ (function (module) {
450
+ if (browser$1.env.NODE_ENV === 'production') {
451
+ module.exports = requireReactJsxRuntime_production();
452
+ } else {
453
+ module.exports = requireReactJsxRuntime_development();
454
+ }
455
+ })(jsxRuntime);
456
+
457
+ function EyeSlashIcon({ title, titleId, ...props }, svgRef) {
458
+ return /*#__PURE__*/ React.createElement(
459
+ 'svg',
460
+ Object.assign(
461
+ {
462
+ 'xmlns': 'http://www.w3.org/2000/svg',
463
+ 'fill': 'none',
464
+ 'viewBox': '0 0 24 24',
465
+ 'strokeWidth': 1.5,
466
+ 'stroke': 'currentColor',
467
+ 'aria-hidden': 'true',
468
+ 'data-slot': 'icon',
469
+ 'ref': svgRef,
470
+ 'aria-labelledby': titleId,
471
+ },
472
+ props
473
+ ),
474
+ title
475
+ ? /*#__PURE__*/ React.createElement(
476
+ 'title',
477
+ {
478
+ id: titleId,
479
+ },
480
+ title
481
+ )
482
+ : null,
483
+ /*#__PURE__*/ React.createElement('path', {
484
+ strokeLinecap: 'round',
485
+ strokeLinejoin: 'round',
486
+ d: 'M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88',
487
+ })
488
+ );
489
+ }
490
+ const ForwardRef$5 = /*#__PURE__*/ React.forwardRef(EyeSlashIcon);
491
+
492
+ function EyeIcon({ title, titleId, ...props }, svgRef) {
493
+ return /*#__PURE__*/ React.createElement(
494
+ 'svg',
495
+ Object.assign(
496
+ {
497
+ 'xmlns': 'http://www.w3.org/2000/svg',
498
+ 'fill': 'none',
499
+ 'viewBox': '0 0 24 24',
500
+ 'strokeWidth': 1.5,
501
+ 'stroke': 'currentColor',
502
+ 'aria-hidden': 'true',
503
+ 'data-slot': 'icon',
504
+ 'ref': svgRef,
505
+ 'aria-labelledby': titleId,
506
+ },
507
+ props
508
+ ),
509
+ title
510
+ ? /*#__PURE__*/ React.createElement(
511
+ 'title',
512
+ {
513
+ id: titleId,
514
+ },
515
+ title
516
+ )
517
+ : null,
518
+ /*#__PURE__*/ React.createElement('path', {
519
+ strokeLinecap: 'round',
520
+ strokeLinejoin: 'round',
521
+ d: 'M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z',
522
+ }),
523
+ /*#__PURE__*/ React.createElement('path', {
524
+ strokeLinecap: 'round',
525
+ strokeLinejoin: 'round',
526
+ d: 'M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z',
527
+ })
528
+ );
529
+ }
530
+ const ForwardRef$4 = /*#__PURE__*/ React.forwardRef(EyeIcon);
531
+
532
+ function _array_like_to_array(arr, len) {
533
+ if (len == null || len > arr.length) len = arr.length;
534
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
535
+ return arr2;
536
+ }
537
+ function _array_with_holes(arr) {
538
+ if (Array.isArray(arr)) return arr;
539
+ }
540
+ function _define_property$2(obj, key, value) {
541
+ if (key in obj) {
542
+ Object.defineProperty(obj, key, {
543
+ value: value,
544
+ enumerable: true,
545
+ configurable: true,
546
+ writable: true,
547
+ });
548
+ } else {
549
+ obj[key] = value;
550
+ }
551
+ return obj;
552
+ }
553
+ function _iterable_to_array_limit(arr, i) {
554
+ var _i =
555
+ arr == null
556
+ ? null
557
+ : (typeof Symbol !== 'undefined' && arr[Symbol.iterator]) ||
558
+ arr['@@iterator'];
559
+ if (_i == null) return;
560
+ var _arr = [];
561
+ var _n = true;
562
+ var _d = false;
563
+ var _s, _e;
564
+ try {
565
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
566
+ _arr.push(_s.value);
567
+ if (i && _arr.length === i) break;
568
+ }
569
+ } catch (err) {
570
+ _d = true;
571
+ _e = err;
572
+ } finally {
573
+ try {
574
+ if (!_n && _i['return'] != null) _i['return']();
575
+ } finally {
576
+ if (_d) throw _e;
577
+ }
578
+ }
579
+ return _arr;
580
+ }
581
+ function _non_iterable_rest() {
582
+ throw new TypeError(
583
+ 'Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'
584
+ );
585
+ }
586
+ function _object_spread$2(target) {
587
+ for (var i = 1; i < arguments.length; i++) {
588
+ var source = arguments[i] != null ? arguments[i] : {};
589
+ var ownKeys = Object.keys(source);
590
+ if (typeof Object.getOwnPropertySymbols === 'function') {
591
+ ownKeys = ownKeys.concat(
592
+ Object.getOwnPropertySymbols(source).filter(function (sym) {
593
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
594
+ })
595
+ );
596
+ }
597
+ ownKeys.forEach(function (key) {
598
+ _define_property$2(target, key, source[key]);
599
+ });
600
+ }
601
+ return target;
602
+ }
603
+ function _sliced_to_array(arr, i) {
604
+ return (
605
+ _array_with_holes(arr) ||
606
+ _iterable_to_array_limit(arr, i) ||
607
+ _unsupported_iterable_to_array(arr, i) ||
608
+ _non_iterable_rest()
609
+ );
610
+ }
611
+ function _unsupported_iterable_to_array(o, minLen) {
612
+ if (!o) return;
613
+ if (typeof o === 'string') return _array_like_to_array(o, minLen);
614
+ var n = Object.prototype.toString.call(o).slice(8, -1);
615
+ if (n === 'Object' && o.constructor) n = o.constructor.name;
616
+ if (n === 'Map' || n === 'Set') return Array.from(n);
617
+ if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
618
+ return _array_like_to_array(o, minLen);
619
+ }
620
+ function InputField(param) {
621
+ var id = param.id,
622
+ label = param.label,
623
+ register = param.register,
624
+ type = param.type,
625
+ required = param.required,
626
+ _param_autoCompleteId = param.autoCompleteId,
627
+ autoCompleteId =
628
+ _param_autoCompleteId === void 0 ? 'off' : _param_autoCompleteId,
629
+ _param_isPasswordField = param.isPasswordField,
630
+ isPasswordField =
631
+ _param_isPasswordField === void 0 ? false : _param_isPasswordField;
632
+ var _useState = _sliced_to_array(useState(false), 2),
633
+ isPasswordVisible = _useState[0],
634
+ setIsPasswordVisible = _useState[1];
635
+ return jsxRuntime.exports.jsxs('div', {
636
+ className: 'flex flex-col space-y-2',
637
+ children: [
638
+ jsxRuntime.exports.jsx('label', {
639
+ htmlFor: id,
640
+ className:
641
+ 'block ml-1 text-sm font-medium text-gray-700 dark:text-white',
642
+ children: label,
643
+ }),
644
+ isPasswordField
645
+ ? jsxRuntime.exports.jsxs('div', {
646
+ className: 'relative w-full',
647
+ children: [
648
+ jsxRuntime.exports.jsx(
649
+ 'input',
650
+ _object_spread$2(
651
+ {
652
+ id: id,
653
+ required: required,
654
+ type: isPasswordVisible ? 'text' : 'password',
655
+ autoComplete: autoCompleteId,
656
+ placeholder: label,
657
+ className:
658
+ 'w-full block py-3 pr-8 pl-3 text-gray-600 bg-white border-none rounded-lg shadow-sm shadow-input appearance-none focus:outline-none focus:ring-primary placeholder-gray-400 sm:text-sm dark:text-black dark:placeholder-gray-500 '.concat(
659
+ type === 'number' ? 'text-right' : ''
660
+ ),
661
+ },
662
+ register
663
+ )
664
+ ),
665
+ jsxRuntime.exports.jsx('div', {
666
+ className:
667
+ 'absolute top-1/2 right-2 w-5 h-5 -translate-y-1/2 text-text-color-300 hover:cursor-pointer',
668
+ children: isPasswordVisible
669
+ ? jsxRuntime.exports.jsx(ForwardRef$5, {
670
+ onClick: function () {
671
+ setIsPasswordVisible(false);
672
+ },
673
+ })
674
+ : jsxRuntime.exports.jsx(ForwardRef$4, {
675
+ onClick: function () {
676
+ setIsPasswordVisible(true);
677
+ },
678
+ }),
679
+ }),
680
+ ],
681
+ })
682
+ : jsxRuntime.exports.jsx(
683
+ 'input',
684
+ _object_spread$2(
685
+ {
686
+ id: id,
687
+ required: required,
688
+ type: type,
689
+ autoComplete: autoCompleteId,
690
+ placeholder: label,
691
+ className:
692
+ 'relative w-full block py-3 pr-10 pl-3 text-gray-600 bg-white border-none rounded-lg shadow-sm shadow-input appearance-none focus:outline-none focus:ring-primary placeholder-gray-400 sm:text-sm dark:text-black dark:placeholder-gray-500 '.concat(
693
+ type === 'number' ? 'text-right' : ''
694
+ ),
695
+ },
696
+ register
697
+ )
698
+ ),
699
+ ],
700
+ });
701
+ }
702
+
703
+ var SigninForm = function (param) {
704
+ var mapText = param.mapText,
705
+ onSubmit = param.onSubmit,
706
+ errorMessage = param.errorMessage;
707
+ var _useForm = useForm({
708
+ shouldUseNativeValidation: true,
709
+ }),
710
+ register = _useForm.register,
711
+ handleSubmit = _useForm.handleSubmit;
712
+ return jsxRuntime.exports.jsxs('form', {
713
+ onSubmit: handleSubmit(onSubmit),
714
+ className: 'space-y-6',
715
+ children: [
716
+ jsxRuntime.exports.jsx(InputField, {
717
+ id: 'email',
718
+ label: mapText('auth:form.email.label'),
719
+ type: 'text',
720
+ required: true,
721
+ autoCompleteId: 'email',
722
+ register: register('email', {
723
+ required: mapText('form.email.validations.required'),
724
+ }),
725
+ }),
726
+ jsxRuntime.exports.jsx('div', {
727
+ className: 'relative',
728
+ children: jsxRuntime.exports.jsx(InputField, {
729
+ id: 'password',
730
+ label: mapText('auth:form.password.label'),
731
+ type: 'password',
732
+ required: true,
733
+ autoCompleteId: 'password',
734
+ register: register('password', {
735
+ required: mapText('form.password.validations.required'),
736
+ }),
737
+ isPasswordField: true,
738
+ }),
739
+ }),
740
+ jsxRuntime.exports.jsxs('div', {
741
+ children: [
742
+ jsxRuntime.exports.jsx('button', {
743
+ type: 'submit',
744
+ className:
745
+ 'w-full flex justify-center px-4 py-3 text-sm font-medium text-white bg-[length:200%_200%] bg-primary-shimmer border-none border rounded-lg shadow-sm transition-transform animate-shimmerdelayed hover:scale-105 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2',
746
+ children: mapText('auth:form.submit.text'),
747
+ }),
748
+ jsxRuntime.exports.jsx('span', {
749
+ className: 'block mt-2 text-sm font-medium text-red-500',
750
+ children: errorMessage,
751
+ }),
752
+ ],
753
+ }),
754
+ jsxRuntime.exports.jsx('div', {
755
+ className: 'flex justify-between items-center',
756
+ children: jsxRuntime.exports.jsx('div', {
757
+ className: 'text-sm',
758
+ children: jsxRuntime.exports.jsx('a', {
759
+ href: '',
760
+ className:
761
+ 'font-medium text-primary transition-colors hover:text-primary-500 dark:text-white',
762
+ children: mapText('auth:form.forgot.text'),
763
+ }),
764
+ }),
765
+ }),
766
+ ],
767
+ });
768
+ };
769
+
770
+ function SigninLayout(param) {
771
+ var mapText = param.mapText,
772
+ onSubmit = param.onSubmit,
773
+ errorMessage = param.errorMessage;
774
+ return jsxRuntime.exports.jsxs('div', {
775
+ className: 'h-full flex flex-col sm:flex-row',
776
+ children: [
777
+ jsxRuntime.exports.jsx('div', {
778
+ className:
779
+ "relative w-auto h-full bg-[url('/assets/signup_cover.png')] bg-no-repeat bg-center bg-cover sm:flex-1",
780
+ }),
781
+ jsxRuntime.exports.jsx('div', {
782
+ className:
783
+ 'flex-1 w-auto flex flex-col lg:flex-none max-sm:absolute max-sm:top-1/2 max-sm:left-1/2 max-sm:w-full max-sm:-translate-x-1/2 max-sm:-translate-y-1/2 max-sm:max-w-96 dark:sm:bg-base-900',
784
+ children: jsxRuntime.exports.jsx('div', {
785
+ className:
786
+ 'flex-1 flex flex-col p-4 sm:justify-center sm:px-6 sm:py-12 lg:px-20 xl:px-24 2xl:px-40 max-sm:px-5 max-sm:mx-5 max-sm:bg-white/80 max-sm:rounded-lg dark:max-sm:bg-base-900/80',
787
+ children: jsxRuntime.exports.jsxs('div', {
788
+ className: 'w-full mx-auto lg:w-96 max-w-xl',
789
+ children: [
790
+ jsxRuntime.exports.jsx('h2', {
791
+ className:
792
+ 'mt-6 text-3xl font-extrabold text-gray-900 select-none dark:text-white',
793
+ children: mapText('auth:page.title'),
794
+ }),
795
+ jsxRuntime.exports.jsx('div', {
796
+ className: 'mt-10',
797
+ children: jsxRuntime.exports.jsx(SigninForm, {
798
+ mapText: mapText,
799
+ onSubmit: function (values) {
800
+ return onSubmit(values.email, values.password);
801
+ },
802
+ errorMessage: errorMessage,
803
+ }),
804
+ }),
805
+ ],
806
+ }),
807
+ }),
808
+ }),
809
+ ],
810
+ });
811
+ }
812
+
813
+ var UI = /*#__PURE__*/ Object.freeze({
814
+ __proto__: null,
815
+ SigninForm: SigninForm,
816
+ SigninLayout: SigninLayout,
817
+ });
818
+
819
+ function MainContentFrame(param) {
820
+ var children = param.children;
821
+ return jsxRuntime.exports.jsx('main', {
822
+ className:
823
+ 'w-full pb-2 overflow-hidden bg-zinc-100 lg:pt-2 lg:pr-2 dark:bg-zinc-950',
824
+ children: jsxRuntime.exports.jsx('div', {
825
+ className:
826
+ 'w-full h-full p-6 content-canvas bg-white border-zinc-950/10 lg:p-10 lg:border lg:rounded-lg lg:shadow-xs dark:bg-zinc-900 dark:border-white/5',
827
+ children: jsxRuntime.exports.jsx('div', {
828
+ className: 'mx-auto max-w-[1400px]',
829
+ children: children,
830
+ }),
831
+ }),
832
+ });
833
+ }
834
+
835
+ function ChevronDoubleLeftIcon({ title, titleId, ...props }, svgRef) {
836
+ return /*#__PURE__*/ React.createElement(
837
+ 'svg',
838
+ Object.assign(
839
+ {
840
+ 'xmlns': 'http://www.w3.org/2000/svg',
841
+ 'viewBox': '0 0 20 20',
842
+ 'fill': 'currentColor',
843
+ 'aria-hidden': 'true',
844
+ 'data-slot': 'icon',
845
+ 'ref': svgRef,
846
+ 'aria-labelledby': titleId,
847
+ },
848
+ props
849
+ ),
850
+ title
851
+ ? /*#__PURE__*/ React.createElement(
852
+ 'title',
853
+ {
854
+ id: titleId,
855
+ },
856
+ title
857
+ )
858
+ : null,
859
+ /*#__PURE__*/ React.createElement('path', {
860
+ fillRule: 'evenodd',
861
+ d: 'M4.72 9.47a.75.75 0 0 0 0 1.06l4.25 4.25a.75.75 0 1 0 1.06-1.06L6.31 10l3.72-3.72a.75.75 0 1 0-1.06-1.06L4.72 9.47Zm9.25-4.25L9.72 9.47a.75.75 0 0 0 0 1.06l4.25 4.25a.75.75 0 1 0 1.06-1.06L11.31 10l3.72-3.72a.75.75 0 0 0-1.06-1.06Z',
862
+ clipRule: 'evenodd',
863
+ })
864
+ );
865
+ }
866
+ const ForwardRef$3 = /*#__PURE__*/ React.forwardRef(ChevronDoubleLeftIcon);
867
+
868
+ function ChevronDoubleRightIcon({ title, titleId, ...props }, svgRef) {
869
+ return /*#__PURE__*/ React.createElement(
870
+ 'svg',
871
+ Object.assign(
872
+ {
873
+ 'xmlns': 'http://www.w3.org/2000/svg',
874
+ 'viewBox': '0 0 20 20',
875
+ 'fill': 'currentColor',
876
+ 'aria-hidden': 'true',
877
+ 'data-slot': 'icon',
878
+ 'ref': svgRef,
879
+ 'aria-labelledby': titleId,
880
+ },
881
+ props
882
+ ),
883
+ title
884
+ ? /*#__PURE__*/ React.createElement(
885
+ 'title',
886
+ {
887
+ id: titleId,
888
+ },
889
+ title
890
+ )
891
+ : null,
892
+ /*#__PURE__*/ React.createElement('path', {
893
+ fillRule: 'evenodd',
894
+ d: 'M15.28 9.47a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 1 1-1.06-1.06L13.69 10 9.97 6.28a.75.75 0 0 1 1.06-1.06l4.25 4.25ZM6.03 5.22l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L8.69 10 4.97 6.28a.75.75 0 0 1 1.06-1.06Z',
895
+ clipRule: 'evenodd',
896
+ })
897
+ );
898
+ }
899
+ const ForwardRef$2 = /*#__PURE__*/ React.forwardRef(ChevronDoubleRightIcon);
900
+
901
+ function ChevronLeftIcon({ title, titleId, ...props }, svgRef) {
902
+ return /*#__PURE__*/ React.createElement(
903
+ 'svg',
904
+ Object.assign(
905
+ {
906
+ 'xmlns': 'http://www.w3.org/2000/svg',
907
+ 'viewBox': '0 0 20 20',
908
+ 'fill': 'currentColor',
909
+ 'aria-hidden': 'true',
910
+ 'data-slot': 'icon',
911
+ 'ref': svgRef,
912
+ 'aria-labelledby': titleId,
913
+ },
914
+ props
915
+ ),
916
+ title
917
+ ? /*#__PURE__*/ React.createElement(
918
+ 'title',
919
+ {
920
+ id: titleId,
921
+ },
922
+ title
923
+ )
924
+ : null,
925
+ /*#__PURE__*/ React.createElement('path', {
926
+ fillRule: 'evenodd',
927
+ d: 'M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z',
928
+ clipRule: 'evenodd',
929
+ })
930
+ );
931
+ }
932
+ const ForwardRef$1 = /*#__PURE__*/ React.forwardRef(ChevronLeftIcon);
933
+
934
+ function ChevronRightIcon({ title, titleId, ...props }, svgRef) {
935
+ return /*#__PURE__*/ React.createElement(
936
+ 'svg',
937
+ Object.assign(
938
+ {
939
+ 'xmlns': 'http://www.w3.org/2000/svg',
940
+ 'viewBox': '0 0 20 20',
941
+ 'fill': 'currentColor',
942
+ 'aria-hidden': 'true',
943
+ 'data-slot': 'icon',
944
+ 'ref': svgRef,
945
+ 'aria-labelledby': titleId,
946
+ },
947
+ props
948
+ ),
949
+ title
950
+ ? /*#__PURE__*/ React.createElement(
951
+ 'title',
952
+ {
953
+ id: titleId,
954
+ },
955
+ title
956
+ )
957
+ : null,
958
+ /*#__PURE__*/ React.createElement('path', {
959
+ fillRule: 'evenodd',
960
+ d: 'M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z',
961
+ clipRule: 'evenodd',
962
+ })
963
+ );
964
+ }
965
+ const ForwardRef = /*#__PURE__*/ React.forwardRef(ChevronRightIcon);
966
+
967
+ function Pagination(param) {
968
+ var currentPage = param.currentPage,
969
+ totalPages = param.totalPages,
970
+ hasPrevPage = param.hasPrevPage,
971
+ hasNextPage = param.hasNextPage,
972
+ goToFirstPage = param.goToFirstPage,
973
+ goToPreviousPage = param.goToPreviousPage,
974
+ goToNextPage = param.goToNextPage,
975
+ goToLastPage = param.goToLastPage;
976
+ if (totalPages === 0) {
977
+ return null;
978
+ }
979
+ return jsxRuntime.exports.jsxs('div', {
980
+ className: 'w-full flex justify-center items-center gap-x-2 mt-6',
981
+ children: [
982
+ jsxRuntime.exports.jsxs('button', {
983
+ onClick: goToFirstPage,
984
+ disabled: !hasPrevPage,
985
+ className:
986
+ 'flex gap-0.5 px-4 py-2.5 text-sm text-white bg-primary-500 rounded-lg transition-colors disabled:bg-zinc-300 enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
987
+ children: [
988
+ jsxRuntime.exports.jsx(ForwardRef$3, {
989
+ className: 'w-5 h-auto',
990
+ }),
991
+ 'Erste',
992
+ ],
993
+ }),
994
+ jsxRuntime.exports.jsxs('button', {
995
+ onClick: goToPreviousPage,
996
+ disabled: !hasPrevPage,
997
+ className:
998
+ 'flex gap-0.5 px-4 py-2.5 text-sm text-white bg-primary-500 rounded-lg transition-colors disabled:bg-zinc-300 enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
999
+ children: [
1000
+ jsxRuntime.exports.jsx(ForwardRef$1, {
1001
+ className: 'w-5 h-auto',
1002
+ }),
1003
+ 'Zur\xfcck',
1004
+ ],
1005
+ }),
1006
+ jsxRuntime.exports.jsxs('span', {
1007
+ className: 'px-3 text-sm text-black dark:text-white',
1008
+ children: [
1009
+ 'Seite ',
1010
+ jsxRuntime.exports.jsx('strong', {
1011
+ children: currentPage,
1012
+ }),
1013
+ ' von',
1014
+ ' ',
1015
+ jsxRuntime.exports.jsx('strong', {
1016
+ children:
1017
+ totalPages !== null && totalPages !== void 0 ? totalPages : 1,
1018
+ }),
1019
+ ],
1020
+ }),
1021
+ jsxRuntime.exports.jsxs('button', {
1022
+ onClick: goToNextPage,
1023
+ disabled: !hasNextPage,
1024
+ className:
1025
+ 'flex gap-0.5 px-4 py-2.5 text-sm text-white bg-primary-500 rounded-lg transition-colors disabled:bg-zinc-300 enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
1026
+ children: [
1027
+ 'Weiter',
1028
+ jsxRuntime.exports.jsx(ForwardRef, {
1029
+ className: 'w-5 h-5',
1030
+ }),
1031
+ ],
1032
+ }),
1033
+ jsxRuntime.exports.jsxs('button', {
1034
+ onClick: function () {
1035
+ return goToLastPage(
1036
+ totalPages !== null && totalPages !== void 0
1037
+ ? totalPages
1038
+ : currentPage
1039
+ );
1040
+ },
1041
+ disabled: !hasNextPage,
1042
+ className:
1043
+ 'flex gap-0.5 px-4 py-2.5 text-sm text-white bg-primary-500 rounded-lg transition-colors disabled:bg-zinc-300 enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
1044
+ children: [
1045
+ 'Letzte',
1046
+ jsxRuntime.exports.jsx(ForwardRef$2, {
1047
+ className: 'w-5 h-5',
1048
+ }),
1049
+ ],
1050
+ }),
1051
+ ],
1052
+ });
1053
+ }
1054
+
1055
+ function CancelButton(param) {
1056
+ var onClick = param.onClick;
1057
+ return jsxRuntime.exports.jsx('button', {
1058
+ type: 'button',
1059
+ className:
1060
+ 'px-5 py-1.5 isolate text-sm font-semibold text-white bg-zinc-500 rounded-lg transition-colors cursor-pointer hover:bg-zinc-400 ',
1061
+ onClick: onClick,
1062
+ children: 'Cancel',
1063
+ });
1064
+ }
1065
+
1066
+ function ErrorDisplay(param) {
1067
+ var error = param.error;
1068
+ if (!error) return null;
1069
+ return jsxRuntime.exports.jsx('div', {
1070
+ className:
1071
+ 'error-display p-4 mb-4 text-red-700 bg-red-100 border rounded border-red-400',
1072
+ children: error,
1073
+ });
1074
+ }
1075
+
1076
+ function HowToCloseText() {
1077
+ return jsxRuntime.exports.jsx('p', {
1078
+ className: 'absolute top-full mt-2 text-xs text-black dark:text-white',
1079
+ children:
1080
+ 'Schlie\xdfen: au\xdferhalb klicken oder die Esc-Taste dr\xfccken',
1081
+ });
1082
+ }
1083
+
1084
+ function r(e) {
1085
+ var t,
1086
+ f,
1087
+ n = '';
1088
+ if ('string' == typeof e || 'number' == typeof e) n += e;
1089
+ else if ('object' == typeof e)
1090
+ if (Array.isArray(e)) {
1091
+ var o = e.length;
1092
+ for (t = 0; t < o; t++)
1093
+ e[t] && (f = r(e[t])) && (n && (n += ' '), (n += f));
1094
+ } else for (f in e) e[f] && (n && (n += ' '), (n += f));
1095
+ return n;
1096
+ }
1097
+ function clsx() {
1098
+ for (var e, t, f = 0, n = '', o = arguments.length; f < o; f++)
1099
+ (e = arguments[f]) && (t = r(e)) && (n && (n += ' '), (n += t));
1100
+ return n;
1101
+ }
1102
+
1103
+ function LoadingSpinner(param) {
1104
+ var className = param.className,
1105
+ innerClassName = param.innerClassName;
1106
+ return jsxRuntime.exports.jsx('div', {
1107
+ className: clsx(
1108
+ 'loading-spinner w-full h-full flex flex-col justify-center items-center px-1',
1109
+ className
1110
+ ),
1111
+ children: jsxRuntime.exports.jsx('div', {
1112
+ 'className': clsx(
1113
+ 'size-5 inline-block border-[3px] border-t-transparent rounded-full border-current animate-spin',
1114
+ innerClassName
1115
+ ),
1116
+ 'role': 'status',
1117
+ 'aria-label': 'loading',
1118
+ 'children': jsxRuntime.exports.jsx('span', {
1119
+ className: 'sr-only',
1120
+ children: 'Loading...',
1121
+ }),
1122
+ }),
1123
+ });
1124
+ }
1125
+
1126
+ function SaveButton(param) {
1127
+ var isSaving = param.isSaving,
1128
+ onClick = param.onClick,
1129
+ disabled = param.disabled;
1130
+ return jsxRuntime.exports.jsx('button', {
1131
+ type: 'submit',
1132
+ className:
1133
+ 'px-5 py-1.5 isolate text-sm font-semibold text-white bg-primary-500 rounded-lg transition-colors cursor-pointer disabled:bg-zinc-300 disabled:cursor-default enabled:hover:bg-primary-400 dark:disabled:bg-zinc-800',
1134
+ onClick: onClick,
1135
+ disabled: disabled || isSaving,
1136
+ children: isSaving ? jsxRuntime.exports.jsx(LoadingSpinner, {}) : 'Save',
1137
+ });
1138
+ }
1139
+
1140
+ function Textarea(param) {
1141
+ var value = param.value,
1142
+ onChange = param.onChange,
1143
+ _param_rows = param.rows,
1144
+ rows = _param_rows === void 0 ? 2 : _param_rows;
1145
+ return jsxRuntime.exports.jsx('textarea', {
1146
+ className: clsx(
1147
+ 'w-full block px-3 py-1.5 mt-3 text-sm/6 text-white bg-white/5 border-none rounded-lg'
1148
+ ),
1149
+ rows: rows,
1150
+ value: value,
1151
+ onChange: function (e) {
1152
+ return onChange(e.target.value);
1153
+ },
1154
+ });
1155
+ }
1156
+
1157
+ var Util = /*#__PURE__*/ Object.freeze({
1158
+ __proto__: null,
1159
+ CancelButton: CancelButton,
1160
+ ErrorDisplay: ErrorDisplay,
1161
+ HowToCloseText: HowToCloseText,
1162
+ InputField: InputField,
1163
+ LoadingSpinner: LoadingSpinner,
1164
+ MainContentFrame: MainContentFrame,
1165
+ Pagination: Pagination,
1166
+ SaveButton: SaveButton,
1167
+ Textarea: Textarea,
1168
+ });
1169
+
1170
+ function _define_property$1(obj, key, value) {
1171
+ if (key in obj) {
1172
+ Object.defineProperty(obj, key, {
1173
+ value: value,
1174
+ enumerable: true,
1175
+ configurable: true,
1176
+ writable: true,
1177
+ });
1178
+ } else {
1179
+ obj[key] = value;
1180
+ }
1181
+ return obj;
1182
+ }
1183
+ function _object_spread$1(target) {
1184
+ for (var i = 1; i < arguments.length; i++) {
1185
+ var source = arguments[i] != null ? arguments[i] : {};
1186
+ var ownKeys = Object.keys(source);
1187
+ if (typeof Object.getOwnPropertySymbols === 'function') {
1188
+ ownKeys = ownKeys.concat(
1189
+ Object.getOwnPropertySymbols(source).filter(function (sym) {
1190
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1191
+ })
1192
+ );
1193
+ }
1194
+ ownKeys.forEach(function (key) {
1195
+ _define_property$1(target, key, source[key]);
1196
+ });
1197
+ }
1198
+ return target;
1199
+ }
1200
+ var TemplateParserContext = createContext({
1201
+ parse: function () {
1202
+ return String();
1203
+ },
1204
+ addToTemporaryView: function () {},
1205
+ });
1206
+ var TemplateParserProvider = function (props) {
1207
+ var _Intl_DateTimeFormat, _Intl;
1208
+ var children = props.children;
1209
+ props.navigationView;
1210
+ var systemTimezone = 'Europe/Berlin';
1211
+ var systemLocale = 'de-DE';
1212
+ var timezone =
1213
+ ((_Intl = Intl) === null || _Intl === void 0
1214
+ ? void 0
1215
+ : (_Intl_DateTimeFormat = _Intl.DateTimeFormat) === null ||
1216
+ _Intl_DateTimeFormat === void 0
1217
+ ? void 0
1218
+ : _Intl_DateTimeFormat.call(_Intl).resolvedOptions().timeZone) ||
1219
+ systemTimezone;
1220
+ var locale =
1221
+ (Array.isArray(navigator.languages) && navigator.languages[0]) ||
1222
+ navigator.language ||
1223
+ systemLocale;
1224
+ var temporaryView = useRef({});
1225
+ var compiler = useRef(
1226
+ new PatternCompiler(temporaryView.current, function (handlebars) {
1227
+ eqPlugin(handlebars);
1228
+ stringPlugin(handlebars);
1229
+ timezonePlugin(handlebars, {
1230
+ timezone: systemTimezone,
1231
+ locale: systemLocale,
1232
+ });
1233
+ userTimezonePlugin(handlebars, {
1234
+ timezone: timezone,
1235
+ locale: locale,
1236
+ });
1237
+ urlPlugin(handlebars);
1238
+ })
1239
+ );
1240
+ var parse = function (source, partialView) {
1241
+ return compiler.current.compile(
1242
+ source,
1243
+ _object_spread$1({}, temporaryView.current, partialView)
1244
+ );
1245
+ };
1246
+ var addToTemporaryView = function (key, value) {
1247
+ temporaryView.current[key] = value;
1248
+ };
1249
+ return jsxRuntime.exports.jsx(TemplateParserContext.Provider, {
1250
+ value: {
1251
+ parse: parse,
1252
+ addToTemporaryView: addToTemporaryView,
1253
+ },
1254
+ children: children,
1255
+ });
1256
+ };
1257
+ var useTemplateParser = function () {
1258
+ var context = useContext(TemplateParserContext);
1259
+ if (context === undefined) {
1260
+ throw new Error(
1261
+ 'useTemplateParser must be used within a TemplateParseProvider'
1262
+ );
1263
+ }
1264
+ return context;
1265
+ };
1266
+
1267
+ var Ctx = /*#__PURE__*/ Object.freeze({
1268
+ __proto__: null,
1269
+ TemplateParserProvider: TemplateParserProvider,
1270
+ useTemplateParser: useTemplateParser,
1271
+ });
1272
+
1273
+ function _define_property(obj, key, value) {
1274
+ if (key in obj) {
1275
+ Object.defineProperty(obj, key, {
1276
+ value: value,
1277
+ enumerable: true,
1278
+ configurable: true,
1279
+ writable: true,
1280
+ });
1281
+ } else {
1282
+ obj[key] = value;
1283
+ }
1284
+ return obj;
1285
+ }
1286
+ function _object_spread(target) {
1287
+ for (var i = 1; i < arguments.length; i++) {
1288
+ var source = arguments[i] != null ? arguments[i] : {};
1289
+ var ownKeys = Object.keys(source);
1290
+ if (typeof Object.getOwnPropertySymbols === 'function') {
1291
+ ownKeys = ownKeys.concat(
1292
+ Object.getOwnPropertySymbols(source).filter(function (sym) {
1293
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1294
+ })
1295
+ );
1296
+ }
1297
+ ownKeys.forEach(function (key) {
1298
+ _define_property(target, key, source[key]);
1299
+ });
1300
+ }
1301
+ return target;
1302
+ }
1303
+ var index = _object_spread({}, UI, Util, Ctx);
1304
+
1305
+ export {
1306
+ CancelButton,
1307
+ ErrorDisplay,
1308
+ HowToCloseText,
1309
+ InputField,
1310
+ LoadingSpinner,
1311
+ MainContentFrame,
1312
+ Pagination,
1313
+ SaveButton,
1314
+ SigninForm,
1315
+ SigninLayout,
1316
+ TemplateParserProvider,
1317
+ Textarea,
1318
+ index as default,
1319
+ useTemplateParser,
1320
+ };