{ "version": 3, "sources": ["external-global:Slick", "../src/index.ts", "../src/base/symbols.ts", "../src/base/system-internal.ts", "../src/base/system.ts", "../src/base/localtext.ts", "../src/base/config.ts", "../src/base/html.ts", "../src/base/toastr2.ts", "../src/base/notify.ts", "../src/base/blockui.ts", "../src/base/lookup.ts", "../src/base/environment.ts", "../src/base/fluent-events.ts", "../src/base/fluent.ts", "../src/base/icons.ts", "../../../node_modules/.pnpm/jsx-dom@8.1.5/node_modules/jsx-dom/min/index.js", "../src/base/dialogs.tsx", "../src/base/formatting.ts", "../src/base/errorhandling.ts", "../src/base/services.ts", "../src/base/scriptdata.ts", "../src/base/authorization.ts", "../src/base/criteria.ts", "../src/base/debounce.ts", "../src/base/propertyitem.ts", "../src/base/servicetypes.ts", "../src/base/tooltip.ts", "../src/base/uploader.ts", "../src/base/validator.tsx", "../src/compat/arrays-compat.ts", "../src/compat/dialogs-compat.ts", "../src/compat/formatting-compat.ts", "../src/compat/html-compat.ts", "../src/compat/layouttimer.ts", "../src/compat/router.ts", "../src/compat/system-compat.ts", "../src/compat/layout.ts", "../src/compat/localtext-compat.ts", "../src/compat/scriptdata-compat.ts", "../src/compat/services-compat.tsx", "../src/compat/strings-compat.ts", "../src/compat/validation.ts", "../src/slick/aggregators.ts", "../src/slick/remoteview.ts", "../src/types/attributes.ts", "../src/types/decorators.ts", "../src/interfaces/ibooleanvalue.ts", "../src/interfaces/idoublevalue.ts", "../src/interfaces/idialog.ts", "../src/interfaces/ieditdialog.ts", "../src/interfaces/igeteditvalue.ts", "../src/interfaces/ireadonly.ts", "../src/interfaces/iseteditvalue.ts", "../src/interfaces/istringvalue.ts", "../src/interfaces/ivalidaterequired.ts", "../src/types/captureoperationtype.ts", "../src/types/commontyperegistry.ts", "../src/types/dialogtyperegistry.ts", "../src/ui/widgets/widgetutils.ts", "../src/ui/editors/select2.ts", "../src/ui/editors/combobox.ts", "../src/ui/editors/editorutils.tsx", "../src/ui/widgets/widgetinternal.ts", "../src/ui/widgets/widget.ts", "../src/types/editortyperegistry.ts", "../src/types/formattertyperegistry.ts", "../src/types/enumtyperegistry.ts", "../src/types/reflectionutils.ts", "../src/compat/jquery-compat.ts", "../src/ui/helpers/lazyloadhelper.ts", "../src/ui/widgets/prefixedcontext.ts", "../src/ui/widgets/toolbar.tsx", "../src/ui/helpers/tabsextensions.tsx", "../src/ui/dialogs/basedialog-internal.ts", "../src/ui/dialogs/dialogextensions.ts", "../src/ui/dialogs/basedialog.tsx", "../src/ui/widgets/basepanel.ts", "../src/ui/editors/editorwidget.ts", "../src/ui/editors/cascadedwidgetlink.ts", "../src/ui/widgets/reflectionoptionssetter.ts", "../src/ui/widgets/propertygrid.tsx", "../src/ui/widgets/propertypanel.ts", "../src/ui/helpers/subdialoghelper.ts", "../src/ui/dialogs/propertydialog.tsx", "../src/ui/editors/stringeditor.tsx", "../src/ui/editors/passwordeditor.tsx", "../src/ui/editors/textareaeditor.ts", "../src/ui/editors/booleaneditor.tsx", "../src/ui/editors/autonumeric.ts", "../src/ui/editors/decimaleditor.tsx", "../src/ui/editors/integereditor.tsx", "../src/ui/helpers/dateediting.ts", "../src/ui/editors/dateeditor.tsx", "../src/ui/editors/datetimeeditor.tsx", "../src/ui/editors/timeeditor.ts", "../src/ui/editors/emaileditor.tsx", "../src/ui/editors/emailaddresseditor.tsx", "../src/ui/editors/urleditor.ts", "../src/ui/editors/radiobuttoneditor.tsx", "../src/ui/editors/comboboxeditor.tsx", "../src/ui/editors/selecteditor.ts", "../src/ui/editors/dateyeareditor.ts", "../src/ui/editors/enumeditor.ts", "../src/ui/editors/lookupeditor.ts", "../src/ui/editors/servicelookupeditor.ts", "../src/ui/editors/htmlcontenteditor.tsx", "../src/ui/editors/maskededitor.tsx", "../src/ui/editors/recaptcha.ts", "../src/ui/helpers/uploadhelper.tsx", "../src/ui/editors/uploadeditors.tsx", "../src/ui/filtering/filterstore.ts", "../src/ui/datagrid/quickfilterbar.tsx", "../src/ui/datagrid/quicksearchinput.tsx", "../src/ui/filtering/filteroperator.ts", "../src/ui/filtering/filtering.ts", "../src/ui/filtering/filterwidgetbase.ts", "../src/ui/filtering/filterpanel.tsx", "../src/ui/filtering/filterdialog.tsx", "../src/ui/filtering/filterdisplaybar.tsx", "../src/ui/datagrid/slickpager.tsx", "../src/ui/helpers/slickhelpers.tsx", "../src/ui/formatters/formatters.ts", "../src/ui/datagrid/datagrid.tsx", "../src/ui/datagrid/columnpickerdialog.tsx", "../src/ui/datagrid/treegridmixin.ts", "../src/ui/editors/checktreeeditor.ts", "../src/ui/datagrid/entitygrid.ts", "../src/ui/dialogs/entitytoolbuttons.tsx", "../src/ui/dialogs/entitylocalizer.tsx", "../src/ui/dialogs/entitydialog.tsx"], "sourcesContent": ["module.exports = Slick;", "\uFEFF/** \n * ## Serenity Core Library\n * \n * This is the package containing core TypeScript classes and functions used in Serenity applications. \n * \n * It should be installed by default in your projects created from `Serene` or `StartSharp` template:\n * \n * ```json\n * {\n * \"dependencies\": {\n * // ...\n * \"@serenity-is/corelib\": \"latest\"\n * }\n * }\n * ```\n * \n * The version number for this package should be equal or as close as possible to Serenity NuGet package versions in your project file.\n * \n * > When using classic namespaces instead of the ESM modules, the types and functions in this module are directly available from the global `Serenity` and `Q` namespaces.\n * > e.g. `Serenity.EntityGrid`\n * @packageDocumentation\n */\n\nexport * from \"./base\";\nexport * from \"./compat\";\nexport * from \"./slick\";\nexport * from \"./interfaces\";\nexport * from \"./types\";\nexport * from \"./compat/jquery-compat\";\nexport * from \"./ui/datagrid/irowdefinition\";\nexport * from \"./ui/datagrid/islickformatter\";\nexport * from \"./ui/helpers/lazyloadhelper\";\nexport * from \"./ui/widgets/prefixedcontext\";\nexport * from \"./ui/widgets/widgetutils\";\nexport * from \"./ui/widgets/widget\";\nexport * from \"./ui/widgets/toolbar\";\nexport * from \"./ui/dialogs/basedialog\";\nexport * from \"./ui/widgets/basepanel\";\nexport * from \"./ui/editors/editorwidget\";\nexport * from \"./ui/editors/cascadedwidgetlink\";\nexport * from \"./ui/helpers/tabsextensions\";\nexport * from \"./ui/widgets/reflectionoptionssetter\";\nexport * from \"./ui/widgets/propertygrid\";\nexport * from \"./ui/widgets/propertypanel\";\nexport * from \"./ui/helpers/subdialoghelper\";\nexport * from \"./ui/dialogs/dialogextensions\";\nexport * from \"./ui/dialogs/propertydialog\";\nexport * from \"./ui/editors/editorutils\";\nexport * from \"./ui/editors/stringeditor\";\nexport * from \"./ui/editors/passwordeditor\";\nexport * from \"./ui/editors/textareaeditor\";\nexport * from \"./ui/editors/booleaneditor\";\nexport * from \"./ui/editors/autonumeric\";\nexport * from \"./ui/editors/decimaleditor\";\nexport * from \"./ui/editors/integereditor\";\nexport * from \"./ui/editors/dateeditor\";\nexport * from \"./ui/editors/datetimeeditor\";\nexport * from \"./ui/editors/timeeditor\";\nexport * from \"./ui/editors/emaileditor\";\nexport * from \"./ui/editors/emailaddresseditor\";\nexport * from \"./ui/editors/urleditor\";\nexport * from \"./ui/editors/radiobuttoneditor\";\nexport * from \"./ui/editors/combobox\"\nexport * from \"./ui/editors/comboboxeditor\";\nexport * from \"./ui/editors/selecteditor\";\nexport * from \"./ui/editors/select2\";\nexport * from \"./ui/editors/dateyeareditor\";\nexport * from \"./ui/editors/enumeditor\";\nexport * from \"./ui/editors/lookupeditor\";\nexport * from \"./ui/editors/servicelookupeditor\";\nexport * from \"./ui/editors/htmlcontenteditor\";\nexport * from \"./ui/editors/maskededitor\";\nexport * from \"./ui/editors/recaptcha\";\nexport * from \"./ui/helpers/uploadhelper\";\nexport * from \"./ui/editors/uploadeditors\";\nexport * from \"./ui/datagrid/quickfilter\";\nexport * from \"./ui/datagrid/quickfilterbar\";\nexport * from \"./ui/datagrid/quicksearchinput\";\nexport * from \"./ui/filtering/filteroperator\";\nexport * from \"./ui/filtering/filterline\";\nexport * from \"./ui/filtering/filterstore\";\nexport * from \"./ui/filtering/filtering\";\nexport * from \"./ui/filtering/filterwidgetbase\";\nexport * from \"./ui/filtering/filterpanel\";\nexport * from \"./ui/filtering/filterdialog\";\nexport * from \"./ui/filtering/filterdisplaybar\";\nexport * from \"./ui/datagrid/slickpager\";\nexport * from \"./ui/datagrid/idatagrid\";\nexport * from \"./ui/helpers/slickhelpers\";\nexport * from \"./ui/formatters/formatters\";\nexport * from \"./ui/datagrid/datagrid\";\nexport * from \"./ui/datagrid/columnpickerdialog\";\nexport * from \"./ui/datagrid/treegridmixin\";\nexport * from \"./ui/editors/checktreeeditor\";\nexport * from \"./ui/datagrid/entitygrid\";\nexport * from \"./ui/dialogs/entitytoolbuttons\";\nexport * from \"./ui/dialogs/entitylocalizer\";\nexport * from \"./ui/dialogs/entitydialog\";\n\nexport type Constructor = new (...args: any[]) => T;", "\uFEFF/** @internal */\nexport const isAssignableFromSymbol: unique symbol = Symbol.for(\"Serenity.isAssignableFrom\");\n/** @internal */\nexport const isInstanceOfTypeSymbol: unique symbol = Symbol.for(\"Serenity.isInstanceOfType\");\n/** @internal */\nexport const implementedInterfacesSymbol: unique symbol = Symbol.for(\"Serenity.implementedInterfaces\");\n/** @internal */\nexport const localTextTableSymbol: unique symbol = Symbol.for(\"Serenity.localTextTable\");\n/** @internal */\nexport const scriptDataHashSymbol: unique symbol = Symbol.for(\"Serenity.scriptDataHash\");\n/** @internal */\nexport const scriptDataSymbol: unique symbol = Symbol.for(\"Serenity.scriptData\");\n/** @internal */\nexport const isInterfaceTypeSymbol: unique symbol = Symbol.for(\"Serenity.isInterfaceType\"); // true: interface, false: class, null: enum\n/** @internal */\nexport const typeRegistrySymbol: unique symbol = Symbol.for(\"Serenity.typeRegistry\");\n\n", "\uFEFFimport { implementedInterfacesSymbol, isInterfaceTypeSymbol, typeRegistrySymbol } from \"./symbols\";\n\nexport const typeInfoProperty = \"typeInfo\";\n\nexport const globalObject: any =\n (typeof globalThis !== \"undefined\" && globalThis) ||\n (typeof window !== \"undefined\" && window) ||\n (typeof self !== \"undefined\" && self) ||\n // @ts-ignore check for global\n (typeof global !== \"undefined\" && global) || {};\n\nexport function merge(arr1: any[], arr2: any[]) {\n if (!arr1 || !arr2)\n return (arr1 || arr2 || []).slice();\n\n function distinct(arr: any[]) {\n return arr.filter((item, pos) => arr.indexOf(item) === pos);\n }\n\n return distinct(arr1.concat(arr2));\n}\n\nexport type StringLiteral = T extends string ? string extends T ? never : T : never;\n\nexport type TypeInfo = {\n typeKind: \"class\" | \"enum\" | \"interface\" | \"editor\" | \"formatter\";\n typeName: StringLiteral | (string & {});\n interfaces?: any[];\n customAttributes?: any[];\n enumFlags?: boolean;\n registered?: boolean;\n}\n\nexport function getTypeRegistry() {\n let typeRegistry = globalObject[typeRegistrySymbol];\n if (!typeRegistry)\n typeRegistry = globalObject[typeRegistrySymbol] = {};\n return typeRegistry;\n}\n\nfunction autoRegisterViaTypeInfo(type: any): void {\n if (!Object.prototype.hasOwnProperty.call(type, typeInfoProperty))\n return;\n\n var typeInfo = type[typeInfoProperty] as TypeInfo;\n if (!typeInfo || typeInfo.registered || !typeInfo.typeName)\n return;\n\n if (!getTypeRegistry()[typeInfo.typeName])\n getTypeRegistry()[typeInfo.typeName] = type;\n\n if (typeInfo.interfaces?.length &&\n !Object.prototype.hasOwnProperty.call(implementedInterfacesSymbol)) {\n Object.defineProperty(type, implementedInterfacesSymbol, {\n value: merge(type[implementedInterfacesSymbol], typeInfo.interfaces),\n configurable: true\n });\n }\n\n if (!Object.prototype.hasOwnProperty.call(isInterfaceTypeSymbol)) {\n if (typeInfo.typeKind === \"class\" || typeInfo.typeKind === \"editor\" || typeInfo.typeKind === \"formatter\") {\n Object.defineProperty(type, isInterfaceTypeSymbol, { value: false, configurable: true });\n }\n else if (typeInfo.typeKind === \"enum\") {\n Object.defineProperty(type, isInterfaceTypeSymbol, { value: null, configurable: true });\n }\n else if (typeInfo.typeKind === \"interface\") {\n Object.defineProperty(type, isInterfaceTypeSymbol, { value: true, configurable: true });\n }\n }\n\n typeInfo.registered = true;\n return;\n}\n\nexport function internalRegisterType(type: any, typeName?: string, interfaces?: any[]): TypeInfo {\n let typeInfo = ensureTypeInfo(type);\n\n if (typeName && typeName !== typeInfo.typeName)\n typeInfo.typeName = typeName;\n\n if (typeInfo.typeName)\n getTypeRegistry()[typeInfo.typeName] = type;\n\n if (interfaces?.length && typeInfo.interfaces !== interfaces) {\n interfaces = typeInfo.interfaces = merge(typeInfo.interfaces, interfaces);\n\n Object.defineProperty(type, implementedInterfacesSymbol, {\n value: merge(type[implementedInterfacesSymbol], interfaces),\n configurable: true\n });\n }\n\n typeInfo.registered = true;\n return typeInfo;\n}\n\nexport function ensureTypeInfo(type: any): TypeInfo {\n let typeInfo: TypeInfo;\n if (!Object.prototype.hasOwnProperty.call(type, typeInfoProperty) ||\n !(typeInfo = type[typeInfoProperty])) {\n typeInfo = {} as any;\n Object.defineProperty(type, typeInfoProperty, { value: typeInfo, configurable: true });\n return typeInfo;\n }\n if (!typeInfo.registered)\n autoRegisterViaTypeInfo(type);\n return typeInfo;\n}\n\nexport function peekTypeInfo(type: any): TypeInfo {\n if (!type || !Object.prototype.hasOwnProperty.call(type, typeInfoProperty))\n return void 0;\n\n var typeInfo = type[typeInfoProperty];\n if (typeInfo && !typeInfo.registered)\n autoRegisterViaTypeInfo(type);\n\n return typeInfo;\n}\n\nexport function getTypeNameProp(type: any): string {\n return peekTypeInfo(type)?.typeName || void 0;\n}\n\nexport function setTypeNameProp(type: any, value: string) {\n ensureTypeInfo(type).typeName = value;\n autoRegisterViaTypeInfo(type);\n}\n\n", "import { implementedInterfacesSymbol, isAssignableFromSymbol, isInstanceOfTypeSymbol, isInterfaceTypeSymbol } from \"./symbols\";\nimport { StringLiteral, TypeInfo, ensureTypeInfo, getTypeNameProp, getTypeRegistry, globalObject, internalRegisterType, merge, peekTypeInfo, typeInfoProperty } from \"./system-internal\";\nexport { getTypeNameProp, getTypeRegistry, setTypeNameProp, typeInfoProperty, type StringLiteral } from \"./system-internal\";\n\nexport function getGlobalObject(): any {\n return globalObject;\n}\n\nexport function omitUndefined(x: { [key: string]: any }) {\n if (x == null)\n return x;\n let obj = Object.create(null);\n Object.entries(x).forEach(([key, value]) => value !== void 0 && (obj[key] = value));\n return obj;\n}\n\nexport type Type = Function | Object;\n\nexport function getNested(from: any, name: string) {\n var a = name.split('.');\n for (var i = 0; i < a.length; i++) {\n from = from[a[i]];\n if (from == null)\n return null;\n }\n return from;\n}\n\nexport function getType(name: string, target?: any): Type {\n var type: any;\n if (target == null) {\n type = getTypeRegistry()[name];\n if (type != null || globalObject == void 0 || name === \"Object\")\n return type;\n\n target = globalObject;\n }\n\n type = getNested(target, name)\n if (typeof type !== 'function')\n return null;\n\n return type;\n}\n\nexport function getTypeFullName(type: Type): string {\n return getTypeNameProp(type) || (type as any).name ||\n (type.toString().match(/^\\s*function\\s*([^\\s(]+)/) || [])[1] || 'Object';\n};\n\nexport function getTypeShortName(type: Type): string {\n var fullName = getTypeFullName(type);\n var bIndex = fullName?.indexOf('[');\n var nsIndex = fullName?.lastIndexOf('.', bIndex >= 0 ? bIndex : fullName.length);\n return nsIndex > 0 ? fullName.substring(nsIndex + 1) : fullName;\n};\n\nexport function getInstanceType(instance: any): any {\n if (instance == null)\n throw \"Can't get instance type of null or undefined!\";\n\n // Have to catch as constructor cannot be looked up on native COM objects\n try {\n return instance.constructor;\n }\n catch (ex) {\n return Object;\n }\n};\n\nexport function isAssignableFrom(target: any, type: Type) {\n if (target === type || (type as any).prototype instanceof target)\n return true;\n\n if (typeof target[isAssignableFromSymbol] === 'function')\n return target[isAssignableFromSymbol](type);\n\n return false;\n}\n\nexport function isInstanceOfType(instance: any, type: Type) {\n if (instance == null)\n return false;\n\n if (typeof (type as any)[isInstanceOfTypeSymbol] === 'function')\n return (type as any)[isInstanceOfTypeSymbol](instance);\n\n return isAssignableFrom(type, getInstanceType(instance));\n}\n\nexport function getBaseType(type: any) {\n if (type == null ||\n type === Object ||\n !type.prototype ||\n (type as any)[isInterfaceTypeSymbol] === true)\n return null;\n\n return Object.getPrototypeOf(type.prototype).constructor;\n}\n\nfunction interfaceIsAssignableFrom(from: any) {\n return from != null &&\n Array.isArray((from as any)[implementedInterfacesSymbol]) &&\n (from as any)[implementedInterfacesSymbol].some((x: any) =>\n x === this ||\n (getTypeNameProp(this) &&\n x[isInterfaceTypeSymbol] &&\n getTypeNameProp(x) === getTypeNameProp(this)));\n}\n\nexport function registerClass(type: any, name: string, intf?: any[]) {\n internalRegisterType(type, name, intf);\n Object.defineProperty(type, isInterfaceTypeSymbol, { value: false, configurable: true });\n}\n\nexport function registerEnum(type: any, name: string, enumKey?: string) {\n internalRegisterType(type, name, undefined);\n if (enumKey && enumKey != name) {\n const typeStore = getTypeRegistry();\n if (!typeStore[enumKey])\n typeStore[enumKey] = type;\n }\n Object.defineProperty(type, isInterfaceTypeSymbol, { value: null, configurable: true });\n}\n\nexport function registerInterface(type: any, name: string, intf?: any[]) {\n internalRegisterType(type, name, intf);\n Object.defineProperty(type, isInterfaceTypeSymbol, { value: true, configurable: true });\n Object.defineProperty(type, isAssignableFromSymbol, { value: interfaceIsAssignableFrom, configurable: true });\n}\n\nexport namespace Enum {\n export let toString = (enumType: any, value: number): string => {\n if (value == null)\n return \"\";\n\n if (typeof value !== \"number\")\n return \"\" + value;\n\n var values = enumType;\n if (value === 0 || !peekTypeInfo(enumType)?.enumFlags) {\n for (var i in values) {\n if (values[i] === value) {\n return i;\n }\n }\n return value == null ? \"\" : value.toString();\n }\n else {\n var parts: string[] = [];\n for (var i in values) {\n if (typeof values[i] !== \"number\")\n continue;\n\n if (values[i] & value) {\n parts.push(i);\n value -= values[i];\n }\n }\n if (value != 0)\n parts.push(value.toString());\n return parts.join(' | ');\n }\n };\n\n export let getValues = (enumType: any) => {\n var parts = [];\n var values = enumType;\n for (var i in values) {\n if (Object.prototype.hasOwnProperty.call(values, i) &&\n typeof values[i] === \"number\")\n parts.push(values[i]);\n }\n return parts;\n };\n}\n\nexport const isEnum = (type: any) => {\n return typeof type !== \"function\" &&\n type[isInterfaceTypeSymbol] === null;\n};\n\nexport function initFormType(typ: Function, nameWidgetPairs: any[]) {\n for (var i = 0; i < nameWidgetPairs.length - 1; i += 2) {\n (function (name: string, widget: any) {\n Object.defineProperty(typ.prototype, name, {\n get: function () {\n return this.w(name, widget);\n },\n enumerable: true,\n configurable: true\n });\n })(nameWidgetPairs[i], nameWidgetPairs[i + 1]);\n }\n}\n\nconst _fieldsProxy = new Proxy({}, { get: (_, p) => p }) as any;\n\nexport function fieldsProxy(): Readonly> {\n return _fieldsProxy\n}\n\nexport function isArrayLike(obj: any): obj is ArrayLike {\n return typeof obj === \"object\" && obj != null && typeof obj.length === \"number\" && typeof obj.nodeType !== \"number\";\n}\n\nexport function isPromiseLike(obj: any): obj is PromiseLike {\n return obj instanceof Promise || ((typeof obj === \"object\" && obj != null && typeof obj.then === \"function\" && typeof obj.catch === \"function\"));\n}\n\nexport type SNoInfer = [T][T extends any ? 0 : never];\n\nexport class EditorAttribute { }\nregisterClass(EditorAttribute, 'Serenity.EditorAttribute');\n\nexport class ISlickFormatter { }\nregisterInterface(ISlickFormatter, 'Serenity.ISlickFormatter');\n\nexport function registerFormatter(type: any, name: string, intf?: any[]) {\n return registerClass(type, name, merge([ISlickFormatter], intf));\n}\n\nexport function registerEditor(type: any, name: string, intf?: any[]) {\n registerClass(type, name, intf);\n if (!peekTypeInfo(type).customAttributes?.some(x => getInstanceType(x) === x))\n addCustomAttribute(type, new EditorAttribute());\n}\n\nexport function addCustomAttribute(type: any, attr: any) {\n let typeInfo = ensureTypeInfo(type);\n if (!typeInfo.customAttributes)\n typeInfo.customAttributes = [attr];\n else\n typeInfo.customAttributes.push(attr);\n}\n\nexport function getCustomAttribute(type: any, attrType: { new(...args: any[]): TAttr }, inherit: boolean = true): TAttr {\n if (!type || attrType == null)\n return null;\n\n do {\n let attrs = peekTypeInfo(type)?.customAttributes;\n if (attrs) {\n for (var i = attrs.length - 1; i >= 0; i--) {\n let attr = attrs[i];\n if (attr != null && isInstanceOfType(attr, attrType))\n return attr;\n }\n }\n }\n while (inherit && (type = getBaseType(type)))\n}\n\nexport function hasCustomAttribute(type: any, attrType: { new(...args: any[]): TAttr }, inherit: boolean = true): boolean {\n return getCustomAttribute(type, attrType, inherit) != null;\n}\n\nexport function getCustomAttributes(type: any, attrType: { new(...args: any[]): TAttr }, inherit: boolean = true): TAttr[] {\n if (!type)\n return [];\n\n const allTypes = attrType === void 0;\n var result: any[] = [];\n do {\n let attrs = peekTypeInfo(type)?.customAttributes;\n if (attrs) {\n for (var i = attrs.length - 1; i >= 0; i--) {\n let attr = attrs[i];\n if (attr && (allTypes || (attrType && isInstanceOfType(attr, attrType)))) {\n result.push(attr);\n }\n }\n }\n }\n while (inherit && (type = getBaseType(type)));\n return result;\n};\n\nexport type { TypeInfo } from \"./system-internal\";\nexport type ClassTypeInfo = TypeInfo;\nexport type EditorTypeInfo = TypeInfo;\nexport type FormatterTypeInfo = TypeInfo;\nexport type InterfaceTypeInfo = TypeInfo;\n\nexport function classTypeInfo(typeName: StringLiteral, interfaces?: any[]): ClassTypeInfo {\n return { typeKind: \"class\", typeName, interfaces: interfaces }\n}\n\nexport function editorTypeInfo(typeName: StringLiteral, interfaces?: any[]): EditorTypeInfo {\n return { typeKind: \"editor\", typeName, interfaces: interfaces, customAttributes: [new EditorAttribute()] }\n}\n\nexport function formatterTypeInfo(typeName: StringLiteral, interfaces?: any[]): FormatterTypeInfo {\n return { typeKind: \"formatter\", typeName, interfaces: merge([ISlickFormatter], interfaces) }\n}\n\nexport function interfaceTypeInfo(typeName: StringLiteral, interfaces?: any[]): InterfaceTypeInfo {\n return { typeKind: \"interface\", typeName, interfaces }\n}\n\nexport function registerType(type: { [typeInfoProperty]: TypeInfo, name: string }) {\n if (!type)\n throw \"Decorators.register is called with null target!\";\n\n // peekTypeInfo should auto handle registration\n let typeInfo: TypeInfo = peekTypeInfo(type);\n if (!typeInfo)\n throw `Decorators.register is called on type \"${type.name}\" that does not have a static typeInfo property!`;\n\n if (!typeInfo.typeName)\n throw `Decorators.register is called on type \"${type.name}\", but it's typeInfo property does not have a typeName!`;\n}\n\nexport interface TransformInclude { }", "\uFEFFimport { localTextTableSymbol } from \"./symbols\";\nimport { getGlobalObject } from \"./system\";\n\nfunction getTable(): { [key: string]: string } {\n let localTextTable = getGlobalObject()[localTextTableSymbol];\n if (!localTextTable)\n getGlobalObject()[localTextTableSymbol] = localTextTable = {};\n return localTextTable;\n}\n\nexport function addLocalText(obj: string | Record> | string, pre?: string) {\n if (!obj)\n return;\n \n let table = getTable();\n\n if (typeof obj === \"string\") {\n table[obj] = pre;\n return;\n }\n\n pre ??= '';\n for (let k of Object.keys(obj)) {\n let actual = pre + k;\n let o = obj[k];\n if (typeof (o) === 'object') {\n addLocalText(o, actual + '.');\n }\n else {\n table[actual] = o;\n }\n }\n}\n\nexport function localText(key: string, defaultText?: string): string {\n return getTable()[key] ?? defaultText ?? key ?? '';\n}\n\nexport function tryGetText(key: string): string {\n return getTable()[key];\n}\n\nexport function proxyTexts(o: Record, p: string, t: Record): Object {\n return new Proxy(o, {\n get: (_: Object, y: string) => {\n if (typeof y === \"symbol\")\n return;\n var tv = t[y];\n if (tv == null)\n return localText(p + y);\n else {\n var z = o[y];\n if (z != null)\n return z;\n o[y] = z = proxyTexts({}, p + y + '.', tv);\n return z;\n }\n },\n ownKeys: (_: Object) => Object.keys(t)\n });\n}\n\nexport type LanguageList = { id: string, text: string }[];\nexport type TranslateTextsOptions = { SourceLanguageID?: string, Inputs: { TextKey?: string, TargetLanguageID?: string, SourceText?: string }[] };\nexport type TranslateTextsResult = { Translations?: { TextKey?: string, TargetLanguageID?: string, TranslatedText?: string }[] };\n\nexport const TranslationConfig = {\n getLanguageList: null as () => LanguageList,\n translateTexts: null as (opt: TranslateTextsOptions) => PromiseLike\n}\n\nlet global = getGlobalObject();\n(global.Serenity || (global.Serenity = {})).addLocalText = addLocalText;", "const Config = {\n /**\n * This is the root path of your application. If your application resides under http://localhost/mysite/,\n * your root path is \"/mysite/\". This variable is automatically initialized by reading from a element\n * with ID \"ApplicationPath\" from current page, which is usually located in your _LayoutHead.cshtml file\n */\n applicationPath: '/',\n\n /**\n * Gets a default return URL for the application. This is used when a return URL is not specified\n * @param purpose Optional purpose for the return URL, for example \"login\" or \"logout\"\n */\n defaultReturnUrl: (purpose?: string) => Config.applicationPath,\n\n /**\n * Email validation by default only allows ASCII characters. Set this to true if you want to allow unicode.\n */\n emailAllowOnlyAscii: true,\n\n /**\n * This is an optional callback that is used to load types lazily when they are not found in the\n * type registry. This is useful when a type is not available in currently loaded scripts \n * (e.g. chunks / entry modules) but is available via some other means (e.g. a separate script file).\n * The method may return a type or a promise that resolves to a type. If either returns null, \n * the type is considered to be not found.\n * The method is called with the type key and an optional kind parameter, which is used to distinguish\n * between different kinds of types (e.g. \"editor\" or \"dialog\" or \"enum\").\n */\n lazyTypeLoader: <(typeKey: string, kind: \"dialog\" | \"editor\" | \"enum\" | \"formatter\" | string) => any | Promise>null,\n\n /**\n * This is the list of root namespaces that may be searched for types. For example, if you specify an editor type\n * of \"MyEditor\", first a class with name \"MyEditor\" will be searched, if not found, search will be followed by\n * \"Serenity.MyEditor\" and \"MyApp.MyEditor\" if you added \"MyApp\" to the list of root namespaces.\n *\n * You should usually add your application root namespace to this list in ScriptInit(ialization).ts file.\n */\n rootNamespaces: ['Serenity'],\n\n /**\n * This is an optional method for handling when user is not logged in. If a users session is expired \n * and when a NotAuthorized response is received from a service call, Serenity will call this handler, so\n * you may intercept it and notify user about this situation and ask if she wants to login again...\n */\n notLoggedInHandler: null\n}\n\nif (typeof document !== 'undefined') {\n var pathLink = document.querySelector('link#ApplicationPath') as HTMLLinkElement;\n if (pathLink != null) {\n Config.applicationPath = pathLink.getAttribute('href');\n }\n}\n\nexport { Config };\n\n", "\uFEFFimport { Config } from \"./config\";\nimport { isArrayLike, isPromiseLike } from \"./system\";\n\nconst esc: Record = {\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": \"'\",\n '&': '&',\n}\n\nfunction escFunc(a: string): string {\n return esc[a];\n}\n\n/**\n * Html encodes a string (encodes single and double quotes, & (ampersand), > and < characters)\n * @param s String (or number etc.) to be HTML encoded\n */\nexport function htmlEncode(s: any): string {\n if (s == null)\n return '';\n\n if (typeof s !== \"string\")\n s = \"\" + s;\n\n return s.replace(/[<>\"'&]/g, escFunc)\n}\n\n/** \n * Toggles the class on the element handling spaces like addClass does.\n * @param el the element\n * @param cls the class to toggle\n * @param add if true, the class will be added, if false the class will be removed, otherwise it will be toggled.\n */\nexport function toggleClass(el: Element, cls: string, add?: boolean) {\n if (!el || cls == null || !cls.length)\n return;\n\n if (cls.indexOf(' ') < 0) {\n el.classList.toggle(cls, add);\n return;\n }\n\n var k = cls.split(' ').map(x => x.trim()).filter(x => x.length);\n for (var a of k)\n el.classList.toggle(a, add);\n}\n\n/**\n * Adds a CSS class to the specified element.\n * \n * @param el - The element to add the class to.\n * @param cls - The CSS class to add.\n * @returns A boolean value indicating whether the class was successfully added.\n */\nexport function addClass(el: Element, cls: string) {\n return toggleClass(el, cls, true);\n}\n\n/**\n * Removes a CSS class from an element.\n * \n * @param el - The element from which to remove the class.\n * @param cls - The CSS class to remove.\n * @returns A boolean indicating whether the class was successfully removed.\n */\nexport function removeClass(el: Element, cls: string) {\n return toggleClass(el, cls, false);\n}\n\n/**\n * Appends content like DOM nodes, string, number or an array of these to the parent node.\n * Undefined, null, false values are ignored. Promises are awaited.\n * @param parent Target parent element\n * @param child The content\n */\nexport function appendToNode(parent: ParentNode, child: any) {\n\n if (child == null || child === false)\n return;\n\n if (isArrayLike(child)) {\n for (var i = 0; i < child.length; i++) {\n appendToNode(parent, child[i]);\n }\n } else if (typeof child === \"string\") {\n parent.appendChild(document.createTextNode(child));\n }\n else if (child instanceof Node) {\n parent.appendChild(child);\n }\n else if (isPromiseLike(child)) {\n const placeholder = parent.appendChild(document.createComment(\"Loading content...\"));\n child.then(result => {\n const fragment = document.createDocumentFragment();\n appendToNode(fragment, result);\n placeholder.parentElement?.replaceChild(fragment, placeholder);\n }, error => {\n placeholder.textContent = \"Error loading content: \" + error;\n throw error;\n });\n }\n else {\n parent.append(child);\n }\n}\n\n// From https://pragmaticwebsecurity.com/articles/spasecurity/react-xss-part1\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;\n\n/** A pattern that matches safe data URLs. It only matches image, video, and audio types. */\nconst DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\\/]+=*$/i;\n\nexport function sanitizeUrl(url: string): string {\n url = String(url).trim();\n if (url === \"null\" || url.length === 0 || url === \"about:blank\") return \"about:blank\";\n if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN)) return url;\n if (url === \"javascript:void(0)\" || url === \"javascript:;\") return url;\n return `unsafe:${url}`;\n}\n\n/**\n * Gets readonly state of an element. If the element is null, returns null.\n * It does not check for attached widgets. It returns true if the element has readonly class,\n * disabled attribute (select, radio, checkbox) or readonly attribute (other inputs).\n * @param el element\n */\nexport function getElementReadOnly(el: Element): boolean | null {\n if (el == null)\n return null;\n\n if (el.classList.contains('readonly'))\n return true;\n\n const type = el.getAttribute('type'); \n if (el.tagName == 'SELECT' || type === 'radio' || type === 'checkbox') \n return el.hasAttribute('disabled');\n\n return el.hasAttribute('readonly');\n}\n\n/**\n * Sets readonly class and disabled (for select, radio, checkbox) or readonly attribute (for other inputs) on given element.\n * It does not check for attached widgets.\n * @param el Element\n * @param value Readonly state\n */\nexport function setElementReadOnly(elements: Element | ArrayLike, value: boolean) {\n if (!elements)\n return;\n elements = isArrayLike(elements) ? elements : [elements];\n for (var i = 0; i < elements.length; i++) {\n let el = elements[i];\n if (!el)\n continue;\n var type = el.getAttribute('type');\n el.classList.toggle('readonly', !!value);\n const attr = el.tagName == 'SELECT' || type === 'radio' || type === 'checkbox' ? 'disabled' : 'readonly';\n value ? el.setAttribute(attr, attr) : el.removeAttribute(attr);\n }\n}\n\nexport function parseQueryString(s?: string): Record {\n let qs: string;\n if (s === undefined)\n qs = location.search.substring(1, location.search.length);\n else\n qs = s || '';\n let result: Record = {};\n let parts = qs.split('&');\n for (let i = 0; i < parts.length; i++) {\n let part = parts[i];\n if (!part.length)\n continue;\n let pair = parts[i].split('=');\n let name = decodeURIComponent(pair[0]);\n result[name] = (pair.length >= 2 ? decodeURIComponent(pair[1]) : name);\n }\n return result;\n}\n\nexport function getReturnUrl(opt?: {\n queryOnly?: boolean;\n ignoreUnsafe?: boolean;\n purpose?: string;\n}) {\n var q = parseQueryString();\n var returnUrl = q['returnUrl'] || q['ReturnUrl'] || q[\"ReturnURL\"] || q[\"returnURL\"];\n\n if (returnUrl && (!opt?.ignoreUnsafe && !/^\\//.test(returnUrl)))\n return null;\n\n if (!returnUrl && !opt?.queryOnly)\n returnUrl = Config.defaultReturnUrl(opt?.purpose);\n\n return returnUrl;\n}", "\uFEFFimport { addClass, htmlEncode } from \"./html\";\n\n// adapted from https://github.com/JPeer264/toastr2\nexport type ToastContainerOptions = {\n containerId?: string;\n positionClass?: string;\n target?: string;\n}\n\nexport type ToastrOptions = ToastContainerOptions & {\n /** Show a close button, default is false */\n closeButton?: boolean;\n /** CSS class for close button */\n closeClass?: string;\n /** Close button markup */\n closeHtml?: string;\n /** If true (default) toast keeps open when hovered, and closes after extendedTimeout when mouse leaves the toast */\n closeOnHover?: boolean;\n /** If closeOnHover is true, the toast closes in extendedTimeout duration after the mouse leaves the toast. Default is 1000 */\n extendedTimeOut?: number;\n /** Escape message html, default is true */\n escapeHtml?: boolean;\n /** CSS class for icon */\n iconClass?: string;\n /** CSS class for message */\n messageClass?: string;\n /** Show newest on top */\n newestOnTop?: boolean;\n /** CSS class for toast positioning */\n positionClass?: string;\n /** Prevent duplicates of the same toast, default is false */\n preventDuplicates?: boolean;\n /** Right to left */\n rtl?: boolean;\n /** The container element id */\n target?: string;\n /** The duration for the toast to stay in the page. Set to -1 to make the toast sticky, in that case extendedTimeout is ignored. */\n timeOut?: number;\n /** CSS class for toast */\n toastClass?: string;\n /** Hides the notification when clicked, default is true */\n tapToDismiss?: boolean;\n /** CSS class for title */\n titleClass?: string;\n\n onclick?: (event: MouseEvent) => void;\n onCloseClick?: (event: Event) => void;\n onHidden?: () => void;\n onShown?: () => void;\n}\n\nexport type NotifyMap = {\n type: string;\n iconClass: string;\n title?: string;\n message?: string;\n}\n\nconst initialOptions: ToastrOptions = {\n tapToDismiss: true,\n toastClass: 'toast',\n containerId: 'toast-container',\n onShown: () => { },\n onHidden: () => { },\n closeOnHover: true,\n extendedTimeOut: 1000,\n iconClass: 'toast-info',\n positionClass: 'toast-top-right',\n timeOut: 5000, // Set timeOut to 0 to make it sticky\n titleClass: 'toast-title',\n messageClass: 'toast-message',\n escapeHtml: true,\n target: 'body',\n closeHtml: '',\n closeClass: 'toast-close-button',\n newestOnTop: true,\n preventDuplicates: false,\n rtl: false,\n onCloseClick: () => { },\n closeButton: false,\n onclick: () => { },\n}\n\nvar initialInstance: Toastr = null;\n\nexport class Toastr {\n declare private listener: any;\n\n declare private toastId;\n\n declare private previousToast: string | null;\n\n declare public options: ToastrOptions;\n\n public constructor(options?: ToastrOptions) {\n this.toastId = 0;\n this.previousToast = null;\n this.options = Object.assign(Object.assign({}, initialInstance?.options ?? initialOptions), options);\n }\n\n public getContainer(options?: ToastContainerOptions, create = false): HTMLElement {\n let container = document.getElementById(options?.containerId ?? this.options.containerId);\n if (container || !create)\n return container;\n\n container = document.createElement('div');\n\n container.setAttribute('id', this.options.containerId);\n let positionClass = options?.positionClass ?? this.options.positionClass;\n if (positionClass)\n addClass(container, positionClass);\n\n let targetSelector = options?.target ?? this.options.target;\n const target = document.querySelector(targetSelector);\n if (target)\n target.appendChild(container);\n \n return container; \n }\n\n public error(\n message?: string,\n title?: string,\n opt?: ToastrOptions,\n ): HTMLElement | null {\n return this.notify({\n type: 'error',\n iconClass: 'toast-error',\n message,\n title,\n }, opt);\n }\n\n public warning(\n message?: string,\n title?: string,\n opt?: ToastrOptions,\n ): HTMLElement | null {\n return this.notify({\n type: 'warning',\n iconClass: 'toast-warning',\n message,\n title,\n }, opt);\n }\n\n public success(\n message?: string,\n title?: string,\n opt?: ToastrOptions,\n ): HTMLElement | null {\n return this.notify({\n type: 'success',\n iconClass: 'toast-success',\n message,\n title,\n }, opt);\n }\n\n public info(\n message?: string,\n title?: string,\n opt?: ToastrOptions,\n ): HTMLElement | null {\n return this.notify({\n type: 'info',\n iconClass: 'toast-info',\n message,\n title,\n }, opt);\n }\n\n public subscribe(callback: (response: Toastr) => void): void {\n this.listener = callback;\n }\n\n public publish(args: Toastr): void {\n if (!this.listener) {\n return;\n }\n\n this.listener(args);\n }\n\n private removeContainerIfEmpty(options?: ToastrOptions) {\n let container = this.getContainer(options);\n if (!container)\n return;\n if (!container.hasChildNodes?.() && container.parentNode)\n container.parentNode.removeChild(container);\n }\n\n public removeToast(toastElement: HTMLElement, options?: ToastContainerOptions) {\n if (!toastElement)\n return;\n\n if (toastElement !== document.activeElement) {\n toastElement.parentNode?.removeChild(toastElement);\n this.previousToast = null;\n this.removeContainerIfEmpty(options);\n }\n }\n\n public clear(options?: ToastContainerOptions) {\n let container = this.getContainer(options);\n if (!container)\n return;\n\n const toastsToClear = Array.from(container.childNodes) as HTMLElement[];\n for (let i = toastsToClear.length - 1; i >= 0; i -= 1)\n this.removeToast(toastsToClear[i], options);\n\n this.removeContainerIfEmpty();\n }\n\n private notify(map: NotifyMap, opt: ToastrOptions): HTMLElement | null {\n opt = Object.assign(Object.assign(Object.assign({}, this.options), map), opt);\n\n const shouldExit = (opts: ToastrOptions, exitMap: NotifyMap): boolean => {\n if (opts.preventDuplicates) {\n if (exitMap.message === this.previousToast) {\n return true;\n }\n\n this.previousToast = exitMap.message || '';\n }\n return false;\n };\n\n\n if (shouldExit(opt, map)) {\n return null;\n }\n\n this.toastId += 1;\n\n var container = this.getContainer(opt, true);\n\n let intervalId: number = null;\n const toastElement = document.createElement('div');\n const $titleElement = document.createElement('div');\n const $messageElement = document.createElement('div');\n const closeContainer = document.createElement('div');\n closeContainer.innerHTML = opt.closeHtml.trim();\n const closeElement = closeContainer.firstChild as HTMLElement | null;\n\n const response: any = {\n toastId: this.toastId,\n state: 'visible',\n startTime: new Date(),\n endTime: undefined,\n opt,\n map,\n };\n\n const hideToast = (override: any = null): void => {\n if (toastElement === document.activeElement && !override) {\n return;\n }\n\n this.removeToast(toastElement);\n\n if (intervalId) {\n clearTimeout(intervalId);\n }\n\n if (opt.onHidden && response.state !== 'hidden') {\n opt.onHidden();\n }\n\n response.state = 'hidden';\n response.endTime = new Date();\n this.publish(response);\n };\n\n const setAria = (): void => {\n let ariaValue = '';\n\n switch (opt.iconClass) {\n case 'toast-success':\n case 'toast-info':\n ariaValue = 'polite';\n\n break;\n\n default:\n ariaValue = 'assertive';\n }\n\n toastElement.setAttribute('aria-live', ariaValue);\n };\n\n const handleEvents = (): void => {\n if (opt.closeOnHover) {\n\n toastElement.addEventListener('mouseover', () => { \n if (intervalId) {\n clearTimeout(intervalId); \n }\n });\n\n toastElement.addEventListener('mouseout', () => { \n if (opt.timeOut >= 0 && (opt.timeOut > 0 || opt.extendedTimeOut > 0)) {\n intervalId = setTimeout(hideToast, opt.extendedTimeOut);\n }\n });\n }\n\n if (!opt.onclick && opt.tapToDismiss) {\n toastElement.addEventListener('click', hideToast);\n }\n\n if (opt.closeButton && closeElement) {\n closeElement.addEventListener('click', (event) => {\n event.stopPropagation();\n\n if (opt.onCloseClick) {\n opt.onCloseClick(event);\n }\n\n hideToast(true);\n });\n }\n\n if (opt.onclick) {\n toastElement.addEventListener('click', (event) => {\n // ts needs another check here\n if (opt.onclick) {\n opt.onclick(event);\n }\n\n if (opt.tapToDismiss)\n hideToast();\n });\n }\n };\n\n const setTitle = (): void => {\n if (map.title) {\n let suffix = map.title;\n if (opt.escapeHtml) {\n suffix = htmlEncode(map.title);\n }\n $titleElement.innerHTML = suffix;\n addClass($titleElement, opt.titleClass);\n toastElement.appendChild($titleElement);\n }\n };\n\n const setMessage = (): void => {\n if (map.message) {\n let suffix = map.message;\n\n if (opt.escapeHtml) {\n suffix = htmlEncode(map.message);\n }\n\n $messageElement.innerHTML = suffix;\n addClass($messageElement, opt.messageClass);\n toastElement.appendChild($messageElement);\n }\n };\n\n const setCloseButton = (): void => {\n if (opt.closeButton && closeElement) {\n addClass(closeElement, opt.closeClass);\n closeElement.setAttribute('role', 'button');\n toastElement.insertBefore(closeElement, toastElement.firstChild);\n }\n };\n\n const setSequence = (): void => {\n if (opt.newestOnTop) {\n container.insertBefore(toastElement, container.firstChild);\n } else {\n container.appendChild(toastElement);\n }\n };\n\n const displayToast = (): void => {\n if (opt.onShown) {\n opt.onShown();\n }\n\n if (opt.timeOut > 0) {\n intervalId = setTimeout(hideToast, opt.timeOut);\n\n }\n };\n\n const personalizeToast = (): void => {\n toastElement.classList.add('show');\n opt.rtl && toastElement.classList.add('rtl');\n opt.toastClass && addClass(toastElement, opt.toastClass);\n opt.iconClass && addClass(toastElement, opt.iconClass);\n setTitle();\n setMessage();\n setCloseButton();\n setSequence();\n setAria();\n };\n\n personalizeToast();\n displayToast();\n handleEvents();\n this.publish(response);\n return toastElement;\n }\n}\n\ninitialInstance = new Toastr();\n\nexport default initialInstance;\n", "\uFEFFimport toastr, { type ToastrOptions } from \"./toastr2\";\n\nexport let defaultNotifyOptions: ToastrOptions = {\n timeOut: 5000,\n escapeHtml: true,\n positionClass: 'position-toast toast-top-full-width'\n}\n\nexport function positionToastContainer(options?: ToastrOptions, create = true) {\n let container = toastr.getContainer(options, create);\n if (!container || !container.classList.contains('position-toast') || typeof document === \"undefined\" || !document.body)\n return;\n\n let dialogs = Array.from(document.body.children);\n let dialogIndex = dialogs.findIndex(x => x.matches('.ui-dialog, .modal.in, .modal.show') && !x.matches('[style*=\"display:none\"], [style*=\"display: none\"], .hidden'));\n let dialog = dialogs[dialogIndex];\n if (dialog) {\n const { top, left, right } = dialog.getBoundingClientRect();\n container.classList.add('positioned-toast');\n container.style.position = 'absolute';\n container.style.top = top + 28 + 'px';\n container.style.left = left + 6 + 'px';\n container.style.width = Math.max(((right - left) - 12), 150) + 'px';\n }\n else if (container.classList.contains('positioned-toast')) {\n container.classList.remove('positioned-toast');\n container.style.position = '';\n container.style.top = '';\n container.style.left = '';\n container.style.width = '';\n }\n}\n\nfunction getToastrOptions(options: ToastrOptions) {\n options = Object.assign(Object.assign({}, defaultNotifyOptions), options);\n positionToastContainer(options);\n return options;\n}\n\nfunction showToast(type: \"error\" | \"info\" | \"success\" | \"warning\", message: string, title?: string, options?: ToastrOptions) {\n return toastr[type](message, title, getToastrOptions(options));\n}\n\nexport function notifyError(message: string, title?: string, options?: ToastrOptions): void {\n showToast('error', message, title, options);\n}\n\nexport function notifyInfo(message: string, title?: string, options?: ToastrOptions): void {\n showToast('info', message, title, options);\n}\n\nexport function notifySuccess(message: string, title?: string, options?: ToastrOptions): void {\n showToast('success', message, title, options);\n}\n\nexport function notifyWarning(message: string, title?: string, options?: ToastrOptions): void {\n showToast('warning', message, title, options);\n}", "\uFEFFlet blockUICount: number = 0;\n\n/**\n * Tries to block the page\n */\nexport function blockUI(options?: { zIndex?: number, useTimeout?: boolean }) {\n\n function block() {\n if (blockUICount++ > 0 ||\n typeof document === \"undefined\")\n return;\n \n var div = document.createElement(\"div\");\n div.className = \"blockUI blockOverlay\";\n div.setAttribute(\"style\", `z-index: ${options?.zIndex ?? 2000}; border: none; margin: 0px; padding: 0px; width: 100%; height: 100%; top: 0px; left: 0px; opacity: 0; cursor: wait; position: fixed;`);\n document.body.appendChild(div);\n }\n \n (options?.useTimeout && (window.setTimeout(block, 0))) || block();\n}\n\n/**\n * Unblocks the page. \n */\nexport function blockUndo() {\n if (blockUICount < 1)\n return;\n if (--blockUICount === 0 && typeof document !== \"undefined\")\n document.body.querySelector(':scope > .blockUI.blockOverlay')?.remove();\n}", "\uFEFFexport interface LookupOptions {\n idField?: string;\n parentIdField?: string;\n textField?: string;\n}\n\nexport interface Lookup {\n items: TItem[];\n itemById: { [key: string]: TItem };\n idField: string;\n parentIdField: string;\n textField: string;\n}\n\nexport class Lookup {\n declare public items: TItem[];\n declare public itemById: { [key: string]: TItem };\n declare public idField: string;\n declare public parentIdField: string;\n declare public textField: string;\n\n constructor(options: LookupOptions, items?: TItem[]) {\n this.items = []\n this.itemById = {};\n options = options || {};\n this.idField = options.idField;\n this.parentIdField = options.parentIdField;\n this.textField = options.textField;\n\n if (items != null)\n this.update(items);\n }\n\n update?(value: TItem[]) {\n this.items = [];\n this.itemById = {};\n if (value) {\n for (var k of value) {\n if (k == null || typeof k !== \"object\") // special case for distinct lookup\n this.items.push({ [this.idField]: k, [this.textField]: k } as any);\n else\n this.items.push(k);\n }\n }\n var idField = this.idField;\n if (idField) {\n for (var r of this.items) {\n var v = (r as any)[idField];\n if (v != null) {\n this.itemById[v] = r;\n }\n }\n }\n }\n}", "\uFEFFexport function getjQuery(): any {\n // @ts-ignore\n return typeof jQuery === \"function\" ? jQuery : typeof $ === \"function\" && ($ as any).fn ? $ : undefined;\n}\n\n/** Returns true if Bootstrap 3 is loaded */\nexport function isBS3(): boolean {\n return (getjQuery()?.fn?.modal?.Constructor?.VERSION + \"\").charAt(0) == '3';\n}\n\n/** Returns true if Bootstrap 5+ is loaded */\nexport function isBS5Plus(): boolean {\n return typeof bootstrap !== \"undefined\" && !!bootstrap.Modal && (bootstrap.Modal.VERSION + \"\").charAt(0) != '4';\n}\n", "\uFEFF/**\n * --------------------------------------------------------------------------\n * Adapted from: Bootstrap dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getjQuery } from \"./environment\"\n\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/\nconst stripNameRegex = /\\..*/\nconst stripUidRegex = /::\\d+$/\nlet uidEvent = 1\nconst customEvents: Record = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n}\n\nfunction makeEventUid(prefix: string): string {\n return `${prefix}::${uidEvent++}`;\n}\n\ntype EventHandler = Function & {\n callable: EventListenerOrEventListenerObject;\n delegationSelector?: string | Function;\n oneOff?: boolean;\n uidEvent?: string;\n}\n\ntype EventHandlers = Record;\ntype ElementEvents = Record;\n\nconst eventRegistry: WeakMap = new WeakMap();\n\nexport function disposeDescendants(element: Element) {\n element.querySelectorAll(\"*\").forEach(node => disposeElement(node));\n}\n\nexport function disposeElement(element: EventTarget): void {\n let events = eventRegistry.get(element);\n if (!events)\n return;\n\n eventRegistry.delete(element);\n\n var disposeHandlers = events[\"disposing\"];\n if (disposeHandlers) {\n for (const [_, handler] of Object.entries(disposeHandlers)) {\n if (typeof handler.callable === \"function\") {\n try {\n handler.callable.call(element, { target: element });\n }\n catch {\n }\n }\n }\n }\n for (const [typeEvent, handlers] of Object.entries(events)) {\n for (const [handlerKey, handler] of Object.entries(handlers)) {\n element.removeEventListener(typeEvent, handler as any, Boolean(handler.delegationSelector));\n delete handlers[handlerKey];\n }\n }\n\n}\n\nfunction getElementEvents(element: EventTarget): ElementEvents {\n var events = eventRegistry.get(element);\n if (!events)\n eventRegistry.set(element, events = {});\n return events;\n}\n\nfunction hydrateEvent(obj: Event, meta = {}) {\n for (const [key, value] of Object.entries(meta)) {\n if (key === 'bubbles' || key === 'cancelable') {\n // these should be set when the event is constructed\n continue;\n }\n try {\n (obj as any)[key] = value\n } catch {\n Object.defineProperty(obj, key, {\n configurable: true,\n get() {\n return value\n }\n })\n }\n }\n\n return obj;\n}\n\nfunction baseHandler(element: EventTarget, fn: any) {\n return function handler(event: Event) {\n hydrateEvent(event, { delegateTarget: element })\n\n if ((handler as any).oneOff) {\n removeListener(element, event.type, fn)\n }\n\n return fn.apply(element, [event])\n }\n}\n\nfunction delegationHandler(element: EventTarget, selector: string, fn: Function) {\n return function handler(event: Event) {\n const domElements = (element as any).querySelectorAll(selector)\n\n for (let { target } = event; target && target !== this; target = (target as any).parentNode) {\n for (const domElement of (domElements as any)) {\n if (domElement !== target) {\n continue\n }\n\n hydrateEvent(event, { delegateTarget: target })\n\n if ((handler as any).oneOff) {\n removeListener(element, event.type, selector, fn)\n }\n\n return fn.apply(target, [event])\n }\n }\n }\n}\n\nfunction findHandler(handlers: EventHandlers, callable: Function, delegationSelector: any = null) {\n return Object.values(handlers)\n .find((event) => event.callable === callable && event.delegationSelector === delegationSelector)\n}\n\nfunction normalizeParameters(originalTypeEvent: string, handler: any, delegationFunction: any) {\n const isDelegated = typeof handler === 'string'\n const callable = isDelegated ? delegationFunction : (handler || delegationFunction);\n let typeEvent = getTypeEvent(originalTypeEvent)\n if (originalTypeEvent.indexOf(\".bs.\") >= 0)\n typeEvent = originalTypeEvent;\n return [isDelegated, callable, typeEvent]\n}\n\nexport function addListener(element: EventTarget, originalTypeEvent: string, handler: Function | string, delegationFunction?: Function, oneOff?: boolean) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n const $ = getjQuery();\n if ($) {\n let $element = $(element);\n if (oneOff)\n $element.one(originalTypeEvent, handler, delegationFunction);\n else\n $element.on(originalTypeEvent, handler, delegationFunction);\n return;\n }\n\n let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);\n if (!callable)\n return;\n\n if (originalTypeEvent in customEvents) {\n const wrapFunction = (fn: Function) => {\n return function (event: Event & { relatedTarget?: any, delegateTarget: any }) {\n if (!event.relatedTarget || (event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget))) {\n return fn.call(this, event)\n }\n }\n }\n\n callable = wrapFunction(callable)\n }\n\n const events = getElementEvents(element);\n const handlers = events[typeEvent] || (events[typeEvent] = {});\n const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null);\n\n if (previousFunction) {\n (previousFunction as any).oneOff = (previousFunction as any).oneOff && oneOff\n return;\n }\n\n const uid = makeEventUid(originalTypeEvent.replace(namespaceRegex, ''))\n const fn = (isDelegated ?\n delegationHandler(element, handler as string, callable) :\n baseHandler(element, callable)) as any as EventHandler;\n\n fn.delegationSelector = isDelegated ? handler : null;\n fn.callable = callable;\n fn.oneOff = oneOff;\n fn.uidEvent = uid;\n handlers[uid] = fn;\n\n element.addEventListener(typeEvent, fn as any, isDelegated);\n}\n\nfunction removeHandler(element: EventTarget, events: ElementEvents, typeEvent: string, handler: any, delegationSelector: string | Function) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector)\n\n if (!fn) {\n return\n }\n\n element.removeEventListener(typeEvent, fn as any, Boolean(delegationSelector))\n delete events[typeEvent][(fn as any).uidEvent]\n}\n\nfunction removeNamespacedHandlers(element: EventTarget, events: ElementEvents, typeEvent: string, namespace: string) {\n const handlers = events[typeEvent] || {};\n\n for (const [handlerKey, handler] of Object.entries(handlers)) {\n if (handlerKey.includes(namespace)) {\n removeHandler(element, events, typeEvent, handler.callable, handler.delegationSelector);\n }\n }\n}\n\nfunction getTypeEvent(event: string) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '')\n return customEvents[event] || event\n}\n\nexport function removeListener(element: EventTarget, originalTypeEvent: string, handler?: any, delegationHandler?: Function): void {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n const $ = getjQuery();\n if ($) {\n $(element).off(originalTypeEvent, handler, delegationHandler);\n return;\n }\n\n const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationHandler);\n const inNamespace = typeEvent !== originalTypeEvent;\n const events = getElementEvents(element);\n const handlers = events[typeEvent] || {};\n const isNamespace = originalTypeEvent.startsWith('.');\n\n if (typeof callable !== 'undefined') {\n if (!Object.keys(handlers).length) {\n return;\n }\n\n removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);\n return\n }\n\n if (isNamespace) {\n for (const elementEvent of Object.keys(events)) {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));\n }\n }\n\n for (const [keyHandlers, handler] of Object.entries(handlers)) {\n const handlerKey = keyHandlers.replace(stripUidRegex, '');\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n removeHandler(element, events, typeEvent, handler.callable, handler.delegationSelector);\n }\n }\n}\n\nexport function triggerEvent(element: EventTarget, type: string, args?: any): Event & { isDefaultPrevented?(): boolean } {\n if (typeof type !== 'string' || !element) {\n return null;\n }\n\n const $ = getjQuery();\n const typeEvent = getTypeEvent(type);\n const inNamespace = type !== typeEvent;\n\n let jQueryEvent = null;\n let bubbles = args?.bubbles ?? true;\n let nativeDispatch = true;\n let defaultPrevented = false;\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(type, args);\n $(element).trigger(jQueryEvent);\n bubbles = bubbles && !jQueryEvent.isPropagationStopped();\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();\n defaultPrevented = jQueryEvent.isDefaultPrevented();\n }\n\n const evt = hydrateEvent(new Event(type, { bubbles, cancelable: args?.cancelable ?? true }), args);\n\n if (defaultPrevented) {\n evt.preventDefault();\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt);\n }\n\n if (evt.defaultPrevented && jQueryEvent) {\n jQueryEvent.preventDefault();\n }\n\n return evt\n}", "\uFEFFimport { getjQuery } from \"./environment\";\nimport { addListener, disposeDescendants, disposeElement, removeListener, triggerEvent } from \"./fluent-events\";\nimport { toggleClass as toggleCls } from \"./html\";\n\n/**\n * Represents a Fluent object, which is similar to jQuery but works for only one element.\n * It implements the `ArrayLike` interface and can have 0 (null) or 1 element.\n */\nexport interface Fluent extends ArrayLike {\n\n /**\n * Adds one or more classes to the element. Any falsy value is ignored.\n *\n * @param value The class or classes to add. It can be a string, boolean, or an array of strings or booleans.\n * @returns The Fluent object itself.\n */\n addClass(value: string | boolean | (string | boolean)[]): this;\n\n /**\n * Appends content to the element.\n *\n * @param child The content to append. It can be a string, a Node object, or another Fluent object.\n * @returns The Fluent object itself.\n */\n append(child: string | Node | Fluent): this;\n\n /**\n * Inserts content after the element.\n *\n * @param content The content to insert. It can be a string, a Node object, or another Fluent object.\n * @returns The Fluent object itself.\n */\n after(content: string | Node | Fluent): this;\n\n /**\n * Appends the element to the specified parent element.\n *\n * @param parent The parent element to append to. It can be an Element object or another Fluent object.\n * @returns The Fluent object itself.\n */\n appendTo(parent: Element | Fluent): this;\n\n /**\n * Gets the value of the specified attribute. \n *\n * @param name The name of the attribute.\n * @returns The value of the attribute.\n */\n attr(name: string): string;\n \n /**\n * Sets the value of the specified attribute. \n *\n * @param name The name of the attribute.\n * @param value The value of the attribute. If the value is falsy the attribute is removed.\n * @returns The Fluent object itself if a value is provided.\n */\n attr(name: string, value: string | number | boolean | null | undefined): this;\n\n /**\n * Inserts content before the element.\n *\n * @param content The content to insert. It can be a string, a Node object, or another Fluent object.\n * @returns The Fluent object itself.\n */\n before(content: string | Node | Fluent): this;\n\n /**\n * Gets the children of the element as an array (not Fluent)\n *\n * @param selector Optional. A CSS selector to filter the children.\n * @returns An array of HTMLElement objects representing the children.\n */\n children(selector?: string): TElement[];\n\n /**\n * Sets (overrides) the class attribute of the element. Any falsy value is ignored.\n *\n * @param value The class or classes to add. It can be a string, boolean, or an array of strings or booleans.\n * @returns The Fluent object itself.\n */\n class(value: string | boolean | (string | boolean)[]): this;\n\n /**\n * Triggers a click event on the element.\n *\n * @returns The Fluent object itself.\n */\n click(): this;\n /**\n * Adds a click event listener on the element.\n *\n * @param listener A callback function to execute when the click event is triggered.\n * @returns The Fluent object itself.\n */\n click(listener: (e: MouseEvent) => void): this;\n\n /**\n * Gets the closest ancestor of the element that matches the specified selector.\n *\n * @param selector A CSS selector to match against.\n * @returns A Fluent object representing the closest ancestor element.\n */\n closest(selector: string): Fluent;\n\n /**\n * Gets or sets the value of the specified data attribute.\n *\n * @param name The name of the data attribute.\n * @returns The value of the data attribute if no value is provided, or the Fluent object itself if a value is provided.\n */\n data(name: string): string;\n data(name: string, value: string): this;\n\n /**\n * Executes a callback function for the element in the Fluent object if it is not null.\n *\n * @param callback The callback function to execute for each element.\n * @returns The Fluent object itself.\n */\n each(callback: (el: TElement) => void): this;\n\n /**\n * Gets the underlying HTML element.\n *\n * @returns The underlying HTML element.\n */\n getNode(): TElement;\n\n /**\n * Removes all child nodes from the element. It also clears event handlers attached via Fluent, and disposes any attached widgets.\n *\n * @returns The Fluent object itself.\n */\n empty(): this;\n\n /**\n * Finds all elements that match the specified selector within the element.\n *\n * @param selector A CSS selector to match against.\n * @returns An array of elements that match the selector.\n */\n findAll(selector: string): TElement[];\n\n /**\n * Finds each element that matches the specified selector within the element and executes a callback function for each found element as a Fluent object.\n *\n * @param selector A CSS selector to match against.\n * @param callback The callback function to execute for each found element. It receives a Fluent object for each element.\n * @returns The Fluent object itself.\n */\n findEach(selector: string, callback: (el: Fluent, index: number) => void): this;\n\n /**\n * Finds the first element that matches the specified selector within the element.\n *\n * @param selector A CSS selector to match against.\n * @returns A Fluent object representing the first element that matches the selector.\n */\n findFirst(selector: string): Fluent;\n\n /**\n * Sets focus on the element.\n *\n * @returns The Fluent object itself.\n */\n focus(): this;\n\n /**\n * Checks if the element has the specified class.\n *\n * @param klass The class to check for.\n * @returns `true` if the element has the class, `false` otherwise.\n */\n hasClass(klass: string): boolean;\n\n /**\n * Hides the element by setting its display property to \"none\".\n *\n * @returns The Fluent object itself.\n */\n hide(): this;\n\n /**\n * Gets the widget associated with the element.\n *\n * @param type Optional. The constructor function of the widget.\n * @returns The widget associated with the element.\n */\n getWidget(type?: { new(...args: any[]): TWidget }): TWidget;\n\n /**\n * Inserts the element after the specified reference element.\n *\n * @param referenceNode The reference element to insert after. It can be an HTMLElement object or another Fluent object.\n * @returns The Fluent object itself.\n */\n insertAfter(referenceNode: HTMLElement | Fluent): this;\n\n /**\n * Inserts the element before the specified reference element.\n *\n * @param referenceNode The reference element to insert before. It can be an HTMLElement object or another Fluent object.\n * @returns The Fluent object itself.\n */\n insertBefore(referenceNode: HTMLElement | Fluent): this;\n\n /**\n * Gets an iterator for the elements in the Fluent object.\n *\n * @returns An iterator for the elements in the Fluent object.\n */\n [Symbol.iterator]: TElement[];\n\n /**\n * Gets the element at the specified index.\n *\n * @param n The index of the element.\n * @returns The element at the specified index.\n */\n readonly [n: number]: TElement;\n\n /**\n * Gets the number of elements in the Fluent object. Can only be 1 or 0.\n */\n readonly length: number;\n\n /**\n * Removes an event listener from the element.\n *\n * @param type The type of the event. It can include a \".namespace\" similar to jQuery.\n * @param listener The event listener to remove.\n * @returns The Fluent object itself.\n */\n off(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any): this;\n off(type: string): this;\n off(type: string, listener: EventListener): this;\n off(type: string, selector: string, delegationHandler: Function): this;\n\n /**\n * Adds an event listener to the element. It is possible to use delegated events like jQuery.\n *\n * @param type The type of the event. It can include a \".namespace\" similar to jQuery.\n * @param listener The event listener to add.\n * @returns The Fluent object itself.\n */\n on(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any): this;\n on(type: string, listener: EventListener): this;\n on(type: string, selector: string, delegationHandler: Function): this;\n\n /**\n * Adds a one-time event listener to the element. It is possible to use delegated events like jQuery.\n *\n * @param type The type of the event. It can include a \".namespace\" similar to jQuery.\n * @param listener The event listener to add.\n * @returns The Fluent object itself.\n */\n one(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any): this;\n one(type: string, listener: EventListener): this;\n one(type: string, selector: string, delegationHandler: Function): this;\n\n /**\n * Checks if the element matches the specified selector.\n *\n * @param selector A CSS selector to match against.\n * @returns `true` if the element matches the selector, `false` otherwise.\n */\n matches(selector: string): boolean;\n\n /**\n * Gets the next sibling element that matches the specified selector, or the first sibling if no selector is provided..\n *\n * @param selector Optional. A CSS selector to filter the next sibling.\n * @returns A Fluent object representing the next sibling element.\n */\n nextSibling(selector?: string): Fluent;\n\n /**\n * Gets the parent element of the element.\n *\n * @returns A Fluent object representing the parent element.\n */\n parent(): Fluent;\n\n /**\n * Prepends content to the element.\n *\n * @param child The content to prepend. It can be a string, a Node object, or another Fluent object.\n * @returns The Fluent object itself.\n */\n prepend(child: string | Node | Fluent): this;\n\n /**\n * Prepends the element to the specified parent element.\n *\n * @param parent The parent element to prepend to. It can be an Element object or another Fluent object.\n * @returns The Fluent object itself.\n */\n prependTo(parent: Element | Fluent): this;\n\n /**\n * Gets the previous sibling element that matches the specified selector, or the first sibling if no selector is provided.\n *\n * @param selector Optional. A CSS selector to filter the previous sibling.\n * @returns A Fluent object representing the previous sibling element.\n */\n prevSibling(selector?: string): Fluent;\n\n /**\n * Removes the element from the DOM. It also removes event handlers and disposes widgets by calling \"disposing\" event handlers.\n *\n * @returns The Fluent object itself.\n */\n remove(): this;\n\n /**\n * Removes the specified attribute from the element.\n *\n * @param name The name of the attribute to remove.\n * @returns The Fluent object itself.\n */\n removeAttr(name: string): this;\n\n /**\n * Removes one or more classes from the element. Any falsy value is ignored.\n *\n * @param value The class or classes to remove. It can be a string, boolean, or an array of strings or booleans.\n * @returns The Fluent object itself.\n */\n removeClass(value: string | boolean | (string | boolean)[]): this;\n\n /**\n * Shows the element by setting its display property to empty string.\n *\n * @returns The Fluent object itself.\n */\n show(): this;\n\n /**\n * Executes a callback function to modify the inline style of the element.\n *\n * @param callback The callback function to modify the inline style.\n * @returns The Fluent object itself.\n */\n style(callback: (css: CSSStyleDeclaration) => void): this;\n\n /**\n * Gets or sets the text content of the element.\n *\n * @returns The text content of the element if no value is provided, or the Fluent object itself if a value is provided.\n */\n text(): string;\n text(value: string): this;\n\n /**\n * Toggles the visibility of the element.\n *\n * @param flag Optional. A flag indicating whether to show or hide the element. If not provided, the visibility will be toggled.\n * @returns The Fluent object itself.\n */\n toggle(flag?: boolean): this;\n\n /**\n * Toggles one or more classes on the element. If the class exists, it is removed; otherwise, it is added.\n *\n * @param value The class or classes to toggle. It can be a string, boolean, or an array of strings or booleans.\n * @returns The Fluent object itself.\n */\n toggleClass(value: (string | boolean | (string | boolean)[]), add?: boolean): this;\n\n /**\n * Triggers a specified event on the element.\n *\n * @param type The type of the event to trigger.\n * @param args Optional. An object that specifies event-specific initialization properties.\n * @returns The Fluent object itself.\n */\n trigger(type: string, args?: any): this;\n\n /**\n * Tries to get the widget associated with the element.\n *\n * @param type Optional. The constructor function of the widget.\n * @returns The widget associated with the element, or `null` if no widget is found.\n */\n tryGetWidget(type?: { new(...args: any[]): TWidget }): TWidget;\n\n /**\n * Gets or sets the value of the element.\n *\n * @param value The value to set. If no value is provided, returns the current value of the element.\n * @returns The value of the element if no value is provided, or the Fluent object itself if a value is provided.\n */\n val(value: string): this;\n val(): string;\n}\n\nexport function Fluent(tag: K): Fluent;\nexport function Fluent(element: TElement): Fluent;\nexport function Fluent(element: EventTarget): Fluent;\nexport function Fluent(tagOrElement: K | HTMLElementTagNameMap[K]): Fluent {\n if (!(this instanceof Fluent)) {\n if (typeof tagOrElement === \"string\")\n return new (Fluent as any)(document.createElement(tagOrElement));\n\n return new (Fluent as any)(tagOrElement);\n }\n\n this.el = tagOrElement;\n return this;\n}\n\nexport namespace Fluent {\n /**\n * Adds an event listener to the element. It is possible to use delegated events like jQuery.\n *\n * @param element The target element\n * @param type The type of the event. It can include a \".namespace\" similar to jQuery.\n * @param listener The event listener to add.\n */\n export function on(element: EventTarget, type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any): void;\n export function on(element: EventTarget, type: string, listener: EventListener): void;\n export function on(element: EventTarget, type: string, selector: string, delegationHandler: Function): void;\n export function on(element: EventTarget, type: string, handler: any, delegationHandler?: Function): void {\n addListener(element, type, handler, delegationHandler, /*oneOff*/ false);\n }\n\n /**\n * Adds a one-time event listener to the element. It is possible to use delegated events like jQuery.\n *\n * @param element The target element\n * @param type The type of the event. It can include a \".namespace\" similar to jQuery.\n * @param listener The event listener to add.\n */\n export function one(element: EventTarget, type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any): void;\n export function one(element: EventTarget, type: string, listener: EventListener): void;\n export function one(element: EventTarget, type: string, selector: string, delegationHandler: Function): void;\n export function one(element: EventTarget, type: string, handler: any, delegationHandler?: Function): void {\n addListener(element, type, handler, delegationHandler, true);\n }\n\n /**\n * Removes an event listener from the element.\n *\n * @param element The target element\n * @param type The type of the event. It can include a \".namespace\" similar to jQuery.\n * @param listener The event listener to remove.\n */\n export function off(element: EventTarget, type: K, listener?: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any): void;\n export function off(element: EventTarget, type: string, listener?: EventListener): void;\n export function off(element: EventTarget, type: string, selector?: string, delegationHandler?: Function): void;\n export function off(element: EventTarget, originalTypeEvent: string, handler?: any, delegationHandler?: Function): void {\n return removeListener(element, originalTypeEvent, handler, delegationHandler);\n }\n\n /**\n * Triggers a specified event on the element.\n *\n * @param element The target element\n * @param type The type of the event to trigger.\n * @param args Optional. An object that specifies event-specific initialization properties.\n * @returns The event object. Use Fluent.isDefaultPrevented the check if preventDefault is called.\n */\n export function trigger(element: EventTarget, type: string, args?: any): Event & { isDefaultPrevented?(): boolean } {\n return triggerEvent(element, type, args);\n }\n\n /**\n * Adds one or more classes to the element. Any falsy value is ignored.\n * \n * @param element The target element\n * @param value The class or classes to add. It can be a string, boolean, or an array of strings or booleans.\n */\n export function addClass(element: Element, value: string | boolean | (string | boolean)[]): void {\n toggleCls(element, toClassName(value), true);\n }\n\n export function empty(element: Element): void {\n if (!element)\n return;\n\n if (typeof element.hasChildNodes === \"function\" && element.hasChildNodes()) {\n let $ = getjQuery();\n if ($)\n $(element).empty();\n else {\n disposeDescendants(element);\n element.innerHTML = \"\";\n }\n }\n else\n element.innerHTML = \"\";\n }\n\n /** \n * Returns true if the element is visible like. This is for compatibility with jQuery's :visible selector.\n * @param element The target element\n * @returns true if the element has offsetWidth or offsetHeight or any getClientRects().length > 0\n */\n export function isVisibleLike(element: Element): boolean {\n return !!(element && ((element as any).offsetWidth || (element as any).offsetHeight || element.getClientRects().length));\n }\n\n /**\n * Removes the element from the DOM. It also removes event handlers and disposes widgets by calling \"disposing\" event handlers.\n *\n * @param element The element to remove\n */\n export function remove(element: Element): void {\n if (!element)\n return;\n let $ = getjQuery();\n if ($) {\n $(element).remove();\n }\n else {\n disposeDescendants(element);\n disposeElement(element);\n element.remove();\n }\n }\n\n /**\n * Removes one or more classes from the element. Any falsy value is ignored.\n *\n * @param element The target element\n * @param value The class or classes to remove. It can be a string, boolean, or an array of strings or booleans.\n */\n export function removeClass(element: Element, value: string | boolean | (string | boolean)[]): void {\n toggleCls(element, toClassName(value), false);\n }\n\n /**\n * Toggles the visibility of the element.\n * \n * @param element The target element\n * @param flag Optional. A flag indicating whether to show or hide the element. If not provided, the visibility will be toggled.\n * @returns The Fluent object itself.\n */\n export function toggle(element: Element, flag?: boolean): void {\n element && (element as any).style && ((element as any).style.display = flag ? \"\" : (flag != null && !flag) ? \"none\" : (element as any).style.display == \"none\" ? \"\" : \"none\");\n }\n\n /**\n * Toggles one or more classes on the element. If the class exists, it is removed; otherwise, it is added. Falsy values are ignored.\n *\n * @param element The target element\n * @param value The class or classes to toggle. It can be a string, boolean, or an array of strings or booleans.\n */\n export function toggleClass(element: Element, value: string | boolean | (string | boolean)[], add?: boolean): void {\n element && toggleCls(element, toClassName(value), add);\n }\n\n /**\n * Converts the given class value or an array of class values to a CSS class name. Any falsy value is ignored.\n * @param value The class or classes. It can be a string, boolean, or an array of strings or booleans.\n * @returns Class name string\n */\n export function toClassName(value: string | boolean | (string | boolean)[]): string {\n if (typeof value === \"string\")\n return value;\n if (Array.isArray(value))\n return value.map(toClassName).filter(Boolean).join(\" \");\n if (typeof value !== \"boolean\" && value != null)\n return \"\" + value;\n return \"\";\n }\n\n /** \n * Returns true if the element is input like. E.g. one of input, textarea, select, button. This is for compatibility with jQuery's :input selector.\n * @param element The target element\n * @returns true if element is an input like node\n */\n export function isInputLike(element: Element): element is (HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | HTMLButtonElement) {\n return isInputTag(element?.nodeName);\n }\n\n /** A CSS selector for input like tags */\n export const inputLikeSelector = \"input,select,textarea,button\";\n\n /** \n * Returns true if the tag is one of input, textarea, select, button.\n * @param tag The tag\n * @returns true if the element has offsetWidth or offsetHeight or any getClientRects().length > 0\n */\n export function isInputTag(tag: string) {\n return /^(?:input|select|textarea|button)$/i.test(tag);\n }\n\n /**\n * Checks if the event's preventDefault method is called. This is for compatibility with jQuery which\n * has a non-standard isDefaultPrevented method.\n * @param event The event object\n * @returns True if preventDefault is called.\n */\n export function isDefaultPrevented(event: { defaultPrevented?: boolean, isDefaultPrevented?: () => boolean }) {\n return event != null && (!!event.defaultPrevented ||\n (typeof event.isDefaultPrevented === \"function\" && !!event.isDefaultPrevented()));\n }\n\n /**\n * Tries to read a property from the event, or event.originalEvent, or event.detail. It is designed\n * for compatibility with the way jQuery wraps original event under originalEvent property, that\n * causes custom properties to be not available in the event object.\n * \n * @param event The event object\n * @param prop The property name\n * @returns The property value\n */\n export function eventProp(event: any, prop: string) {\n if (!event)\n return void 0;\n\n if (typeof event[prop] !== \"undefined\")\n return event[prop];\n\n if (typeof event.originalEvent === \"object\" && typeof event.originalEvent[prop] !== \"undefined\")\n return event.originalEvent[prop];\n\n if (typeof event.detail === \"object\")\n return event.detail[prop];\n }\n}\n\ntype FluentThis = Fluent & {\n el?: HTMLElement;\n}\n\nfunction extractNode(element: string | Node | FluentThis): (string | Node) {\n return (element instanceof EventTarget || typeof element === \"string\") ? element : element?.el;\n}\n\nfunction extractElement(element: Element | FluentThis): HTMLElement {\n return (element instanceof EventTarget || typeof element === \"string\") ? element as HTMLElement : element?.el;\n}\n\nFluent.prototype.addClass = function (this: FluentThis, value: string | boolean | (string | boolean)[]) {\n Fluent.addClass(this.el, value);\n return this;\n}\n\nFluent.prototype.after = function (this: FluentThis, content: string | HTMLElement | Fluent) {\n if (this.el) {\n const node = extractNode(content);\n if (node instanceof Element)\n this.el.insertAdjacentElement(\"afterend\", node);\n else if (node instanceof DocumentFragment) {\n Fluent(node).insertAfter(this.el);\n }\n else if (node != null) {\n this.el.insertAdjacentText(\"afterend\", \"\" + node);\n }\n }\n return this;\n}\n\nFluent.prototype.append = function (this: FluentThis, child: string | Node | Fluent) {\n this.el && this.el.append(extractNode(child));\n return this;\n}\n\nFluent.prototype.appendTo = function (this: FluentThis, parent: Element | Fluent) {\n if (this.el) {\n parent = extractElement(parent);\n if (!parent)\n this.el.remove();\n else\n parent.appendChild(this.el);\n }\n return this;\n}\n\nFluent.prototype.attr = function (this: FluentThis, name: string, value?: string | boolean | number | null | undefined) {\n if (value === void 0 && arguments.length < 2)\n return this.el?.getAttribute(name);\n\n if (this.el) {\n if (value == null || value === false)\n this.el.removeAttribute(name);\n else if (typeof value === \"string\")\n this.el.setAttribute(name, value);\n else if (typeof value === \"number\")\n this.el.setAttribute(name, \"\" + value);\n else\n this.el.setAttribute(name, \"true\");\n }\n\n return this;\n}\n\nFluent.prototype.before = function (this: FluentThis, content: string | HTMLElement | Fluent) {\n if (this.el) {\n const node = extractNode(content);\n if (node instanceof Element)\n this.el.insertAdjacentElement(\"beforebegin\", node);\n else if (node instanceof DocumentFragment) {\n Fluent(node).insertBefore(this.el);\n }\n else if (node != null) {\n this.el.insertAdjacentText(\"beforebegin\", \"\" + node);\n }\n }\n return this;\n}\n\nFluent.prototype.children = function (this: FluentThis, selector?: string): Element[] {\n if (selector == null)\n return Array.from(this.el?.children || []);\n return Array.from(this.el?.children || []).filter(x => x.matches(selector));\n}\n\nFluent.prototype.class = function (this: FluentThis, value: string | boolean | (string | boolean)[]): Fluent {\n this.el && (this.el.className = Fluent.toClassName(value));\n return this;\n}\n\nFluent.prototype.click = function (this: FluentThis, listener?: (e: MouseEvent) => void) {\n if (listener === void 0 && !arguments.length) {\n this.el && typeof this.el.click === \"function\" && this.el.click();\n return this;\n }\n else {\n return this.on(\"click\", listener);\n }\n}\n\nFluent.prototype.closest = function (this: FluentThis, selector: string): Fluent {\n return new (Fluent as any)(this.el?.closest(selector));\n}\n\nFluent.prototype.each = function (this: FluentThis, callback: (el: HTMLElement) => void) {\n this.el && callback(this.el);\n return this;\n}\n\nFluent.prototype.empty = function (this: FluentThis) {\n Fluent.empty(this.el);\n return this;\n}\n\nFluent.prototype.focus = function (this: FluentThis) {\n this.el && typeof this.el.focus === \"function\" && this.el.focus();\n return this;\n}\n\nFluent.prototype.getNode = function (this: FluentThis) {\n return this.el;\n}\n\nFluent.prototype.hasClass = function (this: FluentThis, klass: string) {\n return !!this.el?.classList.contains(klass);\n}\n\nFluent.prototype.insertAfter = function (this: FluentThis, referenceNode: HTMLElement | Fluent) {\n if (!this.el)\n return this;\n referenceNode = extractElement(referenceNode);\n let parent = referenceNode?.parentNode;\n if (!parent)\n this.el.remove();\n else\n parent.insertBefore(this.el, referenceNode.nextSibling);\n return this;\n}\n\nFluent.prototype.isVisibleLike = function (this: FluentThis) {\n return Fluent.isVisibleLike(this.el);\n}\n\nFluent.prototype.insertBefore = function (this: FluentThis, referenceNode: HTMLElement | Fluent) {\n if (!this.el)\n return this;\n referenceNode = extractElement(referenceNode);\n let parent = referenceNode?.parentElement;\n if (!parent)\n this.el.remove();\n else\n parent.insertBefore(this.el, referenceNode);\n return this;\n}\n\nFluent.prototype.prependTo = function (this: FluentThis, parent: HTMLElement | Fluent) {\n if (this.el) {\n parent = extractElement(parent);\n if (!parent)\n this.el.remove();\n else\n parent.prepend(this.el);\n }\n return this;\n}\n\nFluent.prototype.removeAttr = function (this: FluentThis, name: string) {\n this.el?.removeAttribute(name);\n return this;\n}\n\nFluent.prototype.data = function (this: FluentThis, name: string, value?: string) {\n if (value === void 0 && arguments.length < 2)\n return this.attr(\"data-\" + name);\n return this.attr(\"data-\" + name, value);\n}\n\nFluent.prototype.off = function (this: FluentThis, type: string, handler: any, delegationHandler?: Function) {\n this.el && removeListener(this.el, type, handler, delegationHandler);\n return this;\n}\n\nFluent.prototype.on = function (this: FluentThis, type: string, handler: any, delegationHandler?: Function) {\n this.el && addListener(this.el, type, handler, delegationHandler, false);\n return this;\n}\n\nFluent.prototype.one = function (this: FluentThis, type: string, handler: any, delegationHandler?: Function) {\n this.el && addListener(this.el, type, handler, delegationHandler, true);\n return this;\n}\n\nFluent.prototype.removeClass = function (this: FluentThis, value: string | boolean | (string | boolean)[]) {\n Fluent.removeClass(this.el, value);\n return this;\n}\n\nFluent.prototype.findFirst = function (this: FluentThis, selector: string): Fluent {\n return new (Fluent as any)(this.el?.querySelector(selector));\n}\n\nFluent.prototype.findAll = function (this: FluentThis, selector: string): HTMLElement[] {\n if (!this.el)\n return [];\n return Array.from(this.el.querySelectorAll(selector));\n}\n\nFluent.prototype.findEach = function (this: FluentThis, selector: string, callback: (el: Fluent, idx: number) => void): Fluent {\n if (!this.el || !callback)\n return this;\n this.el.querySelectorAll(selector).forEach((x, i) => callback(Fluent(x), i));\n return this;\n}\n\nFluent.prototype.hide = function (this: FluentThis) {\n this.el && (this.el.style.display = \"none\");\n return this;\n}\n\nFluent.prototype.matches = function (this: FluentThis, selector?: string): boolean {\n return !!this.el && typeof this.el.matches === \"function\" && this.el.matches(selector);\n}\n\nFluent.prototype.nextSibling = function (this: FluentThis, selector?: string): Fluent {\n var sibling = this.el?.nextElementSibling;\n while (sibling && selector != null && !sibling.matches(selector))\n sibling = sibling.nextElementSibling;\n return new (Fluent as any)(sibling);\n}\n\nFluent.prototype.parent = function (this: FluentThis): Fluent {\n return new (Fluent as any)(this.el?.parentNode);\n}\n\nFluent.prototype.prepend = function (this: FluentThis, child: string | Node | Fluent) {\n this.el && this.el.prepend(extractNode(child));\n return this;\n}\n\nFluent.prototype.prevSibling = function (this: FluentThis, selector?: string): Fluent {\n var sibling = this.el?.previousElementSibling;\n while (sibling && selector != null && !sibling.matches(selector))\n sibling = sibling.previousElementSibling;\n return new (Fluent as any)(sibling);\n}\n\nFluent.prototype.remove = function (this: FluentThis) {\n Fluent.remove(this.el);\n return this;\n}\n\nFluent.prototype.show = function (this: FluentThis) {\n this.el && (this.el.style.display = \"\");\n return this;\n}\n\nFluent.prototype.style = function (this: FluentThis, callback: (css: CSSStyleDeclaration) => void) {\n if (this.el && this.el.style instanceof CSSStyleDeclaration)\n callback(this.el.style);\n return this;\n}\n\nFluent.prototype.trigger = function (this: FluentThis, type: string, args?: any) {\n this.el && triggerEvent(this.el, type, args);\n return this;\n}\n\nFluent.prototype.val = function (this: FluentThis, value?: string) {\n if (value === void 0 && !arguments.length) {\n if (!this.el)\n return void 0;\n return Fluent.isInputLike(this.el) ? this.el.value : \"\";\n }\n if (this.el && Fluent.isInputLike(this.el))\n this.el.value = value ?? \"\";\n return this as any;\n}\n\nFluent.prototype.text = function (this: FluentThis, value?: string) {\n if (value === void 0 && !arguments.length)\n return this.el?.textContent;\n\n if (!this.el)\n return this;\n\n if (typeof this.el.hasChildNodes === \"function\" && this.el.hasChildNodes()) {\n let $ = getjQuery();\n if ($)\n $(this.el).text(value ?? \"\");\n else {\n disposeDescendants(this.el);\n this.el.textContent = value ?? \"\";\n }\n }\n else\n this.el.textContent = value ?? \"\";\n\n return this;\n}\n\nFluent.prototype.toggle = function (this: FluentThis, flag?: boolean) {\n Fluent.toggle(this.el, flag);\n return this;\n}\n\nFluent.prototype.toggleClass = function (this: FluentThis, value: string | boolean | (string | boolean)[], add?: boolean) {\n Fluent.toggleClass(this.el, value, add);\n return this;\n}\n\nObject.defineProperty(Fluent.prototype, \"length\", { get: function () { return this.el ? 1 : 0 } });\nObject.defineProperty(Fluent.prototype, 0, { get: function () { return this.el; } });\nObject.defineProperty(Fluent.prototype, Symbol.iterator, { get: function () { return (this.el ? [this.el] : [])[Symbol.iterator]; } });\n\n\nFluent.ready = function (callback: () => void) {\n if (!callback)\n return;\n\n let $ = getjQuery();\n if ($) {\n $(callback);\n return;\n }\n\n if (typeof document !== \"undefined\" && document.readyState === 'loading') {\n const loaded = () => {\n document.removeEventListener('DOMContentLoaded', loaded);\n callback();\n }\n document.addEventListener('DOMContentLoaded', loaded);\n return;\n }\n\n setTimeout(callback, 0);\n}\n\n/**\n * Finds the first element having the specified ID within the document.\n * @param id The ID\n * @returns A Fluent instance representing the first matching element, or null if no match is found.\n */\nFluent.byId = function (id: string): Fluent {\n return Fluent(document.getElementById(id) as TElement);\n}\n\n/**\n * Finds all elements matching the specified selector within the document.\n * \n * @param selector The CSS selector to search for.\n * @returns An array of HTML elements matching the selector.\n */\nFluent.findAll = function (selector: string): TElement[] {\n return Array.from(document.querySelectorAll(selector));\n}\n\n/**\n * Iterates over all elements matching the specified selector within the document.\n * \n * @param selector The CSS selector to search for.\n * @param callback A function to execute for each matching element. Receives a Fluent object.\n */\nFluent.findEach = function (selector: string, callback: (el: Fluent) => void): void {\n if (!callback)\n return;\n document.querySelectorAll(selector).forEach(x => callback(Fluent(x)));\n}\n\n/**\n * Finds the first element matching the specified selector within the document.\n * @param selector The CSS selector to search for.\n * @returns A Fluent instance representing the first matching element, or null if no match is found.\n */\nFluent.findFirst = function (selector: string): Fluent {\n return Fluent(document.querySelector(selector));\n}", "\uFEFF/**\n * Represents the utility color options for icons corresponding to Bootstrap contextual colors like primary, secondary, success etc.\n */\nexport type UtilityColor = \"primary\" | \"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\" | \"light\" | \"dark\" | \"muted\" | \"white\";\n\n\n/**\n * Represents the type of text color.\n * It can be one of the predefined UtilityColor values or one of the following CSS color names:\n * \"aqua\", \"blue\", \"fuschia\", \"gray\", \"green\", \"light-blue\", \"lime\", \"maroon\", \"navy\", \"olive\", \"orange\", \"purple\", \"red\", \"teal\", \"yellow\".\n */\nexport type TextColor = UtilityColor | \"aqua\" | \"blue\" | \"fuschia\" | \"gray\" | \"green\" | \"light-blue\" | \"lime\" | \"maroon\" | \"navy\" | \"olive\" | \"orange\" | \"purple\" | \"red\" | \"teal\" | \"yellow\";\n\n\n/**\n * Returns the CSS class name for the background color based on the provided UtilityColor.\n * @param color - The UtilityColor to generate the CSS class name for.\n * @returns The CSS class name for the background color.\n */\nexport function bgColor(color: UtilityColor) {\n return \"bg-\" + color;\n}\n\n/**\n * Returns the CSS class for the specified text color.\n * @param color - The text color.\n * @returns The CSS class for the specified text color.\n */\nexport function textColor(color: TextColor): string {\n return \"text-\" + color;\n}\n\n/**\n * Returns the CSS class for a Font Awesome icon.\n * @param key - The key of the Font Awesome icon.\n * @param color - The optional color of the icon.\n * @returns The CSS class for the icon.\n */\nexport function faIcon(key: faIconKey, color?: TextColor): string {\n return \"fa fa-\" + key + (color ? \" \" + textColor(color) : \"\");\n}\n\n/**\n * Generates a fully qualified class name for a Font Awesome brand icon.\n * @param key - The key of the Font Awesome brand icon.\n * @param color - The optional color of the icon.\n * @returns The fully qualified class name for the icon.\n */\nexport function fabIcon(key: fabIconKey, color?: TextColor): string {\n return \"fab fa-\" + key + (color ? \" \" + textColor(color) : \"\");\n}\n\n/**\n * Represents a known icon class.\n * The icon class can be either a Font Awesome icon (`fa fa-${faIconKey}`)\n * or a Font Awesome Brands icon (`fab fa-${fabIconKey}`).\n */\nexport type KnownIconClass = `fa fa-${faIconKey}` | `fab fa-${fabIconKey}`;\n\n/**\n * Represents a type that can be either a known icon class or a string.\n */\nexport type AnyIconClass = KnownIconClass | (string & {});\n\n/**\n * Represents the type for an icon class name.\n * It can be either a single icon class or an array of icon classes.\n */\nexport type IconClassName = AnyIconClass | (AnyIconClass[]);\n\n/**\n * Returns the CSS class name for the given icon.\n * @param icon The icon class name or an array of class names.\n * @returns The CSS class name for the icon.\n */\nexport function iconClassName(icon: IconClassName): string {\n let klass = Array.isArray(icon) ? icon.join(\" \") : icon;\n if (!klass)\n return klass;\n if (klass.startsWith('fa-') && klass.indexOf(\"fa \") < 0 && !klass.endsWith(\" fa\"))\n return 'fa ' + klass;\n return klass;\n}\n\n/*\nGenerated from https://icons8.com/line-awesome via following code\nvar c = Array.from(document.querySelectorAll('.icons__item')).map(x => x.querySelector('.icons__before i:not(.icons__arrow)').className).filter((x, i, a) => a && (a.indexOf(x) === i));\n[false, true].map(b => { var l = 0; var a = c.filter(x => !!x.startsWith(\"fab \") == b).map(x => '\"' + x.replace(\"fas fa-\", \"\").replace(\"fab fa-\", \"\") + '\"').sort()\n .map((x)=>{if (l + x.length > 120) { l = 0; x = x + '\\n' } l += x.length; return x}); \n var t = (b && \"fab\") || \"fa\"; return `export type ${t}Icon =\\n${a.join('|')};` }).join('\\n\\n');\n*/\nexport type faIconKey =\n \"ad\" | \"address-book\" | \"address-card\" | \"adjust\" | \"air-freshener\" | \"align-center\" | \"align-justify\" | \"align-left\" | \"align-right\" | \"allergies\" | \"ambulance\"\n | \"american-sign-language-interpreting\" | \"anchor\" | \"angle-double-down\" | \"angle-double-left\" | \"angle-double-right\" | \"angle-double-up\"\n | \"angle-down\" | \"angle-left\" | \"angle-right\" | \"angle-up\" | \"angry\" | \"ankh\" | \"apple-alt\" | \"archive\" | \"archway\" | \"arrow-alt-circle-down\"\n | \"arrow-alt-circle-left\" | \"arrow-alt-circle-right\" | \"arrow-alt-circle-up\" | \"arrow-circle-down\" | \"arrow-circle-left\"\n | \"arrow-circle-right\" | \"arrow-circle-up\" | \"arrow-down\" | \"arrow-left\" | \"arrow-right\" | \"arrow-up\" | \"arrows-alt\" | \"arrows-alt-h\"\n | \"arrows-alt-v\" | \"assistive-listening-systems\" | \"asterisk\" | \"at\" | \"atlas\" | \"atom\" | \"audio-description\" | \"award\" | \"baby\" | \"baby-carriage\"\n | \"backspace\" | \"backward\" | \"bacon\" | \"balance-scale\" | \"balance-scale-left\" | \"balance-scale-right\" | \"ban\" | \"band-aid\" | \"barcode\"\n | \"bars\" | \"baseball-ball\" | \"basketball-ball\" | \"bath\" | \"battery-empty\" | \"battery-full\" | \"battery-half\" | \"battery-quarter\" | \"battery-three-quarters\"\n | \"bed\" | \"beer\" | \"bell\" | \"bell-o\" | \"bell-slash\" | \"bezier-curve\" | \"bible\" | \"bicycle\" | \"biking\" | \"binoculars\" | \"biohazard\" | \"birthday-cake\"\n | \"blender\" | \"blender-phone\" | \"blind\" | \"blog\" | \"bold\" | \"bolt\" | \"bomb\" | \"bone\" | \"bong\" | \"book\" | \"book-dead\" | \"book-medical\" | \"book-open\"\n | \"book-reader\" | \"bookmark\" | \"border-all\" | \"border-none\" | \"border-style\" | \"bowling-ball\" | \"box\" | \"box-open\" | \"boxes\" | \"braille\" | \"brain\"\n | \"bread-slice\" | \"briefcase\" | \"briefcase-medical\" | \"broadcast-tower\" | \"broom\" | \"brush\" | \"bug\" | \"building\" | \"bullhorn\" | \"bullseye\" | \"burn\"\n | \"bus\" | \"bus-alt\" | \"business-time\" | \"calculator\" | \"calendar\" | \"calendar-alt\" | \"calendar-check\" | \"calendar-day\" | \"calendar-minus\" | \"calendar-plus\"\n | \"calendar-times\" | \"calendar-week\" | \"camera\" | \"camera-retro\" | \"campground\" | \"candy-cane\" | \"cannabis\" | \"capsules\" | \"car\" | \"car-alt\"\n | \"car-battery\" | \"car-crash\" | \"car-side\" | \"caret-down\" | \"caret-left\" | \"caret-right\" | \"caret-square-down\" | \"caret-square-left\" | \"caret-square-right\"\n | \"caret-square-up\" | \"caret-up\" | \"carrot\" | \"cart-arrow-down\" | \"cart-plus\" | \"cash-register\" | \"cat\" | \"certificate\" | \"chair\"\n | \"chalkboard\" | \"chalkboard-teacher\" | \"charging-station\" | \"chart-area\" | \"chart-bar\" | \"chart-line\" | \"chart-pie\" | \"check\" | \"check-circle\"\n | \"check-double\" | \"check-square\" | \"cheese\" | \"chess\" | \"chess-bishop\" | \"chess-board\" | \"chess-king\" | \"chess-knight\" | \"chess-pawn\"\n | \"chess-queen\" | \"chess-rook\" | \"chevron-circle-down\" | \"chevron-circle-left\" | \"chevron-circle-right\" | \"chevron-circle-up\"\n | \"chevron-down\" | \"chevron-left\" | \"chevron-right\" | \"chevron-up\" | \"child\" | \"church\" | \"circle\" | \"circle-notch\" | \"city\" | \"clinic-medical\"\n | \"clipboard\" | \"clipboard-check\" | \"clipboard-list\" | \"clock\" | \"clock-o\" | \"clone\" | \"closed-captioning\" | \"cloud\" | \"cloud-download-alt\"\n | \"cloud-meatball\" | \"cloud-moon\" | \"cloud-moon-rain\" | \"cloud-rain\" | \"cloud-showers-heavy\" | \"cloud-sun\" | \"cloud-sun-rain\"\n | \"cloud-upload-alt\" | \"cocktail\" | \"code\" | \"code-branch\" | \"coffee\" | \"cog\" | \"cogs\" | \"coins\" | \"columns\" | \"comment\" | \"comment-alt\"\n | \"comment-dollar\" | \"comment-dots\" | \"comment-medical\" | \"comment-slash\" | \"comments\" | \"comments-dollar\" | \"compact-disc\" | \"compass\"\n | \"compress\" | \"compress-arrows-alt\" | \"concierge-bell\" | \"cookie\" | \"cookie-bite\" | \"copy\" | \"copyright\" | \"couch\" | \"credit-card\" | \"crop\"\n | \"crop-alt\" | \"cross\" | \"crosshairs\" | \"crow\" | \"crown\" | \"crutch\" | \"cube\" | \"cubes\" | \"cut\" | \"database\" | \"deaf\" | \"democrat\" | \"desktop\" | \"dharmachakra\"\n | \"diagnoses\" | \"dice\" | \"dice-d20\" | \"dice-d6\" | \"dice-five\" | \"dice-four\" | \"dice-one\" | \"dice-six\" | \"dice-three\" | \"dice-two\" | \"digital-tachograph\"\n | \"directions\" | \"divide\" | \"dizzy\" | \"dna\" | \"dog\" | \"dollar-sign\" | \"dolly\" | \"dolly-flatbed\" | \"donate\" | \"door-closed\" | \"door-open\"\n | \"dot-circle\" | \"dove\" | \"download\" | \"drafting-compass\" | \"dragon\" | \"draw-polygon\" | \"drum\" | \"drum-steelpan\" | \"drumstick-bite\" | \"dumbbell\"\n | \"dumpster\" | \"dumpster-fire\" | \"dungeon\" | \"edit\" | \"egg\" | \"eject\" | \"ellipsis-h\" | \"ellipsis-v\" | \"envelope\" | \"envelope-o\" | \"envelope-open\" | \"envelope-open-text\"\n | \"envelope-square\" | \"equals\" | \"eraser\" | \"ethernet\" | \"euro-sign\" | \"exchange-alt\" | \"exclamation\" | \"exclamation-circle\"\n | \"exclamation-triangle\" | \"expand\" | \"expand-arrows-alt\" | \"external-link-alt\" | \"external-link-square-alt\" | \"eye\" | \"eye-dropper\"\n | \"eye-slash\" | \"fan\" | \"fast-backward\" | \"fast-forward\" | \"fax\" | \"feather\" | \"feather-alt\" | \"female\" | \"fighter-jet\" | \"file\" | \"file-alt\" | \"file-archive\"\n | \"file-audio\" | \"file-code\" | \"file-contract\" | \"file-csv\" | \"file-download\" | \"file-excel\" | \"file-excel-o\" | \"file-export\" | \"file-image\" | \"file-import\" \n | \"file-invoice\" | \"file-invoice-dollar\" | \"file-medical\" | \"file-medical-alt\" | \"file-pdf\" | \"file-pdf-o\" | \"file-powerpoint\" | \"file-prescription\"\n | \"file-signature\" | \"file-upload\" | \"file-text\" | \"file-text-o\" | \"file-video\" | \"file-word\" | \"fill\" | \"fill-drip\" | \"film\" | \"filter\" | \"fingerprint\" | \"fire\" \n | \"floppy-o\" | \"fire-alt\" | \"fire-extinguisher\" | \"first-aid\" | \"fish\" | \"fist-raised\" | \"flag\" | \"flag-checkered\" | \"flag-usa\" | \"flask\" | \"flushed\" | \"folder\"\n | \"folder-minus\" | \"folder-open\" | \"folder-open-o\" | \"folder-plus\" | \"font\" | \"football-ball\" | \"forward\" | \"frog\" | \"frown\" | \"frown-open\" | \"funnel-dollar\" | \"futbol\"\n | \"gamepad\" | \"gas-pump\" | \"gavel\" | \"gem\" | \"genderless\" | \"ghost\" | \"gift\" | \"gifts\" | \"glass-cheers\" | \"glass-martini\" | \"glass-martini-alt\" | \"glass-whiskey\"\n | \"glasses\" | \"globe\" | \"globe-africa\" | \"globe-americas\" | \"globe-asia\" | \"globe-europe\" | \"golf-ball\" | \"gopuram\" | \"graduation-cap\"\n | \"greater-than\" | \"greater-than-equal\" | \"grimace\" | \"grin\" | \"grin-alt\" | \"grin-beam\" | \"grin-beam-sweat\" | \"grin-hearts\" | \"grin-squint\"\n | \"grin-squint-tears\" | \"grin-stars\" | \"grin-tears\" | \"grin-tongue\" | \"grin-tongue-squint\" | \"grin-tongue-wink\" | \"grin-wink\" | \"grip-horizontal\"\n | \"grip-lines\" | \"grip-lines-vertical\" | \"grip-vertical\" | \"guitar\" | \"h-square\" | \"hamburger\" | \"hammer\" | \"hamsa\" | \"hand-holding\"\n | \"hand-holding-heart\" | \"hand-holding-usd\" | \"hand-lizard\" | \"hand-middle-finger\" | \"hand-paper\" | \"hand-peace\" | \"hand-point-down\"\n | \"hand-point-left\" | \"hand-point-right\" | \"hand-point-up\" | \"hand-pointer\" | \"hand-rock\" | \"hand-scissors\" | \"hand-spock\" | \"hands\"\n | \"hands-helping\" | \"handshake\" | \"hanukiah\" | \"hard-hat\" | \"hashtag\" | \"hat-cowboy\" | \"hat-cowboy-side\" | \"hat-wizard\" | \"haykal\" | \"hdd\" | \"heading\"\n | \"headphones\" | \"headphones-alt\" | \"headset\" | \"heart\" | \"heart-broken\" | \"heartbeat\" | \"helicopter\" | \"highlighter\" | \"hiking\" | \"hippo\" | \"history\"\n | \"hockey-puck\" | \"holly-berry\" | \"home\" | \"horse\" | \"horse-head\" | \"hospital\" | \"hospital-alt\" | \"hospital-symbol\" | \"hot-tub\" | \"hotdog\" | \"hotel\"\n | \"hourglass\" | \"hourglass-end\" | \"hourglass-half\" | \"hourglass-start\" | \"house-damage\" | \"hryvnia\" | \"i-cursor\" | \"ice-cream\" | \"icicles\" | \"icons\"\n | \"id-badge\" | \"id-card\" | \"id-card-alt\" | \"igloo\" | \"image\" | \"images\" | \"inbox\" | \"indent\" | \"industry\" | \"infinity\" | \"info\" | \"info-circle\" | \"italic\"\n | \"jedi\" | \"joint\" | \"journal-whills\" | \"kaaba\" | \"key\" | \"keyboard\" | \"khanda\" | \"kiss\" | \"kiss-beam\" | \"kiss-wink-heart\" | \"kiwi-bird\" | \"landmark\"\n | \"language\" | \"laptop\" | \"laptop-code\" | \"laptop-medical\" | \"laugh\" | \"laugh-beam\" | \"laugh-squint\" | \"laugh-wink\" | \"layer-group\" | \"leaf\"\n | \"lemon\" | \"less-than\" | \"less-than-equal\" | \"level-down-alt\" | \"level-up-alt\" | \"life-ring\" | \"lightbulb\" | \"link\" | \"lira-sign\" | \"list\" | \"list-alt\"\n | \"list-ol\" | \"list-ul\" | \"location-arrow\" | \"lock\" | \"lock-open\" | \"long-arrow-alt-down\" | \"long-arrow-alt-left\" | \"long-arrow-alt-right\" | \"long-arrow-alt-up\"\n | \"low-vision\" | \"luggage-cart\" | \"magic\" | \"magnet\" | \"mail-bulk\" | \"mail-forward\" | \"mail-reply\" | \"male\" | \"map\" | \"map-marked\" | \"map-marked-alt\"\n | \"map-marker\" | \"map-marker-alt\" | \"map-pin\" | \"map-signs\" | \"marker\" | \"mars\" | \"mars-double\" | \"mars-stroke\" | \"mars-stroke-h\" | \"mars-stroke-v\"\n | \"mask\" | \"medal\" | \"medkit\" | \"meh\" | \"meh-blank\" | \"meh-rolling-eyes\" | \"memory\" | \"menorah\" | \"mercury\" | \"meteor\" | \"microchip\" | \"microphone\"\n | \"microphone-alt\" | \"microphone-alt-slash\" | \"microphone-slash\" | \"microscope\" | \"minus\" | \"minus-circle\" | \"minus-square\" | \"mitten\"\n | \"mobile\" | \"mobile-alt\" | \"money-bill\" | \"money-bill-alt\" | \"money-bill-wave\" | \"money-bill-wave-alt\" | \"money-check\" | \"money-check-alt\"\n | \"monument\" | \"moon\" | \"mortar-pestle\" | \"mosque\" | \"motorcycle\" | \"mountain\" | \"mouse\" | \"mouse-pointer\" | \"mug-hot\" | \"music\" | \"network-wired\"\n | \"neuter\" | \"newspaper\" | \"not-equal\" | \"notes-medical\" | \"object-group\" | \"object-ungroup\" | \"oil-can\" | \"om\" | \"otter\" | \"outdent\" | \"pager\"\n | \"paint-brush\" | \"paint-roller\" | \"palette\" | \"pallet\" | \"paper-plane\" | \"paperclip\" | \"parachute-box\" | \"paragraph\" | \"parking\" | \"passport\"\n | \"pastafarianism\" | \"paste\" | \"pause\" | \"pause-circle\" | \"paw\" | \"peace\" | \"pen\" | \"pen-alt\" | \"pen-fancy\" | \"pen-nib\" | \"pen-square\" | \"pencil-alt\"\n | \"pencil-ruler\" | \"pencil-square-o\" | \"people-carry\" | \"pepper-hot\" | \"percent\" | \"percentage\" | \"person-booth\" | \"phone\" | \"phone-alt\" | \"phone-slash\" | \"phone-square\"\n | \"phone-square-alt\" | \"phone-volume\" | \"photo-video\" | \"piggy-bank\" | \"pills\" | \"pizza-slice\" | \"place-of-worship\" | \"plane\" | \"plane-arrival\"\n | \"plane-departure\" | \"play\" | \"play-circle\" | \"plug\" | \"plus\" | \"plus-circle\" | \"plus-square\" | \"podcast\" | \"poll\" | \"poll-h\" | \"poo\" | \"poo-storm\"\n | \"poop\" | \"portrait\" | \"pound-sign\" | \"power-off\" | \"pray\" | \"praying-hands\" | \"prescription\" | \"prescription-bottle\" | \"prescription-bottle-alt\"\n | \"print\" | \"procedures\" | \"project-diagram\" | \"puzzle-piece\" | \"qrcode\" | \"question\" | \"question-circle\" | \"quidditch\" | \"quote-left\"\n | \"quote-right\" | \"quran\" | \"radiation\" | \"radiation-alt\" | \"rainbow\" | \"random\" | \"receipt\" | \"record-vinyl\" | \"recycle\" | \"redo\" | \"refresh\"\n | \"redo-alt\" | \"registered\" | \"remove-format\" | \"reply\" | \"reply-all\" | \"republican\" | \"restroom\" | \"retweet\" | \"ribbon\" | \"ring\" | \"road\" | \"robot\" | \"rocket\"\n | \"route\" | \"rss\" | \"rss-square\" | \"ruble-sign\" | \"ruler\" | \"ruler-combined\" | \"ruler-horizontal\" | \"ruler-vertical\" | \"running\" | \"rupee-sign\"\n | \"sad-cry\" | \"sad-tear\" | \"satellite\" | \"satellite-dish\" | \"save\" | \"school\" | \"screwdriver\" | \"scroll\" | \"sd-card\" | \"search\" | \"search-dollar\"\n | \"search-location\" | \"search-minus\" | \"search-plus\" | \"seedling\" | \"server\" | \"shapes\" | \"share\" | \"share-alt\" | \"share-alt-square\"\n | \"share-square\" | \"shekel-sign\" | \"shield-alt\" | \"ship\" | \"shipping-fast\" | \"shoe-prints\" | \"shopping-bag\" | \"shopping-basket\"\n | \"shopping-cart\" | \"shower\" | \"shuttle-van\" | \"sign\" | \"sign-in-alt\" | \"sign-language\" | \"sign-out\" | \"sign-out-alt\" | \"signal\" | \"signature\"\n | \"sim-card\" | \"sitemap\" | \"skating\" | \"skiing\" | \"skiing-nordic\" | \"skull\" | \"skull-crossbones\" | \"slash\" | \"sleigh\" | \"sliders-h\" | \"smile\"\n | \"smile-beam\" | \"smile-wink\" | \"smog\" | \"smoking\" | \"smoking-ban\" | \"sms\" | \"snowboarding\" | \"snowflake\" | \"snowman\" | \"snowplow\" | \"socks\" | \"solar-panel\"\n | \"sort\" | \"sort-alpha-down\" | \"sort-alpha-down-alt\" | \"sort-alpha-up\" | \"sort-alpha-up-alt\" | \"sort-amount-down\" | \"sort-amount-down-alt\"\n | \"sort-amount-up\" | \"sort-amount-up-alt\" | \"sort-down\" | \"sort-numeric-down\" | \"sort-numeric-down-alt\" | \"sort-numeric-up\"\n | \"sort-numeric-up-alt\" | \"sort-up\" | \"spa\" | \"space-shuttle\" | \"spell-check\" | \"spider\" | \"spinner\" | \"splotch\" | \"spray-can\" | \"square\"\n | \"square-full\" | \"square-root-alt\" | \"stamp\" | \"star\" | \"star-and-crescent\" | \"star-half\" | \"star-half-alt\" | \"star-o\" | \"star-of-david\" | \"star-of-life\"\n | \"step-backward\" | \"step-forward\" | \"stethoscope\" | \"sticky-note\" | \"stop\" | \"stop-circle\" | \"stopwatch\" | \"store\" | \"store-alt\" | \"stream\"\n | \"street-view\" | \"strikethrough\" | \"stroopwafel\" | \"subscript\" | \"subway\" | \"suitcase\" | \"suitcase-rolling\" | \"sun\" | \"superscript\" | \"surprise\"\n | \"swatchbook\" | \"swimmer\" | \"swimming-pool\" | \"synagogue\" | \"sync\" | \"sync-alt\" | \"syringe\" | \"table\" | \"table-tennis\" | \"tablet\" | \"tablet-alt\"\n | \"tablets\" | \"tachometer-alt\" | \"tag\" | \"tags\" | \"tape\" | \"tasks\" | \"taxi\" | \"teeth\" | \"teeth-open\" | \"temperature-high\" | \"temperature-low\"\n | \"tenge\" | \"terminal\" | \"text-height\" | \"text-width\" | \"th\" | \"th-large\" | \"th-list\" | \"theater-masks\" | \"thermometer\" | \"thermometer-empty\"\n | \"thermometer-full\" | \"thermometer-half\" | \"thermometer-quarter\" | \"thermometer-three-quarters\" | \"thumbs-down\" | \"thumbs-up\"\n | \"thumbtack\" | \"ticket-alt\" | \"times\" | \"times-circle\" | \"tint\" | \"tint-slash\" | \"tired\" | \"toggle-off\" | \"toggle-on\" | \"toilet\" | \"toilet-paper\"\n | \"toolbox\" | \"tools\" | \"tooth\" | \"torah\" | \"torii-gate\" | \"tractor\" | \"trademark\" | \"traffic-light\" | \"train\" | \"tram\" | \"transgender\" | \"transgender-alt\"\n | \"trash\" | \"trash-alt\" | \"trash-o\" | \"trash-restore\" | \"trash-restore-alt\" | \"tree\" | \"trophy\" | \"truck\" | \"truck-loading\" | \"truck-monster\"\n | \"truck-moving\" | \"truck-pickup\" | \"tshirt\" | \"tty\" | \"tv\" | \"umbrella\" | \"umbrella-beach\" | \"underline\" | \"undo\" | \"undo-alt\" | \"universal-access\"\n | \"university\" | \"unlink\" | \"unlock\" | \"unlock-alt\" | \"upload\" | \"user\" | \"user-alt\" | \"user-alt-slash\" | \"user-astronaut\" | \"user-check\"\n | \"user-circle\" | \"user-clock\" | \"user-cog\" | \"user-edit\" | \"user-friends\" | \"user-graduate\" | \"user-injured\" | \"user-lock\" | \"user-md\"\n | \"user-minus\" | \"user-ninja\" | \"user-nurse\" | \"user-plus\" | \"user-secret\" | \"user-shield\" | \"user-slash\" | \"user-tag\" | \"user-tie\" | \"user-times\"\n | \"users\" | \"users-cog\" | \"utensil-spoon\" | \"utensils\" | \"vector-square\" | \"venus\" | \"venus-double\" | \"venus-mars\" | \"vial\" | \"vials\" | \"video\"\n | \"video-slash\" | \"vihara\" | \"voicemail\" | \"volleyball-ball\" | \"volume-down\" | \"volume-mute\" | \"volume-off\" | \"volume-up\" | \"vote-yea\" | \"vr-cardboard\"\n | \"walking\" | \"wallet\" | \"warehouse\" | \"water\" | \"wave-square\" | \"weight\" | \"weight-hanging\" | \"wheelchair\" | \"wifi\" | \"wind\" | \"window-close\"\n | \"window-maximize\" | \"window-minimize\" | \"window-restore\" | \"wine-bottle\" | \"wine-glass\" | \"wine-glass-alt\" | \"won-sign\" | \"wrench\"\n | \"x-ray\" | \"yen-sign\" | \"yin-yang\";\n\nexport type fabIconKey =\n \"500px\" | \"accessible-icon\" | \"accusoft\" | \"acquisitions-incorporated\" | \"adn\" | \"adobe\" | \"adversal\" | \"affiliatetheme\" | \"airbnb\" | \"algolia\" | \"alipay\"\n | \"amazon\" | \"amazon-pay\" | \"amilia\" | \"android\" | \"angellist\" | \"angrycreative\" | \"angular\" | \"app-store\" | \"app-store-ios\" | \"apper\" | \"apple\"\n | \"apple-pay\" | \"artstation\" | \"asymmetrik\" | \"atlassian\" | \"audible\" | \"autoprefixer\" | \"avianex\" | \"aviato\" | \"aws\" | \"bandcamp\" | \"battle-net\"\n | \"behance\" | \"behance-square\" | \"bimobject\" | \"bitbucket\" | \"bitcoin\" | \"bity\" | \"black-tie\" | \"blackberry\" | \"blogger\" | \"blogger-b\" | \"bluetooth\"\n | \"bluetooth-b\" | \"bootstrap\" | \"btc\" | \"buffer\" | \"buromobelexperte\" | \"buy-n-large\" | \"buysellads\" | \"canadian-maple-leaf\" | \"cc-amazon-pay\"\n | \"cc-amex\" | \"cc-apple-pay\" | \"cc-diners-club\" | \"cc-discover\" | \"cc-jcb\" | \"cc-mastercard\" | \"cc-paypal\" | \"cc-stripe\" | \"cc-visa\"\n | \"centercode\" | \"centos\" | \"chrome\" | \"chromecast\" | \"cloudscale\" | \"cloudsmith\" | \"cloudversify\" | \"codepen\" | \"codiepie\" | \"confluence\" | \"connectdevelop\"\n | \"contao\" | \"cotton-bureau\" | \"cpanel\" | \"creative-commons\" | \"creative-commons-by\" | \"creative-commons-nc\" | \"creative-commons-nc-eu\"\n | \"creative-commons-nc-jp\" | \"creative-commons-nd\" | \"creative-commons-pd\" | \"creative-commons-pd-alt\" | \"creative-commons-remix\"\n | \"creative-commons-sa\" | \"creative-commons-sampling\" | \"creative-commons-sampling-plus\" | \"creative-commons-share\"\n | \"creative-commons-zero\" | \"critical-role\" | \"css3\" | \"css3-alt\" | \"cuttlefish\" | \"d-and-d\" | \"d-and-d-beyond\" | \"dashcube\"\n | \"delicious\" | \"deploydog\" | \"deskpro\" | \"dev\" | \"deviantart\" | \"dhl\" | \"diaspora\" | \"digg\" | \"digital-ocean\" | \"discord\" | \"discourse\" | \"dochub\"\n | \"docker\" | \"draft2digital\" | \"dribbble\" | \"dribbble-square\" | \"dropbox\" | \"drupal\" | \"dyalog\" | \"earlybirds\" | \"ebay\" | \"edge\" | \"elementor\" | \"ello\"\n | \"ember\" | \"empire\" | \"envira\" | \"erlang\" | \"ethereum\" | \"etsy\" | \"evernote\" | \"expeditedssl\" | \"facebook\" | \"facebook-f\" | \"facebook-messenger\" | \"facebook-square\"\n | \"fantasy-flight-games\" | \"fedex\" | \"fedora\" | \"figma\" | \"firefox\" | \"first-order\" | \"first-order-alt\" | \"firstdraft\" | \"flickr\"\n | \"flipboard\" | \"fly\" | \"font-awesome\" | \"font-awesome-alt\" | \"font-awesome-flag\" | \"fonticons\" | \"fonticons-fi\" | \"fort-awesome\" | \"fort-awesome-alt\"\n | \"forumbee\" | \"foursquare\" | \"free-code-camp\" | \"freebsd\" | \"fulcrum\" | \"galactic-republic\" | \"galactic-senate\" | \"get-pocket\"\n | \"gg\" | \"gg-circle\" | \"git\" | \"git-alt\" | \"git-square\" | \"github\" | \"github-alt\" | \"github-square\" | \"gitkraken\" | \"gitlab\" | \"gitter\" | \"glide\"\n | \"glide-g\" | \"gofore\" | \"goodreads\" | \"goodreads-g\" | \"google\" | \"google-drive\" | \"google-play\" | \"google-plus\" | \"google-plus-g\" | \"google-plus-square\"\n | \"google-wallet\" | \"gratipay\" | \"grav\" | \"gripfire\" | \"grunt\" | \"gulp\" | \"hacker-news\" | \"hacker-news-square\" | \"hackerrank\" | \"hips\"\n | \"hire-a-helper\" | \"hooli\" | \"hornbill\" | \"hotjar\" | \"houzz\" | \"html5\" | \"hubspot\" | \"imdb\" | \"instagram\" | \"intercom\" | \"internet-explorer\" | \"invision\"\n | \"ioxhost\" | \"itch-io\" | \"itunes\" | \"itunes-note\" | \"java\" | \"jedi-order\" | \"jenkins\" | \"jira\" | \"joget\" | \"joomla\" | \"js\" | \"js-square\" | \"jsfiddle\"\n | \"kaggle\" | \"keybase\" | \"keycdn\" | \"kickstarter\" | \"kickstarter-k\" | \"korvue\" | \"laravel\" | \"lastfm\" | \"lastfm-square\" | \"leanpub\" | \"less\" | \"line\"\n | \"linkedin\" | \"linkedin-in\" | \"linode\" | \"linux\" | \"lyft\" | \"magento\" | \"mailchimp\" | \"mandalorian\" | \"markdown\" | \"mastodon\" | \"maxcdn\" | \"mdb\" | \"medapps\"\n | \"medium\" | \"medium-m\" | \"medrt\" | \"meetup\" | \"megaport\" | \"mendeley\" | \"microsoft\" | \"mix\" | \"mixcloud\" | \"mizuni\" | \"modx\" | \"monero\" | \"napster\" | \"neos\"\n | \"nimblr\" | \"node\" | \"node-js\" | \"npm\" | \"ns8\" | \"nutritionix\" | \"odnoklassniki\" | \"odnoklassniki-square\" | \"old-republic\" | \"opencart\" | \"openid\"\n | \"opera\" | \"optin-monster\" | \"orcid\" | \"osi\" | \"page4\" | \"pagelines\" | \"palfed\" | \"patreon\" | \"paypal\" | \"penny-arcade\" | \"periscope\" | \"phabricator\"\n | \"phoenix-framework\" | \"phoenix-squadron\" | \"php\" | \"pied-piper\" | \"pied-piper-alt\" | \"pied-piper-hat\" | \"pied-piper-pp\" | \"pinterest\"\n | \"pinterest-p\" | \"pinterest-square\" | \"playstation\" | \"product-hunt\" | \"pushed\" | \"python\" | \"qq\" | \"quinscape\" | \"quora\" | \"r-project\" | \"raspberry-pi\"\n | \"ravelry\" | \"react\" | \"reacteurope\" | \"readme\" | \"rebel\" | \"red-river\" | \"reddit\" | \"reddit-alien\" | \"reddit-square\" | \"redhat\" | \"renren\"\n | \"replyd\" | \"researchgate\" | \"resolving\" | \"rev\" | \"rocketchat\" | \"rockrms\" | \"safari\" | \"salesforce\" | \"sass\" | \"schlix\" | \"scribd\" | \"searchengin\"\n | \"sellcast\" | \"sellsy\" | \"servicestack\" | \"shirtsinbulk\" | \"shopware\" | \"simplybuilt\" | \"sistrix\" | \"sith\" | \"sketch\" | \"skyatlas\" | \"skype\"\n | \"slack\" | \"slack-hash\" | \"slideshare\" | \"snapchat\" | \"snapchat-ghost\" | \"snapchat-square\" | \"soundcloud\" | \"sourcetree\" | \"speakap\" | \"speaker-deck\"\n | \"spotify\" | \"squarespace\" | \"stack-exchange\" | \"stack-overflow\" | \"stackpath\" | \"staylinked\" | \"steam\" | \"steam-square\" | \"steam-symbol\"\n | \"sticker-mule\" | \"strava\" | \"stripe\" | \"stripe-s\" | \"studiovinari\" | \"stumbleupon\" | \"stumbleupon-circle\" | \"superpowers\" | \"supple\"\n | \"suse\" | \"swift\" | \"symfony\" | \"teamspeak\" | \"telegram\" | \"telegram-plane\" | \"tencent-weibo\" | \"the-red-yeti\" | \"themeco\" | \"themeisle\" | \"think-peaks\"\n | \"trade-federation\" | \"trello\" | \"tripadvisor\" | \"tumblr\" | \"tumblr-square\" | \"twitch\" | \"twitter\" | \"twitter-square\" | \"typo3\" | \"uber\"\n | \"ubuntu\" | \"uikit\" | \"umbraco\" | \"uniregistry\" | \"untappd\" | \"ups\" | \"usb\" | \"usps\" | \"ussunnah\" | \"vaadin\" | \"viacoin\" | \"viadeo\" | \"viadeo-square\" | \"viber\"\n | \"vimeo\" | \"vimeo-square\" | \"vimeo-v\" | \"vine\" | \"vk\" | \"vnv\" | \"vuejs\" | \"waze\" | \"weebly\" | \"weibo\" | \"weixin\" | \"whatsapp\" | \"whatsapp-square\" | \"whmcs\"\n | \"wikipedia-w\" | \"windows\" | \"wix\" | \"wizards-of-the-coast\" | \"wolf-pack-battalion\" | \"wordpress\" | \"wordpress-simple\" | \"wpbeginner\" | \"wpexplorer\"\n | \"wpforms\" | \"wpressr\" | \"xbox\" | \"xing\" | \"xing-square\" | \"y-combinator\" | \"yahoo\" | \"yammer\" | \"yandex\" | \"yandex-international\" | \"yarn\"\n | \"yelp\" | \"yoast\" | \"youtube\" | \"youtube-square\" | \"zhihu\";", "/* eslint-disable */\nconst keys = Object.keys;\nfunction identity(value) {\n return value;\n}\nfunction isBoolean(val) {\n return typeof val === \"boolean\";\n}\nfunction isElement(val) {\n return val && typeof val.nodeType === \"number\";\n}\nfunction isString(val) {\n return typeof val === \"string\";\n}\nfunction isNumber(val) {\n return typeof val === \"number\";\n}\nfunction isObject(val) {\n return typeof val === \"object\" ? val !== null : isFunction(val);\n}\nfunction isFunction(val) {\n return typeof val === \"function\";\n}\nfunction isComponentClass(Component) {\n return !!(Component && Component.isComponent);\n}\nfunction isArrayLike(obj) {\n return (\n isObject(obj) &&\n typeof obj.length === \"number\" &&\n typeof obj.nodeType !== \"number\"\n );\n}\nfunction forEach(value, fn) {\n if (!value) return;\n for (const key of keys(value)) {\n fn(value[key], key);\n }\n}\n\nfunction createRef() {\n return Object.seal({\n current: null,\n });\n}\nfunction isRef(maybeRef) {\n return isObject(maybeRef) && \"current\" in maybeRef;\n}\n\nconst jsxDomType = Symbol.for(\"jsx-dom:type\");\nvar JsxDomType = /*#__PURE__*/ (function (JsxDomType) {\n JsxDomType[\"ShadowRoot\"] = \"ShadowRoot\";\n return JsxDomType;\n})(JsxDomType || {});\nfunction ShadowRoot(_ref) {\n let { children, ref, ...attr } = _ref;\n return {\n [jsxDomType]: JsxDomType.ShadowRoot,\n ref,\n attr,\n children,\n };\n}\nfunction isShadowRoot(el) {\n return el != null && el[jsxDomType] === JsxDomType.ShadowRoot;\n}\n\nconst SVGNamespace = \"http://www.w3.org/2000/svg\";\n\n// https://facebook.github.io/react/docs/jsx-in-depth.html#booleans-null-and-undefined-are-ignored\n// Emulate JSX Expression logic to ignore certain type of children or className.\nfunction isVisibleChild(value) {\n return !isBoolean(value) && value != null;\n}\n\n/**\n * Convert a `value` to a className string.\n * `value` can be a string, an array or a `Dictionary`.\n */\nfunction className(value) {\n if (Array.isArray(value)) {\n return value.map(className).filter(Boolean).join(\" \");\n } else if (isObject(value)) {\n if (Symbol.iterator in value) {\n return className(Array.from(value));\n }\n return keys(value)\n .filter((k) => value[k])\n .join(\" \");\n } else if (isVisibleChild(value)) {\n return \"\" + value;\n } else {\n return \"\";\n }\n}\nfunction createFactory(tag) {\n return createElement.bind(null, tag);\n}\nfunction Fragment(attr) {\n const fragment = document.createDocumentFragment();\n appendChild(attr.children, fragment);\n return fragment;\n}\nclass Component {\n static isComponent = true;\n constructor(props) {\n this.props = props;\n }\n render() {\n return null;\n }\n}\nfunction initComponentClass(Class, attr, children) {\n attr = {\n ...attr,\n children,\n };\n const instance = new Class(attr);\n const node = instance.render();\n if (\"ref\" in attr) {\n attachRef(attr.ref, instance);\n }\n return node;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction jsx(tag, _ref) {\n let { children, ...attr } = _ref;\n let node;\n if (isString(tag)) {\n node = attr.namespaceURI\n ? document.createElementNS(attr.namespaceURI, tag)\n : document.createElement(tag);\n attributes(attr, node);\n appendChild(children, node);\n\n // Select `option` elements in `select`\n if (node instanceof window.HTMLSelectElement && attr.value != null) {\n if (attr.multiple === true && Array.isArray(attr.value)) {\n const values = attr.value.map((value) => String(value));\n node\n .querySelectorAll(\"option\")\n .forEach(\n (option) => (option.selected = values.includes(option.value)),\n );\n } else {\n node.value = attr.value;\n }\n }\n attachRef(attr.ref, node);\n } else if (isFunction(tag)) {\n // Custom elements.\n if (isObject(tag.defaultProps)) {\n attr = {\n ...tag.defaultProps,\n ...attr,\n };\n }\n node = isComponentClass(tag)\n ? initComponentClass(tag, attr, children)\n : tag({\n ...attr,\n children,\n });\n } else {\n throw new TypeError(`Invalid JSX element type: ${tag}`);\n }\n return node;\n}\nfunction createElement(tag, attr) {\n for (\n var _len = arguments.length,\n children = new Array(_len > 2 ? _len - 2 : 0),\n _key2 = 2;\n _key2 < _len;\n _key2++\n ) {\n children[_key2 - 2] = arguments[_key2];\n }\n if (isString(attr) || Array.isArray(attr)) {\n children.unshift(attr);\n attr = {};\n }\n attr = attr || {};\n if (attr.children != null && !children.length) {\n ({ children, ...attr } = attr);\n }\n return jsx(\n tag,\n {\n ...attr,\n children,\n },\n attr.key,\n );\n}\nfunction attachRef(ref, node) {\n if (isRef(ref)) {\n ref.current = node;\n } else if (isFunction(ref)) {\n ref(node);\n }\n}\nfunction appendChild(child, node) {\n if (isArrayLike(child)) {\n appendChildren(child, node);\n } else if (isString(child) || isNumber(child)) {\n appendChildToNode(document.createTextNode(child), node);\n } else if (child === null) {\n appendChildToNode(document.createComment(\"\"), node);\n } else if (isElement(child)) {\n appendChildToNode(child, node);\n } else if (isShadowRoot(child)) {\n const shadowRoot = node.attachShadow(child.attr);\n appendChild(child.children, shadowRoot);\n attachRef(child.ref, shadowRoot);\n }\n}\nfunction appendChildren(children, node) {\n for (const child of [...children]) {\n appendChild(child, node);\n }\n return node;\n}\nfunction appendChildToNode(child, node) {\n if (node instanceof window.HTMLTemplateElement) {\n node.content.appendChild(child);\n } else {\n node.appendChild(child);\n }\n}\nfunction style(node, value) {\n if (value == null || value === false);\n else if (Array.isArray(value)) {\n value.forEach((v) => style(node, v));\n } else if (isString(value)) {\n node.setAttribute(\"style\", value);\n } else if (isObject(value)) {\n forEach(value, (val, key) => {\n if (key.indexOf(\"-\") === 0) {\n // CSS custom properties (variables) start with `-` (e.g. `--my-variable`)\n // and must be assigned via `setProperty`.\n node.style.setProperty(key, val);\n } else {\n node.style[key] = val;\n }\n });\n }\n}\nfunction attribute(key, value, node) {\n switch (key) {\n case \"htmlFor\":\n attr(node, \"for\", value);\n return;\n case \"dataset\":\n forEach(value, (dataValue, dataKey) => {\n if (dataValue != null) {\n node.dataset[dataKey] = dataValue;\n }\n });\n return;\n case \"innerHTML\":\n case \"innerText\":\n case \"textContent\":\n if (isVisibleChild(value)) {\n node[key] = value;\n }\n return;\n case \"dangerouslySetInnerHTML\":\n if (isObject(value)) {\n node.innerHTML = value[\"__html\"];\n }\n return;\n case \"value\":\n if (value == null || node instanceof window.HTMLSelectElement) {\n // skip nullish values\n // for ` as HTMLInputElement; }\n declare readonly domNode: HTMLInputElement;\n\n constructor(props: EditorProps

) {\n super(props);\n\n let $ = getjQuery();\n if ($?.fn?.mask) {\n $(this.domNode).mask(this.options.mask || '', {\n placeholder: (this.options.placeholder ?? '_')\n });\n }\n else {\n notifyError('MaskedInput requires jQuery masked input plugin (\"~/Serenity.Assets/Scripts/jquery.maskedinput.js\") to be loaded in the page along with jQuery!');\n }\n }\n\n public get value(): string {\n Fluent.trigger(this.domNode, \"blur.mask\");\n return this.domNode.value;\n }\n\n protected get_value(): string {\n return this.value;\n }\n\n public set value(value: string) {\n this.domNode.value = value;\n }\n\n protected set_value(value: string): void {\n this.value = value;\n }\n}\n\nexport interface MaskedEditorOptions {\n mask?: string;\n placeholder?: string;\n}", "\uFEFFimport { Fluent, addValidationRule, localText } from \"../../base\";\nimport { IStringValue } from \"../../interfaces\";\nimport { Decorators } from \"../../types/decorators\";\nimport { EditorProps, EditorWidget } from \"./editorwidget\";\n\nexport interface RecaptchaOptions {\n siteKey?: string;\n language?: string;\n}\n\n@Decorators.registerEditor('Serenity.Recaptcha', [IStringValue])\nexport class Recaptcha

extends EditorWidget

implements IStringValue {\n constructor(props: EditorProps

) {\n super(props);\n\n this.domNode.classList.add('g-recaptcha');\n this.domNode.setAttribute('data-sitekey', this.options.siteKey);\n if (!!((window as any)['grecaptcha'] == null && !document.querySelector('script#RecaptchaInclude'))) {\n var src = 'https://www.google.com/recaptcha/api.js';\n var lng = this.options.language;\n if (lng == null) {\n lng = document.documentElement.getAttribute('lang') ?? '';\n }\n src += '?hl=' + lng;\n var script = document.createElement(\"script\");\n script.setAttribute('id', 'RecaptchaInclude');\n script.setAttribute('src', src);\n document.head.append(script);\n }\n\n var valInput = document.createElement(\"input\");\n Fluent(valInput).insertBefore(this.domNode);\n valInput.setAttribute('id', this.uniqueName + '_validate');\n valInput.value = 'x';\n\n valInput.style.visibility = 'hidden';\n valInput.style.width = '0px';\n valInput.style.height = '0px';\n valInput.style.padding = '0px';\n\n addValidationRule(valInput, e => {\n if (!this.get_value()) {\n return localText('Validation.Required');\n }\n return null;\n }, this.uniqueName);\n }\n\n get_value(): string {\n return this.domNode.querySelector('.g-recaptcha-response').value;\n }\n\n set_value(value: string): void {\n // ignore\n }\n}", "import { Fluent, ServiceResponse, Uploader, blockUI, blockUndo, getjQuery, htmlEncode, isArrayLike, localText, notifyError, resolveUrl, round, stringFormat } from \"../../base\";\nimport { replaceAll } from \"../../compat\";\n\nexport namespace UploadHelper {\n\n export function addUploadInput(options: UploadInputOptions): Fluent {\n let container = isArrayLike(options.container) ? options.container[0] : options.container;\n let progress = Fluent(isArrayLike(options.progress) ? options.progress[0] : options.progress);\n var button = container.closest(\".tool-button\") ?? container.closest(\"button\") ?? container;\n button.classList.add(\"fileinput-button\");\n\n var uploadUrl = options.uploadUrl || '~/File/TemporaryUpload';\n if (options.uploadIntent) {\n if (uploadUrl.indexOf('?') < 0)\n uploadUrl += \"?\"\n else\n uploadUrl += \"&\";\n uploadUrl += \"uploadIntent=\";\n uploadUrl += encodeURIComponent(options.uploadIntent);\n }\n\n var uploadInput = Fluent()\n .appendTo(container);\n\n const setProgress = (percent: number) => {\n let bar = progress.children()[0];\n bar && (bar.style.width = (percent ?? 0).toString() + '%');\n }\n\n var uploader = new Uploader({\n batchSize: 1,\n batchSuccess: data => {\n const response: UploadResponse = data.response ?? {};\n if (response?.Error) {\n notifyError(response.Error.Message);\n return;\n }\n options.fileDone?.(response, data.batch?.filePaths?.[0], data);\n },\n input: uploadInput.getNode() as HTMLInputElement,\n dropZone: options.zone,\n batchStart: () => {\n blockUI(null);\n progress.show();\n setProgress(0);\n },\n batchStop: () => {\n blockUndo();\n setProgress(100);\n progress.hide();\n },\n batchProgress: data => {\n if (typeof data.loaded == \"number\" && data.total > 0) {\n var percent = data.loaded / data.total * 100;\n setProgress(percent);\n }\n }\n });\n\n return uploadInput;\n }\n\n export function checkImageConstraints(file: UploadResponse,\n opt: FileUploadConstraints): boolean {\n\n if (!file.IsImage && !opt.allowNonImage) {\n notifyError(localText('Controls.ImageUpload.NotAnImageFile'));\n return false;\n }\n if (opt.minSize > 0 && file.Size < opt.minSize) {\n notifyError(stringFormat(localText('Controls.ImageUpload.UploadFileTooSmall'),\n fileSizeDisplay(opt.minSize)));\n return false;\n }\n if (opt.maxSize > 0 && file.Size > opt.maxSize) {\n notifyError(stringFormat(localText('Controls.ImageUpload.UploadFileTooBig'),\n fileSizeDisplay(opt.maxSize)));\n return false;\n }\n if (!file.IsImage) {\n return true;\n }\n if (opt.minWidth > 0 && file.Width < opt.minWidth) {\n notifyError(stringFormat(localText('Controls.ImageUpload.MinWidth'), opt.minWidth));\n return false;\n }\n if (opt.maxWidth > 0 && file.Width > opt.maxWidth) {\n notifyError(stringFormat(localText('Controls.ImageUpload.MaxWidth'), opt.maxWidth));\n return false;\n }\n if (opt.minHeight > 0 && file.Height < opt.minHeight) {\n notifyError(stringFormat(localText('Controls.ImageUpload.MinHeight'), opt.minHeight));\n return false;\n }\n if (opt.maxHeight > 0 && file.Height > opt.maxHeight) {\n notifyError(stringFormat(localText('Controls.ImageUpload.MaxHeight'), opt.maxHeight));\n return false;\n }\n return true;\n }\n\n export function fileNameSizeDisplay(name: string, bytes: number): string {\n return name + ' (' + fileSizeDisplay(bytes) + ')';\n }\n\n export function fileSizeDisplay(bytes: number): string {\n var byteSize = round(bytes * 100 / 1024) * 0.01;\n var suffix = 'KB';\n if (byteSize >= 1024) {\n byteSize = round(byteSize * 100 / 1024) * 0.01;\n suffix = 'MB';\n }\n var sizeParts = byteSize.toString().split(String.fromCharCode(46));\n var value;\n if (sizeParts.length > 1) {\n value = sizeParts[0] + '.' + sizeParts[1].substring(0, 2);\n }\n else {\n value = sizeParts[0];\n }\n return value + ' ' + suffix;\n }\n\n export function hasImageExtension(filename: string): boolean {\n if (!filename) {\n return false;\n }\n filename = filename.toLowerCase();\n return filename.endsWith('.jpg') || filename.endsWith('.jpeg') ||\n filename.endsWith('.gif') || filename.endsWith('.png') ||\n filename.endsWith('.webp');\n }\n\n export function thumbFileName(filename: string): string {\n filename = filename ?? '';\n var idx = filename.lastIndexOf('.');\n if (idx >= 0) {\n filename = filename.substring(0, idx);\n }\n return filename + '_t.jpg';\n }\n\n export function dbFileUrl(filename: string): string {\n filename = replaceAll(filename ?? '', '\\\\', '/');\n return resolveUrl('~/upload/') + filename;\n }\n\n export function colorBox(link: HTMLElement | ArrayLike, options?: any): void {\n link = isArrayLike(link) ? link[0] : link;\n if (!link)\n return;\n let $ = getjQuery();\n if (!$)\n return;\n $(link).colorbox?.({\n current: htmlEncode(localText('Controls.ImageUpload.ColorboxCurrent')),\n previous: htmlEncode(localText('Controls.ImageUpload.ColorboxPrior')),\n next: htmlEncode(localText('Controls.ImageUpload.ColorboxNext')),\n close: htmlEncode(localText('Controls.ImageUpload.ColorboxClose'))\n });\n }\n\n export function populateFileSymbols(c: HTMLElement | ArrayLike, items: UploadedFile[],\n displayOriginalName?: boolean, urlPrefix?: string): void {\n let container = isArrayLike(c) ? c[0] : c;\n if (!container)\n return;\n items = items || [];\n container.innerHTML = \"\";\n for (var index = 0; index < items.length; index++) {\n const item = items[index];\n const isImage = hasImageExtension(item.Filename);\n const originalName = item.OriginalName ?? '';\n\n let fileName = item.Filename;\n if (urlPrefix != null && fileName != null &&\n !fileName.startsWith('temporary/')) {\n fileName = urlPrefix + fileName;\n }\n\n const thumb = as HTMLAnchorElement;\n\n if (originalName) {\n thumb.title = originalName;\n }\n\n if (isImage) {\n thumb.style.backgroundImage = \"url('\" + dbFileUrl(thumbFileName(item.Filename)) + \"')\";\n colorBox(thumb, new Object());\n }\n\n container.appendChild(\n

  • \n {thumb}\n {displayOriginalName &&
    {originalName}
    }\n
  • \n );\n }\n }\n}\n\nexport interface UploadedFile {\n Filename?: string;\n OriginalName?: string;\n}\n\nexport interface UploadInputOptions {\n container?: HTMLElement | ArrayLike;\n zone?: HTMLElement | ArrayLike;\n progress?: HTMLElement | ArrayLike;\n inputName?: string;\n allowMultiple?: boolean;\n uploadIntent?: string;\n uploadUrl?: string;\n fileDone?: (p1: UploadResponse, p2: string, p3: any) => void;\n}\n\nexport interface UploadResponse extends ServiceResponse {\n TemporaryFile: string;\n Size: number;\n IsImage: boolean;\n Width: number;\n Height: number;\n}\n\nexport interface FileUploadConstraints {\n minWidth?: number;\n maxWidth?: number;\n minHeight?: number;\n maxHeight?: number;\n minSize?: number;\n maxSize?: number;\n allowNonImage?: boolean;\n originalNameProperty?: string;\n}\n", "import { Fluent, PropertyItem, getjQuery, localText } from \"../../base\";\nimport { IGetEditValue, IReadOnly, ISetEditValue, IValidateRequired } from \"../../interfaces\";\nimport { ValidationHelper, extend, isTrimmedEmpty, replaceAll } from \"../../compat\";\nimport { Decorators } from \"../../types/decorators\";\nimport { FileUploadConstraints, UploadHelper, UploadInputOptions, UploadedFile } from \"../helpers/uploadhelper\";\nimport { ToolButton, Toolbar } from \"../widgets/toolbar\";\nimport { EditorProps, EditorWidget } from \"./editorwidget\";\n\nexport interface FileUploadEditorOptions extends FileUploadConstraints {\n displayFileName?: boolean;\n uploadIntent?: string;\n uploadUrl?: string;\n urlPrefix?: string;\n}\n\nexport interface ImageUploadEditorOptions extends FileUploadEditorOptions {\n}\n\n@Decorators.registerEditor('Serenity.FileUploadEditor', [IReadOnly, IGetEditValue, ISetEditValue, IValidateRequired])\nexport class FileUploadEditor

    extends EditorWidget

    \n implements IReadOnly, IGetEditValue, ISetEditValue, IValidateRequired {\n\n constructor(props: EditorProps

    ) {\n super(props);\n\n if (!this.options || this.options.allowNonImage == null)\n this.options.allowNonImage = true;\n\n this.domNode.classList.add('s-FileUploadEditor');\n\n if (!this.options.originalNameProperty)\n this.domNode.classList.add('hide-original-name');\n\n this.toolbar = new Toolbar({\n buttons: this.getToolButtons(),\n element: el => this.domNode.appendChild(el)\n }).init();\n\n this.progress = this.toolbar.domNode.appendChild(

    as HTMLElement);\n\n var uio = this.getUploadInputOptions();\n this.uploadInput = UploadHelper.addUploadInput(uio);\n if (this.options.readOnly)\n this.set_readOnly(true);\n\n this.fileSymbols = this.domNode.appendChild(