, BundleMethods>;
@@ -1376,6 +1355,13 @@ declare const defineEntity: ;
}) => Entity;
+/**
+ * @author Labs64
+ * @license Apache-2.0
+ * @link https://netlicensing.io
+ * @copyright 2017 Labs64 NetLicensing
+ */
+
/**
* License entity used internally by NetLicensing.
*
@@ -1794,4 +1780,4 @@ declare const _default$1: () => ValidationParametersInstance;
declare const _default: () => ValidationResultsInstance;
-export { ApiKeyRole, type ApiKeyRoleKeys, type ApiKeyRoleValues, Bundle, type BundleEntity, type BundleMethods, type BundleProps, bundleService as BundleService, _default$g as Constants, _default$2 as Context, type ContextConfig, type ContextInstance, Country, type CountryEntity, type CountryMethods, type CountryProps, type Entity, type EntityMethods, type IBundleService, type ILicenseService, type ILicenseTemplateService, type ILicenseeService, type INotificationService, type IPaymentMethodService, type IProductModuleService, type IProductService, type IService, type ITokenService, type ITransactionService, type IUtilityService, type Info, type Item, type ItemPagination, type Items, License, type LicenseEntity, type LicenseMethods, type LicenseProps, licenseService as LicenseService, LicenseTemplate, type LicenseTemplateEntity, type LicenseTemplateMethods, type LicenseTemplateProps, licenseTemplateService as LicenseTemplateService, _default$4 as LicenseTransactionJoin, type LicenseTransactionJoinEntity, type LicenseTransactionJoinMethods, type LicenseTransactionJoinProps, LicenseType, type LicenseTypeKeys, type LicenseTypeValues, Licensee, type LicenseeEntity, type LicenseeMethods, type LicenseeProperties, type LicenseeProps, LicenseeSecretMode, type LicenseeSecretModeKeys, type LicenseeSecretModeValues, licenseeService as LicenseeService, LicensingModel, type LicensingModelKeys, type LicensingModelValues, type List, NlicError, type NlicResponse, NodeSecretMode, type NodeSecretModeKeys, type NodeSecretModeValues, Notification, type NotificationEntity, NotificationEvent, type NotificationEventKeys, type NotificationEventValues, type NotificationMethods, type NotificationProps, NotificationProtocol, type NotificationProtocolKeys, type NotificationProtocolValues, notificationService as NotificationService, Page, type PageInstance, type Pagination, type PaginationMethods, type Parameter, type Parameters, PaymentMethod, type PaymentMethodEntity, PaymentMethodEnum, type PaymentMethodKeys, type PaymentMethodMethods, type PaymentMethodProps, paymentMethodService as PaymentMethodService, type PaymentMethodValues, Product, ProductDiscount, type ProductDiscountEntity, type ProductDiscountMethods, type ProductDiscountProps, type ProductEntity, type ProductMethods, ProductModule, type ProductModuleEntity, type ProductModuleMethods, type ProductModuleProps, productModuleService as ProductModuleService, type ProductModuleValidation, type ProductProps, productService as ProductService, type PropGetEventListener, type PropSetEventListener, type Proto, type RequestConfig, type RequiredProps, type SavedBundleProps, type SavedLicenseProps, type SavedLicenseTemplateProps, type SavedLicenseeProps, type SavedNotificationProps, type SavedPaymentMethodProps, type SavedProductModuleProps, type SavedProductProps, type SavedTokenProps, type SavedTransactionProps, SecurityMode, type SecurityModeKeys, type SecurityModeValues, service as Service, TimeVolumePeriod, type TimeVolumePeriodKeys, type TimeVolumePeriodValues, Token, type TokenEntity, type TokenMethods, type TokenProps, tokenService as TokenService, TokenType, type TokenTypeKeys, type TokenTypeValues, Transaction, type TransactionEntity, type TransactionMethods, type TransactionProps, transactionService as TransactionService, TransactionSource, type TransactionSourceKeys, type TransactionSourceValues, TransactionStatus, type TransactionStatusKeys, type TransactionStatusValues, utilityService as UtilityService, _default$1 as ValidationParameters, type ValidationParametersInstance, _default as ValidationResults, type ValidationResultsInstance, defineEntity, ensureNotEmpty, ensureNotNull, decode as filterDecode, encode as filterEncode, isDefined, isValid, _default$f as itemToBundle, _default$e as itemToCountry, _default$d as itemToLicense, _default$b as itemToLicenseTemplate, _default$c as itemToLicensee, _default$a as itemToNotification, itemToObject, _default$9 as itemToPaymentMethod, _default$8 as itemToProduct, _default$7 as itemToProductModule, _default$6 as itemToToken, _default$5 as itemToTransaction, _default$3 as serialize };
+export { ApiKeyRole, type ApiKeyRoleKeys, type ApiKeyRoleValues, Bundle, type BundleEntity, type BundleMethods, type BundleProps, bundleService as BundleService, _default$g as Constants, _default$2 as Context, type ContextConfig, type ContextInstance, Country, type CountryEntity, type CountryMethods, type CountryProps, type DateField, type Entity, type EntityMethods, type IBundleService, type ILicenseService, type ILicenseTemplateService, type ILicenseeService, type INotificationService, type IPaymentMethodService, type IProductModuleService, type IProductService, type IService, type ITokenService, type ITransactionService, type IUtilityService, type Info, type Item, type ItemPagination, type Items, License, type LicenseEntity, type LicenseMethods, type LicenseProps, licenseService as LicenseService, LicenseTemplate, type LicenseTemplateEntity, type LicenseTemplateMethods, type LicenseTemplateProps, licenseTemplateService as LicenseTemplateService, _default$4 as LicenseTransactionJoin, type LicenseTransactionJoinEntity, type LicenseTransactionJoinMethods, type LicenseTransactionJoinProps, LicenseType, type LicenseTypeKeys, type LicenseTypeValues, Licensee, type LicenseeEntity, type LicenseeMethods, type LicenseeProperties, type LicenseeProps, LicenseeSecretMode, type LicenseeSecretModeKeys, type LicenseeSecretModeValues, licenseeService as LicenseeService, LicensingModel, type LicensingModelKeys, type LicensingModelValues, type List, NlicError, type NlicResponse, NodeSecretMode, type NodeSecretModeKeys, type NodeSecretModeValues, Notification, type NotificationEntity, NotificationEvent, type NotificationEventKeys, type NotificationEventValues, type NotificationMethods, type NotificationProps, NotificationProtocol, type NotificationProtocolKeys, type NotificationProtocolValues, notificationService as NotificationService, Page, type PageInstance, type Pagination, type PaginationMethods, type Parameter, type Parameters, PaymentMethod, type PaymentMethodEntity, PaymentMethodEnum, type PaymentMethodKeys, type PaymentMethodMethods, type PaymentMethodProps, paymentMethodService as PaymentMethodService, type PaymentMethodValues, Product, ProductDiscount, type ProductDiscountEntity, type ProductDiscountMethods, type ProductDiscountProps, type ProductEntity, type ProductMethods, ProductModule, type ProductModuleEntity, type ProductModuleMethods, type ProductModuleProps, productModuleService as ProductModuleService, type ProductModuleValidation, type ProductProps, productService as ProductService, type PropGetEventListener, type PropSetEventListener, type Proto, type RequestConfig, type RequiredProps, type SavedBundleProps, type SavedLicenseProps, type SavedLicenseTemplateProps, type SavedLicenseeProps, type SavedNotificationProps, type SavedPaymentMethodProps, type SavedProductModuleProps, type SavedProductProps, type SavedTokenProps, type SavedTransactionProps, SecurityMode, type SecurityModeKeys, type SecurityModeValues, service as Service, TimeVolumePeriod, type TimeVolumePeriodKeys, type TimeVolumePeriodValues, Token, type TokenEntity, type TokenMethods, type TokenProps, tokenService as TokenService, TokenType, type TokenTypeKeys, type TokenTypeValues, Transaction, type TransactionEntity, type TransactionMethods, type TransactionProps, transactionService as TransactionService, TransactionSource, type TransactionSourceKeys, type TransactionSourceValues, TransactionStatus, type TransactionStatusKeys, type TransactionStatusValues, utilityService as UtilityService, _default$1 as ValidationParameters, type ValidationParametersInstance, _default as ValidationResults, type ValidationResultsInstance, type WarningLevelSummary, defineEntity, ensureNotEmpty, ensureNotNull, decode as filterDecode, encode as filterEncode, isDefined, isValid, _default$f as itemToBundle, _default$e as itemToCountry, _default$d as itemToLicense, _default$b as itemToLicenseTemplate, _default$c as itemToLicensee, _default$a as itemToNotification, itemToObject, _default$9 as itemToPaymentMethod, _default$8 as itemToProduct, _default$7 as itemToProductModule, _default$6 as itemToToken, _default$5 as itemToTransaction, _default$3 as serialize };
diff --git a/dist/index.d.ts b/dist/index.d.ts
index 26edde7..bf0693a 100644
--- a/dist/index.d.ts
+++ b/dist/index.d.ts
@@ -451,6 +451,7 @@ type TransactionStatusKeys = keyof typeof TransactionStatus;
type TransactionStatusValues = (typeof TransactionStatus)[TransactionStatusKeys];
type RequiredProps = Required>;
+type DateField = Date | 'now';
/**
* @author Labs64
@@ -512,10 +513,7 @@ type LicenseProps = {
hidden?: boolean;
licenseeNumber?: string;
licenseTemplateNumber?: string;
- timeVolume?: number;
- timeVolumePeriod?: TimeVolumePeriodValues;
- startDate?: Date | 'now';
- parentfeature?: string;
+ productModuleNumber?: string;
readonly inUse?: boolean;
} & T;
type SavedLicenseProps = RequiredProps & LicenseProps;
@@ -536,14 +534,8 @@ interface LicenseMethods {
getLicenseeNumber(def?: D): string | D;
setLicenseTemplateNumber(number: string): void;
getLicenseTemplateNumber(def?: D): string | D;
- setTimeVolume(timeVolume: number): void;
- getTimeVolume(def?: D): number | D;
- setTimeVolumePeriod(timeVolumePeriod: TimeVolumePeriodValues): void;
- getTimeVolumePeriod(def?: D): TimeVolumePeriodValues | D;
- setStartDate(startDate: Date | 'now'): void;
- getStartDate(def?: D): Date | 'now' | D;
- setParentfeature(parentfeature?: string): void;
- getParentfeature(def?: D): string | D;
+ setProductModuleNumber(number: string): void;
+ getProductModuleNumber(def?: D): string | D;
serialize(): Record;
}
type LicenseEntity = Entity, LicenseMethods>;
@@ -555,15 +547,22 @@ type LicenseEntity = Entity, LicenseM
* @copyright 2017 Labs64 NetLicensing
*/
+interface WarningLevelSummary {
+ RED: string[];
+ YELLOW: string[];
+ GREEN: string[];
+}
type LicenseeProps = {
active?: boolean;
number?: string;
name?: string;
markedForTransfer?: boolean;
productNumber?: string;
+ aliases?: string[];
readonly inUse?: boolean;
+ readonly warningLevelSummary?: WarningLevelSummary;
} & T;
-type SavedLicenseeProps = RequiredProps & LicenseeProps;
+type SavedLicenseeProps = RequiredProps & LicenseeProps;
interface LicenseeMethods {
setActive(active: boolean): void;
getActive(def?: D): boolean | D;
@@ -596,11 +595,6 @@ type LicenseTemplateProps = {
automatic?: boolean;
hidden?: boolean;
hideLicenses?: boolean;
- gracePeriod?: boolean;
- timeVolume?: number;
- timeVolumePeriod?: TimeVolumePeriodValues;
- maxSessions?: number;
- quantity?: number;
productModuleNumber?: string;
readonly inUse?: boolean;
} & T;
@@ -624,16 +618,6 @@ interface LicenseTemplateMethods {
getHidden(def?: D): boolean | D;
setHideLicenses(hideLicenses: boolean): void;
getHideLicenses(def?: D): boolean | D;
- setGracePeriod(gradePeriod: boolean): void;
- getGracePeriod(def?: D): boolean | D;
- setTimeVolume(timeVolume: number): void;
- getTimeVolume(def?: D): number | D;
- setTimeVolumePeriod(timeVolumePeriod: TimeVolumePeriodValues): void;
- getTimeVolumePeriod(def?: D): TimeVolumePeriodValues | D;
- setMaxSessions(maxSessions: number): void;
- getMaxSessions(def?: D): number | D;
- setQuantity(quantity: number): void;
- getQuantity(def?: D): number | D;
setProductModuleNumber(productModuleNumber: string): void;
getProductModuleNumber(def?: D): string | D;
serialize(): Record;
@@ -847,11 +831,7 @@ type ProductModuleProps = {
number?: string;
name?: string;
licensingModel?: LicensingModelValues;
- maxCheckoutValidity?: number;
- yellowThreshold?: number;
- redThreshold?: number;
productNumber?: string;
- nodeSecretMode?: NodeSecretModeValues;
readonly inUse?: boolean;
} & T;
type SavedProductModuleProps = RequiredProps & ProductModuleProps;
@@ -864,12 +844,6 @@ interface ProductModuleMethods {
getName(def?: D): string | D;
setLicensingModel(licensingModel: LicensingModelValues): void;
getLicensingModel(def?: D): LicensingModelValues | D;
- setMaxCheckoutValidity(maxCheckoutValidity: number): void;
- getMaxCheckoutValidity(def?: D): number | D;
- setYellowThreshold(yellowThreshold: number): void;
- getYellowThreshold(def?: D): number | D;
- setRedThreshold(redThreshold: number): void;
- getRedThreshold(def?: D): number | D;
setProductNumber(productNumber: string): void;
getProductNumber(def?: D): string | D;
serialize(): Record;
@@ -1262,7 +1236,9 @@ type BundleProps = T & {
name?: string;
price?: number;
currency?: string;
+ productNumber?: string;
licenseTemplateNumbers?: string[];
+ readonly staleLicenseTemplateNumbers?: string[];
};
type SavedBundleProps = RequiredProps & BundleProps;
interface BundleMethods {
@@ -1276,10 +1252,13 @@ interface BundleMethods {
getPrice(def?: D): number | D;
setCurrency(currency: string): void;
getCurrency(def?: D): string | D;
+ setProductNumber(number: string): void;
+ getProductNumber(def?: D): string | D;
setLicenseTemplateNumbers(numbers: string[]): void;
getLicenseTemplateNumbers(def?: D): string[] | D;
addLicenseTemplateNumber(number: string): void;
removeLicenseTemplateNumber(number: string): void;
+ getStaleLicenseTemplateNumbers(def?: D): string[] | D;
serialize(): Record;
}
type BundleEntity = Entity, BundleMethods>;
@@ -1376,6 +1355,13 @@ declare const defineEntity: ;
}) => Entity;
+/**
+ * @author Labs64
+ * @license Apache-2.0
+ * @link https://netlicensing.io
+ * @copyright 2017 Labs64 NetLicensing
+ */
+
/**
* License entity used internally by NetLicensing.
*
@@ -1794,4 +1780,4 @@ declare const _default$1: () => ValidationParametersInstance;
declare const _default: () => ValidationResultsInstance;
-export { ApiKeyRole, type ApiKeyRoleKeys, type ApiKeyRoleValues, Bundle, type BundleEntity, type BundleMethods, type BundleProps, bundleService as BundleService, _default$g as Constants, _default$2 as Context, type ContextConfig, type ContextInstance, Country, type CountryEntity, type CountryMethods, type CountryProps, type Entity, type EntityMethods, type IBundleService, type ILicenseService, type ILicenseTemplateService, type ILicenseeService, type INotificationService, type IPaymentMethodService, type IProductModuleService, type IProductService, type IService, type ITokenService, type ITransactionService, type IUtilityService, type Info, type Item, type ItemPagination, type Items, License, type LicenseEntity, type LicenseMethods, type LicenseProps, licenseService as LicenseService, LicenseTemplate, type LicenseTemplateEntity, type LicenseTemplateMethods, type LicenseTemplateProps, licenseTemplateService as LicenseTemplateService, _default$4 as LicenseTransactionJoin, type LicenseTransactionJoinEntity, type LicenseTransactionJoinMethods, type LicenseTransactionJoinProps, LicenseType, type LicenseTypeKeys, type LicenseTypeValues, Licensee, type LicenseeEntity, type LicenseeMethods, type LicenseeProperties, type LicenseeProps, LicenseeSecretMode, type LicenseeSecretModeKeys, type LicenseeSecretModeValues, licenseeService as LicenseeService, LicensingModel, type LicensingModelKeys, type LicensingModelValues, type List, NlicError, type NlicResponse, NodeSecretMode, type NodeSecretModeKeys, type NodeSecretModeValues, Notification, type NotificationEntity, NotificationEvent, type NotificationEventKeys, type NotificationEventValues, type NotificationMethods, type NotificationProps, NotificationProtocol, type NotificationProtocolKeys, type NotificationProtocolValues, notificationService as NotificationService, Page, type PageInstance, type Pagination, type PaginationMethods, type Parameter, type Parameters, PaymentMethod, type PaymentMethodEntity, PaymentMethodEnum, type PaymentMethodKeys, type PaymentMethodMethods, type PaymentMethodProps, paymentMethodService as PaymentMethodService, type PaymentMethodValues, Product, ProductDiscount, type ProductDiscountEntity, type ProductDiscountMethods, type ProductDiscountProps, type ProductEntity, type ProductMethods, ProductModule, type ProductModuleEntity, type ProductModuleMethods, type ProductModuleProps, productModuleService as ProductModuleService, type ProductModuleValidation, type ProductProps, productService as ProductService, type PropGetEventListener, type PropSetEventListener, type Proto, type RequestConfig, type RequiredProps, type SavedBundleProps, type SavedLicenseProps, type SavedLicenseTemplateProps, type SavedLicenseeProps, type SavedNotificationProps, type SavedPaymentMethodProps, type SavedProductModuleProps, type SavedProductProps, type SavedTokenProps, type SavedTransactionProps, SecurityMode, type SecurityModeKeys, type SecurityModeValues, service as Service, TimeVolumePeriod, type TimeVolumePeriodKeys, type TimeVolumePeriodValues, Token, type TokenEntity, type TokenMethods, type TokenProps, tokenService as TokenService, TokenType, type TokenTypeKeys, type TokenTypeValues, Transaction, type TransactionEntity, type TransactionMethods, type TransactionProps, transactionService as TransactionService, TransactionSource, type TransactionSourceKeys, type TransactionSourceValues, TransactionStatus, type TransactionStatusKeys, type TransactionStatusValues, utilityService as UtilityService, _default$1 as ValidationParameters, type ValidationParametersInstance, _default as ValidationResults, type ValidationResultsInstance, defineEntity, ensureNotEmpty, ensureNotNull, decode as filterDecode, encode as filterEncode, isDefined, isValid, _default$f as itemToBundle, _default$e as itemToCountry, _default$d as itemToLicense, _default$b as itemToLicenseTemplate, _default$c as itemToLicensee, _default$a as itemToNotification, itemToObject, _default$9 as itemToPaymentMethod, _default$8 as itemToProduct, _default$7 as itemToProductModule, _default$6 as itemToToken, _default$5 as itemToTransaction, _default$3 as serialize };
+export { ApiKeyRole, type ApiKeyRoleKeys, type ApiKeyRoleValues, Bundle, type BundleEntity, type BundleMethods, type BundleProps, bundleService as BundleService, _default$g as Constants, _default$2 as Context, type ContextConfig, type ContextInstance, Country, type CountryEntity, type CountryMethods, type CountryProps, type DateField, type Entity, type EntityMethods, type IBundleService, type ILicenseService, type ILicenseTemplateService, type ILicenseeService, type INotificationService, type IPaymentMethodService, type IProductModuleService, type IProductService, type IService, type ITokenService, type ITransactionService, type IUtilityService, type Info, type Item, type ItemPagination, type Items, License, type LicenseEntity, type LicenseMethods, type LicenseProps, licenseService as LicenseService, LicenseTemplate, type LicenseTemplateEntity, type LicenseTemplateMethods, type LicenseTemplateProps, licenseTemplateService as LicenseTemplateService, _default$4 as LicenseTransactionJoin, type LicenseTransactionJoinEntity, type LicenseTransactionJoinMethods, type LicenseTransactionJoinProps, LicenseType, type LicenseTypeKeys, type LicenseTypeValues, Licensee, type LicenseeEntity, type LicenseeMethods, type LicenseeProperties, type LicenseeProps, LicenseeSecretMode, type LicenseeSecretModeKeys, type LicenseeSecretModeValues, licenseeService as LicenseeService, LicensingModel, type LicensingModelKeys, type LicensingModelValues, type List, NlicError, type NlicResponse, NodeSecretMode, type NodeSecretModeKeys, type NodeSecretModeValues, Notification, type NotificationEntity, NotificationEvent, type NotificationEventKeys, type NotificationEventValues, type NotificationMethods, type NotificationProps, NotificationProtocol, type NotificationProtocolKeys, type NotificationProtocolValues, notificationService as NotificationService, Page, type PageInstance, type Pagination, type PaginationMethods, type Parameter, type Parameters, PaymentMethod, type PaymentMethodEntity, PaymentMethodEnum, type PaymentMethodKeys, type PaymentMethodMethods, type PaymentMethodProps, paymentMethodService as PaymentMethodService, type PaymentMethodValues, Product, ProductDiscount, type ProductDiscountEntity, type ProductDiscountMethods, type ProductDiscountProps, type ProductEntity, type ProductMethods, ProductModule, type ProductModuleEntity, type ProductModuleMethods, type ProductModuleProps, productModuleService as ProductModuleService, type ProductModuleValidation, type ProductProps, productService as ProductService, type PropGetEventListener, type PropSetEventListener, type Proto, type RequestConfig, type RequiredProps, type SavedBundleProps, type SavedLicenseProps, type SavedLicenseTemplateProps, type SavedLicenseeProps, type SavedNotificationProps, type SavedPaymentMethodProps, type SavedProductModuleProps, type SavedProductProps, type SavedTokenProps, type SavedTransactionProps, SecurityMode, type SecurityModeKeys, type SecurityModeValues, service as Service, TimeVolumePeriod, type TimeVolumePeriodKeys, type TimeVolumePeriodValues, Token, type TokenEntity, type TokenMethods, type TokenProps, tokenService as TokenService, TokenType, type TokenTypeKeys, type TokenTypeValues, Transaction, type TransactionEntity, type TransactionMethods, type TransactionProps, transactionService as TransactionService, TransactionSource, type TransactionSourceKeys, type TransactionSourceValues, TransactionStatus, type TransactionStatusKeys, type TransactionStatusValues, utilityService as UtilityService, _default$1 as ValidationParameters, type ValidationParametersInstance, _default as ValidationResults, type ValidationResultsInstance, type WarningLevelSummary, defineEntity, ensureNotEmpty, ensureNotNull, decode as filterDecode, encode as filterEncode, isDefined, isValid, _default$f as itemToBundle, _default$e as itemToCountry, _default$d as itemToLicense, _default$b as itemToLicenseTemplate, _default$c as itemToLicensee, _default$a as itemToNotification, itemToObject, _default$9 as itemToPaymentMethod, _default$8 as itemToProduct, _default$7 as itemToProductModule, _default$6 as itemToToken, _default$5 as itemToTransaction, _default$3 as serialize };
diff --git a/dist/index.global.js b/dist/index.global.js
index b7b137c..b9596f1 100644
--- a/dist/index.global.js
+++ b/dist/index.global.js
@@ -1,7 +1,7 @@
-"use strict";var NetLicensing=(()=>{var At=Object.defineProperty;var Ko=Object.getOwnPropertyDescriptor;var Jo=Object.getOwnPropertyNames;var Go=Object.prototype.hasOwnProperty;var hn=(n,e)=>{for(var o in e)At(n,o,{get:e[o],enumerable:!0})},Wo=(n,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Jo(e))!Go.call(n,r)&&r!==o&&At(n,r,{get:()=>e[r],enumerable:!(t=Ko(e,r))||t.enumerable});return n};var Xo=n=>Wo(At({},"__esModule",{value:!0}),n);var zs={};hn(zs,{ApiKeyRole:()=>Pn,Bundle:()=>qe,BundleService:()=>Mo,Constants:()=>h,Context:()=>zo,Country:()=>He,License:()=>re,LicenseService:()=>Uo,LicenseTemplate:()=>Ye,LicenseTemplateService:()=>ko,LicenseTransactionJoin:()=>ht,LicenseType:()=>Te,Licensee:()=>ze,LicenseeSecretMode:()=>Be,LicenseeService:()=>_o,LicensingModel:()=>yn,NlicError:()=>j,NodeSecretMode:()=>En,Notification:()=>Ke,NotificationEvent:()=>ge,NotificationProtocol:()=>he,NotificationService:()=>jo,Page:()=>x,PaymentMethod:()=>Je,PaymentMethodEnum:()=>Dn,PaymentMethodService:()=>Bo,Product:()=>Ge,ProductDiscount:()=>ft,ProductModule:()=>Tt,ProductModuleService:()=>Fo,ProductService:()=>Vo,SecurityMode:()=>V,Service:()=>f,TimeVolumePeriod:()=>Fe,Token:()=>gt,TokenService:()=>qo,TokenType:()=>Pe,Transaction:()=>Ae,TransactionService:()=>Ho,TransactionSource:()=>Ve,TransactionStatus:()=>ye,UtilityService:()=>$o,ValidationParameters:()=>Yo,ValidationResults:()=>Dt,defineEntity:()=>R,ensureNotEmpty:()=>E,ensureNotNull:()=>v,filterDecode:()=>wo,filterEncode:()=>S,isDefined:()=>cn,isValid:()=>we,itemToBundle:()=>G,itemToCountry:()=>$e,itemToLicense:()=>z,itemToLicenseTemplate:()=>X,itemToLicensee:()=>W,itemToNotification:()=>Q,itemToObject:()=>N,itemToPaymentMethod:()=>se,itemToProduct:()=>ee,itemToProductModule:()=>te,itemToToken:()=>pe,itemToTransaction:()=>ne,serialize:()=>L});var Qo=Object.freeze({DISABLED:"DISABLED",PREDEFINED:"PREDEFINED",CLIENT:"CLIENT"}),Be=Qo;var Zo=Object.freeze({FEATURE:"FEATURE",TIMEVOLUME:"TIMEVOLUME",FLOATING:"FLOATING",QUANTITY:"QUANTITY"}),Te=Zo;var er=Object.freeze({LICENSEE_CREATED:"LICENSEE_CREATED",LICENSE_CREATED:"LICENSE_CREATED",WARNING_LEVEL_CHANGED:"WARNING_LEVEL_CHANGED",PAYMENT_TRANSACTION_PROCESSED:"PAYMENT_TRANSACTION_PROCESSED"}),ge=er;var tr=Object.freeze({WEBHOOK:"WEBHOOK"}),he=tr;var nr=Object.freeze({BASIC_AUTHENTICATION:"BASIC_AUTH",APIKEY_IDENTIFICATION:"APIKEY",ANONYMOUS_IDENTIFICATION:"ANONYMOUS"}),V=nr;var or=Object.freeze({DAY:"DAY",WEEK:"WEEK",MONTH:"MONTH",YEAR:"YEAR"}),Fe=or;var rr=Object.freeze({DEFAULT:"DEFAULT",SHOP:"SHOP",APIKEY:"APIKEY",ACTION:"ACTION"}),Pe=rr;var sr=Object.freeze({SHOP:"SHOP",AUTO_LICENSE_CREATE:"AUTO_LICENSE_CREATE",AUTO_LICENSE_UPDATE:"AUTO_LICENSE_UPDATE",AUTO_LICENSE_DELETE:"AUTO_LICENSE_DELETE",AUTO_LICENSEE_CREATE:"AUTO_LICENSEE_CREATE",AUTO_LICENSEE_DELETE:"AUTO_LICENSEE_DELETE",AUTO_LICENSEE_VALIDATE:"AUTO_LICENSEE_VALIDATE",AUTO_LICENSETEMPLATE_DELETE:"AUTO_LICENSETEMPLATE_DELETE",AUTO_PRODUCTMODULE_DELETE:"AUTO_PRODUCTMODULE_DELETE",AUTO_PRODUCT_DELETE:"AUTO_PRODUCT_DELETE",AUTO_LICENSES_TRANSFER:"AUTO_LICENSES_TRANSFER",SUBSCRIPTION_UPDATE:"SUBSCRIPTION_UPDATE",RECURRING_PAYMENT:"RECURRING_PAYMENT",CANCEL_RECURRING_PAYMENT:"CANCEL_RECURRING_PAYMENT",OBTAIN_BUNDLE:"OBTAIN_BUNDLE"}),Ve=sr;var ir=Object.freeze({PENDING:"PENDING",CLOSED:"CLOSED",CANCELLED:"CANCELLED"}),ye=ir;var h={LicenseeSecretMode:Be,LicenseType:Te,NotificationEvent:ge,NotificationProtocol:he,SecurityMode:V,TimeVolumePeriod:Fe,TokenType:Pe,TransactionSource:Ve,TransactionStatus:ye,BASIC_AUTHENTICATION:"BASIC_AUTH",APIKEY_IDENTIFICATION:"APIKEY",ANONYMOUS_IDENTIFICATION:"ANONYMOUS",FILTER:"filter",Product:{TYPE:"Product",ENDPOINT_PATH:"product"},ProductModule:{TYPE:"ProductModule",ENDPOINT_PATH:"productmodule",PRODUCT_MODULE_NUMBER:"productModuleNumber"},Licensee:{TYPE:"Licensee",ENDPOINT_PATH:"licensee",ENDPOINT_PATH_VALIDATE:"validate",ENDPOINT_PATH_TRANSFER:"transfer",LICENSEE_NUMBER:"licenseeNumber"},LicenseTemplate:{TYPE:"LicenseTemplate",ENDPOINT_PATH:"licensetemplate",LicenseType:Te},License:{TYPE:"License",ENDPOINT_PATH:"license"},Validation:{TYPE:"ProductModuleValidation"},Token:{TYPE:"Token",ENDPOINT_PATH:"token",Type:Pe},PaymentMethod:{TYPE:"PaymentMethod",ENDPOINT_PATH:"paymentmethod"},Bundle:{TYPE:"Bundle",ENDPOINT_PATH:"bundle",ENDPOINT_OBTAIN_PATH:"obtain"},Notification:{TYPE:"Notification",ENDPOINT_PATH:"notification",Protocol:he,Event:ge},Transaction:{TYPE:"Transaction",ENDPOINT_PATH:"transaction",Status:ye},Utility:{ENDPOINT_PATH:"utility",ENDPOINT_PATH_LICENSE_TYPES:"licenseTypes",ENDPOINT_PATH_LICENSING_MODELS:"licensingModels",ENDPOINT_PATH_COUNTRIES:"countries",LICENSING_MODEL_TYPE:"LicensingModelProperties",LICENSE_TYPE:"LicenseType",COUNTRY_TYPE:"Country"}};var ar=Object.freeze({ROLE_APIKEY_LICENSEE:"ROLE_APIKEY_LICENSEE",ROLE_APIKEY_ANALYTICS:"ROLE_APIKEY_ANALYTICS",ROLE_APIKEY_OPERATION:"ROLE_APIKEY_OPERATION",ROLE_APIKEY_MAINTENANCE:"ROLE_APIKEY_MAINTENANCE",ROLE_APIKEY_ADMIN:"ROLE_APIKEY_ADMIN"}),Pn=ar;var cr=Object.freeze({TRY_AND_BUY:"TryAndBuy",SUBSCRIPTION:"Subscription",RENTAL:"Rental",FLOATING:"Floating",MULTI_FEATURE:"MultiFeature",PAY_PER_USE:"PayPerUse",PRICING_TABLE:"PricingTable",QUOTA:"Quota",NODE_LOCKED:"NodeLocked",DISCOUNT:"Discount"}),yn=cr;var ur=Object.freeze({PREDEFINED:"PREDEFINED",CLIENT:"CLIENT"}),En=ur;var dr=Object.freeze({NULL:"NULL",PAYPAL:"PAYPAL",PAYPAL_SANDBOX:"PAYPAL_SANDBOX",STRIPE:"STRIPE",STRIPE_TESTING:"STRIPE_TESTING"}),Dn=dr;var mr=n=>{try{return JSON.parse(n)}catch{return n}},pr=n=>{let e={};return n?.forEach(({name:o,value:t})=>{e[o]=mr(t)}),e},lr=n=>{let e={};return n?.forEach(o=>{let{name:t}=o;e[t]=e[t]||[],e[t].push(bn(o))}),e},bn=n=>n?{...pr(n.property),...lr(n.list)}:{},N=bn;var wt=(n,e)=>Object.hasOwn(n,e),m=(n,e,o)=>{n[e]=o},d=(n,e,o)=>wt(n,e)?n[e]:o;var L=(n,e={})=>{let o={},{ignore:t=[]}=e;return Object.entries(n).forEach(([r,s])=>{if(!t.includes(r)&&typeof s!="function")if(s===void 0)o[r]="";else if(typeof s=="string")o[r]=s;else if(s instanceof Date)o[r]=s.toISOString();else if(typeof s!="object"||s===null)o[r]=String(s);else try{o[r]=JSON.stringify(s)}catch{o[r]=String(s)}}),o};var fr=function(n,e,o={},t){let r={set:[],get:[]};t?.get&&r.get.push(t.get),t?.set&&r.set.push(t.set);let s={set(i,a){m(n,i,a)},get(i,a){return d(n,i,a)},has(i){return wt(n,i)},setProperty(i,a){this.set(i,a)},addProperty(i,a){this.set(i,a)},getProperty(i,a){return this.get(i,a)},hasProperty(i){return this.has(i)},setProperties(i){Object.entries(i).forEach(([a,p])=>{this.set(a,p)})},serialize(){return L(n)}};return new Proxy(n,{get(i,a,p){return Object.hasOwn(e,a)?e[a]:Object.hasOwn(s,a)?s[a]:(r.get.forEach(u=>{u(i,a,p)}),Reflect.get(i,a,p))},set(i,a,p,u){return r.set.forEach(l=>{l(i,a,p,u)}),Reflect.set(i,a,p,u)},getPrototypeOf(){return o.prototype||null}})},R=fr;var vn=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setName(t){m(e,"name",t)},getName(t){return d(e,"name",t)},setPrice(t){m(e,"price",t)},getPrice(t){return d(e,"price",t)},setCurrency(t){m(e,"currency",t)},getCurrency(t){return d(e,"currency",t)},setLicenseTemplateNumbers(t){m(e,"licenseTemplateNumbers",t)},addLicenseTemplateNumber(t){e.licenseTemplateNumbers||(e.licenseTemplateNumbers=[]),e.licenseTemplateNumbers.push(t)},getLicenseTemplateNumbers(t){return d(e,"licenseTemplateNumbers",t)},removeLicenseTemplateNumber(t){let{licenseTemplateNumbers:r=[]}=e;r.splice(r.indexOf(t),1),e.licenseTemplateNumbers=r},serialize(){if(e.licenseTemplateNumbers){let t=e.licenseTemplateNumbers.join(",");return L({...e,licenseTemplateNumbers:t})}return L(e)}},vn)},qe=vn;var G=n=>{let e=N(n),{licenseTemplateNumbers:o}=e;return o&&typeof o=="string"&&(e.licenseTemplateNumbers=o.split(",")),qe(e)};var Nn=function(n={}){let o={...{code:"",name:"",vatPercent:0,isEu:!1},...n};return R(o,{getCode(){return o.code},getName(){return o.name},getVatPercent(){return o.vatPercent},getIsEu(){return o.isEu}},Nn)},He=Nn;var $e=n=>He(N(n));var Rn=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setName(t){m(e,"name",t)},getName(t){return d(e,"name",t)},setPrice(t){m(e,"price",t)},getPrice(t){return d(e,"price",t)},setCurrency(t){m(e,"currency",t)},getCurrency(t){return d(e,"currency",t)},setHidden(t){m(e,"hidden",t)},getHidden(t){return d(e,"hidden",t)},setLicenseeNumber(t){m(e,"licenseeNumber",t)},getLicenseeNumber(t){return d(e,"licenseeNumber",t)},setLicenseTemplateNumber(t){m(e,"licenseTemplateNumber",t)},getLicenseTemplateNumber(t){return d(e,"licenseTemplateNumber",t)},setTimeVolume(t){m(e,"timeVolume",t)},getTimeVolume(t){return d(e,"timeVolume",t)},setTimeVolumePeriod(t){m(e,"timeVolumePeriod",t)},getTimeVolumePeriod(t){return d(e,"timeVolumePeriod",t)},setStartDate(t){m(e,"startDate",t)},getStartDate(t){return d(e,"startDate",t)},setParentfeature(t){m(e,"parentfeature",t)},getParentfeature(t){return d(e,"parentfeature",t)},serialize(){return L(e,{ignore:["inUse"]})}},Rn)},re=Rn;var z=n=>{let e=N(n),{startDate:o}=e;return o&&typeof o=="string"&&(e.startDate=o==="now"?o:new Date(o)),re(e)};var xn=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setName(t){m(e,"name",t)},getName(t){return d(e,"name",t)},setProductNumber(t){m(e,"productNumber",t)},getProductNumber(t){return d(e,"productNumber",t)},setMarkedForTransfer(t){m(e,"markedForTransfer",t)},getMarkedForTransfer(t){return d(e,"markedForTransfer",t)},serialize(){return L(e,{ignore:["inUse"]})}},xn)},ze=xn;var W=n=>ze(N(n));var In=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setName(t){m(e,"name",t)},getName(t){return d(e,"name",t)},setLicenseType(t){m(e,"licenseType",t)},getLicenseType(t){return d(e,"licenseType",t)},setPrice(t){m(e,"price",t)},getPrice(t){return d(e,"price",t)},setCurrency(t){m(e,"currency",t)},getCurrency(t){return d(e,"currency",t)},setAutomatic(t){m(e,"automatic",t)},getAutomatic(t){return d(e,"automatic",t)},setHidden(t){m(e,"hidden",t)},getHidden(t){return d(e,"hidden",t)},setHideLicenses(t){m(e,"hideLicenses",t)},getHideLicenses(t){return d(e,"hideLicenses",t)},setGracePeriod(t){m(e,"gracePeriod",t)},getGracePeriod(t){return d(e,"gracePeriod",t)},setTimeVolume(t){m(e,"timeVolume",t)},getTimeVolume(t){return d(e,"timeVolume",t)},setTimeVolumePeriod(t){m(e,"timeVolumePeriod",t)},getTimeVolumePeriod(t){return d(e,"timeVolumePeriod",t)},setMaxSessions(t){m(e,"maxSessions",t)},getMaxSessions(t){return d(e,"maxSessions",t)},setQuantity(t){m(e,"quantity",t)},getQuantity(t){return d(e,"quantity",t)},setProductModuleNumber(t){m(e,"productModuleNumber",t)},getProductModuleNumber(t){return d(e,"productModuleNumber",t)},serialize(){return L(e,{ignore:["inUse"]})}},In)},Ye=In;var X=n=>Ye(N(n));var Sn=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setName(t){m(e,"name",t)},getName(t){return d(e,"name",t)},setProtocol(t){m(e,"protocol",t)},getProtocol(t){return d(e,"protocol",t)},setEvents(t){m(e,"events",t)},getEvents(t){return d(e,"events",t)},addEvent(t){let r=this.getEvents([]);r.push(t),this.setEvents(r)},setPayload(t){m(e,"payload",t)},getPayload(t){return d(e,"payload",t)},setEndpoint(t){m(e,"endpoint",t)},getEndpoint(t){return d(e,"endpoint",t)},serialize(){let t=L(e);return t.events&&(t.events=this.getEvents([]).join(",")),t}},Sn)},Ke=Sn;var Q=n=>{let e=N(n),{events:o}=e;return o&&typeof o=="string"&&(e.events=o.split(",")),Ke(e)};var Ln=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)}},Ln)},Je=Ln;var se=n=>Je(N(n));var Cn=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setName(t){m(e,"name",t)},getName(t){return d(e,"name",t)},setVersion(t){m(e,"version",t)},getVersion(t){return d(e,"version",t)},setDescription(t){m(e,"description",t)},getDescription(t){return d(e,"description",t)},setLicensingInfo(t){m(e,"licensingInfo",t)},getLicensingInfo(t){return d(e,"licensingInfo",t)},setLicenseeAutoCreate(t){m(e,"licenseeAutoCreate",t)},getLicenseeAutoCreate(t){return d(e,"licenseeAutoCreate",t)},setDiscounts(t){m(e,"discounts",t)},getDiscounts(t){return d(e,"discounts",t)},addDiscount(t){let r=this.getDiscounts([]);r.push(t),this.setDiscounts(r)},removeDiscount(t){let r=this.getDiscounts();Array.isArray(r)&&r.length>0&&(r.splice(r.indexOf(t),1),this.setDiscounts(r))},setProductDiscounts(t){this.setDiscounts(t)},getProductDiscounts(t){return this.getDiscounts(t)},serialize(){let t=L(e,{ignore:["discounts","inUse"]}),r=this.getDiscounts();return r&&(t.discount=r.length>0?r.map(s=>s.toString()):""),t}},Cn)},Ge=Cn;function Ee(n,e){return function(){return n.apply(e,arguments)}}var{toString:Tr}=Object.prototype,{getPrototypeOf:Mt}=Object,{iterator:Xe,toStringTag:wn}=Symbol,Qe=(n=>e=>{let o=Tr.call(e);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),B=n=>(n=n.toLowerCase(),e=>Qe(e)===n),Ze=n=>e=>typeof e===n,{isArray:ie}=Array,De=Ze("undefined");function gr(n){return n!==null&&!De(n)&&n.constructor!==null&&!De(n.constructor)&&k(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}var On=B("ArrayBuffer");function hr(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&On(n.buffer),e}var Pr=Ze("string"),k=Ze("function"),Mn=Ze("number"),et=n=>n!==null&&typeof n=="object",yr=n=>n===!0||n===!1,We=n=>{if(Qe(n)!=="object")return!1;let e=Mt(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(wn in n)&&!(Xe in n)},Er=B("Date"),Dr=B("File"),br=B("Blob"),vr=B("FileList"),Nr=n=>et(n)&&k(n.pipe),Rr=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||k(n.append)&&((e=Qe(n))==="formdata"||e==="object"&&k(n.toString)&&n.toString()==="[object FormData]"))},xr=B("URLSearchParams"),[Ir,Sr,Lr,Cr]=["ReadableStream","Request","Response","Headers"].map(B),Ar=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function be(n,e,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let t,r;if(typeof n!="object"&&(n=[n]),ie(n))for(t=0,r=n.length;t0;)if(r=o[t],e===r.toLowerCase())return r;return null}var Z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Un=n=>!De(n)&&n!==Z;function Ot(){let{caseless:n}=Un(this)&&this||{},e={},o=(t,r)=>{let s=n&&_n(e,r)||r;We(e[s])&&We(t)?e[s]=Ot(e[s],t):We(t)?e[s]=Ot({},t):ie(t)?e[s]=t.slice():e[s]=t};for(let t=0,r=arguments.length;t(be(e,(r,s)=>{o&&k(r)?n[s]=Ee(r,o):n[s]=r},{allOwnKeys:t}),n),Or=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Mr=(n,e,o,t)=>{n.prototype=Object.create(e.prototype,t),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),o&&Object.assign(n.prototype,o)},_r=(n,e,o,t)=>{let r,s,i,a={};if(e=e||{},n==null)return e;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)i=r[s],(!t||t(i,n,e))&&!a[i]&&(e[i]=n[i],a[i]=!0);n=o!==!1&&Mt(n)}while(n&&(!o||o(n,e))&&n!==Object.prototype);return e},Ur=(n,e,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=e.length;let t=n.indexOf(e,o);return t!==-1&&t===o},kr=n=>{if(!n)return null;if(ie(n))return n;let e=n.length;if(!Mn(e))return null;let o=new Array(e);for(;e-- >0;)o[e]=n[e];return o},jr=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&Mt(Uint8Array)),Br=(n,e)=>{let t=(n&&n[Xe]).call(n),r;for(;(r=t.next())&&!r.done;){let s=r.value;e.call(n,s[0],s[1])}},Fr=(n,e)=>{let o,t=[];for(;(o=n.exec(e))!==null;)t.push(o);return t},Vr=B("HTMLFormElement"),qr=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,t,r){return t.toUpperCase()+r}),An=(({hasOwnProperty:n})=>(e,o)=>n.call(e,o))(Object.prototype),Hr=B("RegExp"),kn=(n,e)=>{let o=Object.getOwnPropertyDescriptors(n),t={};be(o,(r,s)=>{let i;(i=e(r,s,n))!==!1&&(t[s]=i||r)}),Object.defineProperties(n,t)},$r=n=>{kn(n,(e,o)=>{if(k(n)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;let t=n[o];if(k(t)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},zr=(n,e)=>{let o={},t=r=>{r.forEach(s=>{o[s]=!0})};return ie(n)?t(n):t(String(n).split(e)),o},Yr=()=>{},Kr=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function Jr(n){return!!(n&&k(n.append)&&n[wn]==="FormData"&&n[Xe])}var Gr=n=>{let e=new Array(10),o=(t,r)=>{if(et(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;let s=ie(t)?[]:{};return be(t,(i,a)=>{let p=o(i,r+1);!De(p)&&(s[a]=p)}),e[r]=void 0,s}}return t};return o(n,0)},Wr=B("AsyncFunction"),Xr=n=>n&&(et(n)||k(n))&&k(n.then)&&k(n.catch),jn=((n,e)=>n?setImmediate:e?((o,t)=>(Z.addEventListener("message",({source:r,data:s})=>{r===Z&&s===o&&t.length&&t.shift()()},!1),r=>{t.push(r),Z.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",k(Z.postMessage)),Qr=typeof queueMicrotask<"u"?queueMicrotask.bind(Z):typeof process<"u"&&process.nextTick||jn,Zr=n=>n!=null&&k(n[Xe]),c={isArray:ie,isArrayBuffer:On,isBuffer:gr,isFormData:Rr,isArrayBufferView:hr,isString:Pr,isNumber:Mn,isBoolean:yr,isObject:et,isPlainObject:We,isReadableStream:Ir,isRequest:Sr,isResponse:Lr,isHeaders:Cr,isUndefined:De,isDate:Er,isFile:Dr,isBlob:br,isRegExp:Hr,isFunction:k,isStream:Nr,isURLSearchParams:xr,isTypedArray:jr,isFileList:vr,forEach:be,merge:Ot,extend:wr,trim:Ar,stripBOM:Or,inherits:Mr,toFlatObject:_r,kindOf:Qe,kindOfTest:B,endsWith:Ur,toArray:kr,forEachEntry:Br,matchAll:Fr,isHTMLForm:Vr,hasOwnProperty:An,hasOwnProp:An,reduceDescriptors:kn,freezeMethods:$r,toObjectSet:zr,toCamelCase:qr,noop:Yr,toFiniteNumber:Kr,findKey:_n,global:Z,isContextDefined:Un,isSpecCompliantForm:Jr,toJSONObject:Gr,isAsyncFn:Wr,isThenable:Xr,setImmediate:jn,asap:Qr,isIterable:Zr};function ae(n,e,o,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),o&&(this.config=o),t&&(this.request=t),r&&(this.response=r,this.status=r.status?r.status:null)}c.inherits(ae,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}});var Bn=ae.prototype,Fn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{Fn[n]={value:n}});Object.defineProperties(ae,Fn);Object.defineProperty(Bn,"isAxiosError",{value:!0});ae.from=(n,e,o,t,r,s)=>{let i=Object.create(Bn);return c.toFlatObject(n,i,function(p){return p!==Error.prototype},a=>a!=="isAxiosError"),ae.call(i,n.message,e,o,t,r),i.cause=n,i.name=n.name,s&&Object.assign(i,s),i};var y=ae;var tt=null;function _t(n){return c.isPlainObject(n)||c.isArray(n)}function qn(n){return c.endsWith(n,"[]")?n.slice(0,-2):n}function Vn(n,e,o){return n?n.concat(e).map(function(r,s){return r=qn(r),!o&&s?"["+r+"]":r}).join(o?".":""):e}function es(n){return c.isArray(n)&&!n.some(_t)}var ts=c.toFlatObject(c,{},null,function(e){return/^is[A-Z]/.test(e)});function ns(n,e,o){if(!c.isObject(n))throw new TypeError("target must be an object");e=e||new(tt||FormData),o=c.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(D,P){return!c.isUndefined(P[D])});let t=o.metaTokens,r=o.visitor||l,s=o.dots,i=o.indexes,p=(o.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(r))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(c.isDate(g))return g.toISOString();if(!p&&c.isBlob(g))throw new y("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(g)||c.isTypedArray(g)?p&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function l(g,D,P){let A=g;if(g&&!P&&typeof g=="object"){if(c.endsWith(D,"{}"))D=t?D:D.slice(0,-2),g=JSON.stringify(g);else if(c.isArray(g)&&es(g)||(c.isFileList(g)||c.endsWith(D,"[]"))&&(A=c.toArray(g)))return D=qn(D),A.forEach(function(_,$){!(c.isUndefined(_)||_===null)&&e.append(i===!0?Vn([D],$,s):i===null?D:D+"[]",u(_))}),!1}return _t(g)?!0:(e.append(Vn(P,D,s),u(g)),!1)}let T=[],b=Object.assign(ts,{defaultVisitor:l,convertValue:u,isVisitable:_t});function I(g,D){if(!c.isUndefined(g)){if(T.indexOf(g)!==-1)throw Error("Circular reference detected in "+D.join("."));T.push(g),c.forEach(g,function(A,O){(!(c.isUndefined(A)||A===null)&&r.call(e,A,c.isString(O)?O.trim():O,D,b))===!0&&I(A,D?D.concat(O):[O])}),T.pop()}}if(!c.isObject(n))throw new TypeError("data must be an object");return I(n),e}var K=ns;function Hn(n){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function $n(n,e){this._pairs=[],n&&K(n,this,e)}var zn=$n.prototype;zn.append=function(e,o){this._pairs.push([e,o])};zn.toString=function(e){let o=e?function(t){return e.call(this,t,Hn)}:Hn;return this._pairs.map(function(r){return o(r[0])+"="+o(r[1])},"").join("&")};var nt=$n;function os(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ve(n,e,o){if(!e)return n;let t=o&&o.encode||os;c.isFunction(o)&&(o={serialize:o});let r=o&&o.serialize,s;if(r?s=r(e,o):s=c.isURLSearchParams(e)?e.toString():new nt(e,o).toString(t),s){let i=n.indexOf("#");i!==-1&&(n=n.slice(0,i)),n+=(n.indexOf("?")===-1?"?":"&")+s}return n}var Ut=class{constructor(){this.handlers=[]}use(e,o,t){return this.handlers.push({fulfilled:e,rejected:o,synchronous:t?t.synchronous:!1,runWhen:t?t.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(t){t!==null&&e(t)})}},kt=Ut;var ot={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Yn=typeof URLSearchParams<"u"?URLSearchParams:nt;var Kn=typeof FormData<"u"?FormData:null;var Jn=typeof Blob<"u"?Blob:null;var Gn={isBrowser:!0,classes:{URLSearchParams:Yn,FormData:Kn,Blob:Jn},protocols:["http","https","file","blob","url","data"]};var Ft={};hn(Ft,{hasBrowserEnv:()=>Bt,hasStandardBrowserEnv:()=>rs,hasStandardBrowserWebWorkerEnv:()=>ss,navigator:()=>jt,origin:()=>is});var Bt=typeof window<"u"&&typeof document<"u",jt=typeof navigator=="object"&&navigator||void 0,rs=Bt&&(!jt||["ReactNative","NativeScript","NS"].indexOf(jt.product)<0),ss=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",is=Bt&&window.location.href||"http://localhost";var C={...Ft,...Gn};function Vt(n,e){return K(n,new C.classes.URLSearchParams,Object.assign({visitor:function(o,t,r,s){return C.isNode&&c.isBuffer(o)?(this.append(t,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function as(n){return c.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function cs(n){let e={},o=Object.keys(n),t,r=o.length,s;for(t=0;t=o.length;return i=!i&&c.isArray(r)?r.length:i,p?(c.hasOwnProp(r,i)?r[i]=[r[i],t]:r[i]=t,!a):((!r[i]||!c.isObject(r[i]))&&(r[i]=[]),e(o,t,r[i],s)&&c.isArray(r[i])&&(r[i]=cs(r[i])),!a)}if(c.isFormData(n)&&c.isFunction(n.entries)){let o={};return c.forEachEntry(n,(t,r)=>{e(as(t),r,o,0)}),o}return null}var rt=us;function ds(n,e,o){if(c.isString(n))try{return(e||JSON.parse)(n),c.trim(n)}catch(t){if(t.name!=="SyntaxError")throw t}return(o||JSON.stringify)(n)}var qt={transitional:ot,adapter:["xhr","http","fetch"],transformRequest:[function(e,o){let t=o.getContentType()||"",r=t.indexOf("application/json")>-1,s=c.isObject(e);if(s&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return r?JSON.stringify(rt(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(t.indexOf("application/x-www-form-urlencoded")>-1)return Vt(e,this.formSerializer).toString();if((a=c.isFileList(e))||t.indexOf("multipart/form-data")>-1){let p=this.env&&this.env.FormData;return K(a?{"files[]":e}:e,p&&new p,this.formSerializer)}}return s||r?(o.setContentType("application/json",!1),ds(e)):e}],transformResponse:[function(e){let o=this.transitional||qt.transitional,t=o&&o.forcedJSONParsing,r=this.responseType==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(t&&!this.responseType||r)){let i=!(o&&o.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(a){if(i)throw a.name==="SyntaxError"?y.from(a,y.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:C.classes.FormData,Blob:C.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],n=>{qt.headers[n]={}});var ce=qt;var ms=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Wn=n=>{let e={},o,t,r;return n&&n.split(`
-`).forEach(function(i){r=i.indexOf(":"),o=i.substring(0,r).trim().toLowerCase(),t=i.substring(r+1).trim(),!(!o||e[o]&&ms[o])&&(o==="set-cookie"?e[o]?e[o].push(t):e[o]=[t]:e[o]=e[o]?e[o]+", "+t:t)}),e};var Xn=Symbol("internals");function Ne(n){return n&&String(n).trim().toLowerCase()}function st(n){return n===!1||n==null?n:c.isArray(n)?n.map(st):String(n)}function ps(n){let e=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,t;for(;t=o.exec(n);)e[t[1]]=t[2];return e}var ls=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Ht(n,e,o,t,r){if(c.isFunction(t))return t.call(this,e,o);if(r&&(e=o),!!c.isString(e)){if(c.isString(t))return e.indexOf(t)!==-1;if(c.isRegExp(t))return t.test(e)}}function fs(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,o,t)=>o.toUpperCase()+t)}function Ts(n,e){let o=c.toCamelCase(" "+e);["get","set","has"].forEach(t=>{Object.defineProperty(n,t+o,{value:function(r,s,i){return this[t].call(this,e,r,s,i)},configurable:!0})})}var ue=class{constructor(e){e&&this.set(e)}set(e,o,t){let r=this;function s(a,p,u){let l=Ne(p);if(!l)throw new Error("header name must be a non-empty string");let T=c.findKey(r,l);(!T||r[T]===void 0||u===!0||u===void 0&&r[T]!==!1)&&(r[T||p]=st(a))}let i=(a,p)=>c.forEach(a,(u,l)=>s(u,l,p));if(c.isPlainObject(e)||e instanceof this.constructor)i(e,o);else if(c.isString(e)&&(e=e.trim())&&!ls(e))i(Wn(e),o);else if(c.isObject(e)&&c.isIterable(e)){let a={},p,u;for(let l of e){if(!c.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[u=l[0]]=(p=a[u])?c.isArray(p)?[...p,l[1]]:[p,l[1]]:l[1]}i(a,o)}else e!=null&&s(o,e,t);return this}get(e,o){if(e=Ne(e),e){let t=c.findKey(this,e);if(t){let r=this[t];if(!o)return r;if(o===!0)return ps(r);if(c.isFunction(o))return o.call(this,r,t);if(c.isRegExp(o))return o.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,o){if(e=Ne(e),e){let t=c.findKey(this,e);return!!(t&&this[t]!==void 0&&(!o||Ht(this,this[t],t,o)))}return!1}delete(e,o){let t=this,r=!1;function s(i){if(i=Ne(i),i){let a=c.findKey(t,i);a&&(!o||Ht(t,t[a],a,o))&&(delete t[a],r=!0)}}return c.isArray(e)?e.forEach(s):s(e),r}clear(e){let o=Object.keys(this),t=o.length,r=!1;for(;t--;){let s=o[t];(!e||Ht(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){let o=this,t={};return c.forEach(this,(r,s)=>{let i=c.findKey(t,s);if(i){o[i]=st(r),delete o[s];return}let a=e?fs(s):String(s).trim();a!==s&&delete o[s],o[a]=st(r),t[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let o=Object.create(null);return c.forEach(this,(t,r)=>{t!=null&&t!==!1&&(o[r]=e&&c.isArray(t)?t.join(", "):t)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,o])=>e+": "+o).join(`
-`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...o){let t=new this(e);return o.forEach(r=>t.set(r)),t}static accessor(e){let t=(this[Xn]=this[Xn]={accessors:{}}).accessors,r=this.prototype;function s(i){let a=Ne(i);t[a]||(Ts(r,i),t[a]=!0)}return c.isArray(e)?e.forEach(s):s(e),this}};ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(ue.prototype,({value:n},e)=>{let o=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(t){this[o]=t}}});c.freezeMethods(ue);var M=ue;function Re(n,e){let o=this||ce,t=e||o,r=M.from(t.headers),s=t.data;return c.forEach(n,function(a){s=a.call(o,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function xe(n){return!!(n&&n.__CANCEL__)}function Qn(n,e,o){y.call(this,n??"canceled",y.ERR_CANCELED,e,o),this.name="CanceledError"}c.inherits(Qn,y,{__CANCEL__:!0});var q=Qn;function Ie(n,e,o){let t=o.config.validateStatus;!o.status||!t||t(o.status)?n(o):e(new y("Request failed with status code "+o.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function $t(n){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function gs(n,e){n=n||10;let o=new Array(n),t=new Array(n),r=0,s=0,i;return e=e!==void 0?e:1e3,function(p){let u=Date.now(),l=t[s];i||(i=u),o[r]=p,t[r]=u;let T=s,b=0;for(;T!==r;)b+=o[T++],T=T%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-i{o=l,r=null,s&&(clearTimeout(s),s=null),n.apply(null,u)};return[(...u)=>{let l=Date.now(),T=l-o;T>=t?i(u,l):(r=u,s||(s=setTimeout(()=>{s=null,i(r)},t-T)))},()=>r&&i(r)]}var eo=hs;var de=(n,e,o=3)=>{let t=0,r=Zn(50,250);return eo(s=>{let i=s.loaded,a=s.lengthComputable?s.total:void 0,p=i-t,u=r(p),l=i<=a;t=i;let T={loaded:i,total:a,progress:a?i/a:void 0,bytes:p,rate:u||void 0,estimated:u&&a&&l?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};n(T)},o)},zt=(n,e)=>{let o=n!=null;return[t=>e[0]({lengthComputable:o,total:n,loaded:t}),e[1]]},Yt=n=>(...e)=>c.asap(()=>n(...e));var to=C.hasStandardBrowserEnv?((n,e)=>o=>(o=new URL(o,C.origin),n.protocol===o.protocol&&n.host===o.host&&(e||n.port===o.port)))(new URL(C.origin),C.navigator&&/(msie|trident)/i.test(C.navigator.userAgent)):()=>!0;var no=C.hasStandardBrowserEnv?{write(n,e,o,t,r,s){let i=[n+"="+encodeURIComponent(e)];c.isNumber(o)&&i.push("expires="+new Date(o).toGMTString()),c.isString(t)&&i.push("path="+t),c.isString(r)&&i.push("domain="+r),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(n){let e=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Kt(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Jt(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function Se(n,e,o){let t=!Kt(e);return n&&(t||o==!1)?Jt(n,e):e}var oo=n=>n instanceof M?{...n}:n;function F(n,e){e=e||{};let o={};function t(u,l,T,b){return c.isPlainObject(u)&&c.isPlainObject(l)?c.merge.call({caseless:b},u,l):c.isPlainObject(l)?c.merge({},l):c.isArray(l)?l.slice():l}function r(u,l,T,b){if(c.isUndefined(l)){if(!c.isUndefined(u))return t(void 0,u,T,b)}else return t(u,l,T,b)}function s(u,l){if(!c.isUndefined(l))return t(void 0,l)}function i(u,l){if(c.isUndefined(l)){if(!c.isUndefined(u))return t(void 0,u)}else return t(void 0,l)}function a(u,l,T){if(T in e)return t(u,l);if(T in n)return t(void 0,u)}let p={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,l,T)=>r(oo(u),oo(l),T,!0)};return c.forEach(Object.keys(Object.assign({},n,e)),function(l){let T=p[l]||r,b=T(n[l],e[l],l);c.isUndefined(b)&&T!==a||(o[l]=b)}),o}var it=n=>{let e=F({},n),{data:o,withXSRFToken:t,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:a}=e;e.headers=i=M.from(i),e.url=ve(Se(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let p;if(c.isFormData(o)){if(C.hasStandardBrowserEnv||C.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((p=i.getContentType())!==!1){let[u,...l]=p?p.split(";").map(T=>T.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...l].join("; "))}}if(C.hasStandardBrowserEnv&&(t&&c.isFunction(t)&&(t=t(e)),t||t!==!1&&to(e.url))){let u=r&&s&&no.read(s);u&&i.set(r,u)}return e};var Ps=typeof XMLHttpRequest<"u",ro=Ps&&function(n){return new Promise(function(o,t){let r=it(n),s=r.data,i=M.from(r.headers).normalize(),{responseType:a,onUploadProgress:p,onDownloadProgress:u}=r,l,T,b,I,g;function D(){I&&I(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener("abort",l)}let P=new XMLHttpRequest;P.open(r.method.toUpperCase(),r.url,!0),P.timeout=r.timeout;function A(){if(!P)return;let _=M.from("getAllResponseHeaders"in P&&P.getAllResponseHeaders()),U={data:!a||a==="text"||a==="json"?P.responseText:P.response,status:P.status,statusText:P.statusText,headers:_,config:n,request:P};Ie(function(J){o(J),D()},function(J){t(J),D()},U),P=null}"onloadend"in P?P.onloadend=A:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.indexOf("file:")===0)||setTimeout(A)},P.onabort=function(){P&&(t(new y("Request aborted",y.ECONNABORTED,n,P)),P=null)},P.onerror=function(){t(new y("Network Error",y.ERR_NETWORK,n,P)),P=null},P.ontimeout=function(){let $=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded",U=r.transitional||ot;r.timeoutErrorMessage&&($=r.timeoutErrorMessage),t(new y($,U.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,n,P)),P=null},s===void 0&&i.setContentType(null),"setRequestHeader"in P&&c.forEach(i.toJSON(),function($,U){P.setRequestHeader(U,$)}),c.isUndefined(r.withCredentials)||(P.withCredentials=!!r.withCredentials),a&&a!=="json"&&(P.responseType=r.responseType),u&&([b,g]=de(u,!0),P.addEventListener("progress",b)),p&&P.upload&&([T,I]=de(p),P.upload.addEventListener("progress",T),P.upload.addEventListener("loadend",I)),(r.cancelToken||r.signal)&&(l=_=>{P&&(t(!_||_.type?new q(null,n,P):_),P.abort(),P=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener("abort",l)));let O=$t(r.url);if(O&&C.protocols.indexOf(O)===-1){t(new y("Unsupported protocol "+O+":",y.ERR_BAD_REQUEST,n));return}P.send(s||null)})};var ys=(n,e)=>{let{length:o}=n=n?n.filter(Boolean):[];if(e||o){let t=new AbortController,r,s=function(u){if(!r){r=!0,a();let l=u instanceof Error?u:this.reason;t.abort(l instanceof y?l:new q(l instanceof Error?l.message:l))}},i=e&&setTimeout(()=>{i=null,s(new y(`timeout ${e} of ms exceeded`,y.ETIMEDOUT))},e),a=()=>{n&&(i&&clearTimeout(i),i=null,n.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),n=null)};n.forEach(u=>u.addEventListener("abort",s));let{signal:p}=t;return p.unsubscribe=()=>c.asap(a),p}},so=ys;var Es=function*(n,e){let o=n.byteLength;if(!e||o{let r=Ds(n,e),s=0,i,a=p=>{i||(i=!0,t&&t(p))};return new ReadableStream({async pull(p){try{let{done:u,value:l}=await r.next();if(u){a(),p.close();return}let T=l.byteLength;if(o){let b=s+=T;o(b)}p.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(p){return a(p),r.return()}},{highWaterMark:2})};var ct=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ao=ct&&typeof ReadableStream=="function",vs=ct&&(typeof TextEncoder=="function"?(n=>e=>n.encode(e))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),co=(n,...e)=>{try{return!!n(...e)}catch{return!1}},Ns=ao&&co(()=>{let n=!1,e=new Request(C.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!e}),io=64*1024,Wt=ao&&co(()=>c.isReadableStream(new Response("").body)),at={stream:Wt&&(n=>n.body)};ct&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!at[e]&&(at[e]=c.isFunction(n[e])?o=>o[e]():(o,t)=>{throw new y(`Response type '${e}' is not supported`,y.ERR_NOT_SUPPORT,t)})})})(new Response);var Rs=async n=>{if(n==null)return 0;if(c.isBlob(n))return n.size;if(c.isSpecCompliantForm(n))return(await new Request(C.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(c.isArrayBufferView(n)||c.isArrayBuffer(n))return n.byteLength;if(c.isURLSearchParams(n)&&(n=n+""),c.isString(n))return(await vs(n)).byteLength},xs=async(n,e)=>{let o=c.toFiniteNumber(n.getContentLength());return o??Rs(e)},uo=ct&&(async n=>{let{url:e,method:o,data:t,signal:r,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:p,responseType:u,headers:l,withCredentials:T="same-origin",fetchOptions:b}=it(n);u=u?(u+"").toLowerCase():"text";let I=so([r,s&&s.toAbortSignal()],i),g,D=I&&I.unsubscribe&&(()=>{I.unsubscribe()}),P;try{if(p&&Ns&&o!=="get"&&o!=="head"&&(P=await xs(l,t))!==0){let U=new Request(e,{method:"POST",body:t,duplex:"half"}),Y;if(c.isFormData(t)&&(Y=U.headers.get("content-type"))&&l.setContentType(Y),U.body){let[J,je]=zt(P,de(Yt(p)));t=Gt(U.body,io,J,je)}}c.isString(T)||(T=T?"include":"omit");let A="credentials"in Request.prototype;g=new Request(e,{...b,signal:I,method:o.toUpperCase(),headers:l.normalize().toJSON(),body:t,duplex:"half",credentials:A?T:void 0});let O=await fetch(g),_=Wt&&(u==="stream"||u==="response");if(Wt&&(a||_&&D)){let U={};["status","statusText","headers"].forEach(gn=>{U[gn]=O[gn]});let Y=c.toFiniteNumber(O.headers.get("content-length")),[J,je]=a&&zt(Y,de(Yt(a),!0))||[];O=new Response(Gt(O.body,io,J,()=>{je&&je(),D&&D()}),U)}u=u||"text";let $=await at[c.findKey(at,u)||"text"](O,n);return!_&&D&&D(),await new Promise((U,Y)=>{Ie(U,Y,{data:$,headers:M.from(O.headers),status:O.status,statusText:O.statusText,config:n,request:g})})}catch(A){throw D&&D(),A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,n,g),{cause:A.cause||A}):y.from(A,A&&A.code,n,g)}});var Xt={http:tt,xhr:ro,fetch:uo};c.forEach(Xt,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});var mo=n=>`- ${n}`,Is=n=>c.isFunction(n)||n===null||n===!1,ut={getAdapter:n=>{n=c.isArray(n)?n:[n];let{length:e}=n,o,t,r={};for(let s=0;s`adapter ${a} `+(p===!1?"is not supported by the environment":"is not available in the build")),i=e?s.length>1?`since :
-`+s.map(mo).join(`
-`):" "+mo(s[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return t},adapters:Xt};function Qt(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new q(null,n)}function dt(n){return Qt(n),n.headers=M.from(n.headers),n.data=Re.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),ut.getAdapter(n.adapter||ce.adapter)(n).then(function(t){return Qt(n),t.data=Re.call(n,n.transformResponse,t),t.headers=M.from(t.headers),t},function(t){return xe(t)||(Qt(n),t&&t.response&&(t.response.data=Re.call(n,n.transformResponse,t.response),t.response.headers=M.from(t.response.headers))),Promise.reject(t)})}var mt="1.9.0";var pt={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{pt[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});var po={};pt.transitional=function(e,o,t){function r(s,i){return"[Axios v"+mt+"] Transitional option '"+s+"'"+i+(t?". "+t:"")}return(s,i,a)=>{if(e===!1)throw new y(r(i," has been removed"+(o?" in "+o:"")),y.ERR_DEPRECATED);return o&&!po[i]&&(po[i]=!0,console.warn(r(i," has been deprecated since v"+o+" and will be removed in the near future"))),e?e(s,i,a):!0}};pt.spelling=function(e){return(o,t)=>(console.warn(`${t} is likely a misspelling of ${e}`),!0)};function Ss(n,e,o){if(typeof n!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);let t=Object.keys(n),r=t.length;for(;r-- >0;){let s=t[r],i=e[s];if(i){let a=n[s],p=a===void 0||i(a,s,n);if(p!==!0)throw new y("option "+s+" must be "+p,y.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new y("Unknown option "+s,y.ERR_BAD_OPTION)}}var Le={assertOptions:Ss,validators:pt};var H=Le.validators,me=class{constructor(e){this.defaults=e||{},this.interceptors={request:new kt,response:new kt}}async request(e,o){try{return await this._request(e,o)}catch(t){if(t instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;let s=r.stack?r.stack.replace(/^.+\n/,""):"";try{t.stack?s&&!String(t.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(t.stack+=`
-`+s):t.stack=s}catch{}}throw t}}_request(e,o){typeof e=="string"?(o=o||{},o.url=e):o=e||{},o=F(this.defaults,o);let{transitional:t,paramsSerializer:r,headers:s}=o;t!==void 0&&Le.assertOptions(t,{silentJSONParsing:H.transitional(H.boolean),forcedJSONParsing:H.transitional(H.boolean),clarifyTimeoutError:H.transitional(H.boolean)},!1),r!=null&&(c.isFunction(r)?o.paramsSerializer={serialize:r}:Le.assertOptions(r,{encode:H.function,serialize:H.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),Le.assertOptions(o,{baseUrl:H.spelling("baseURL"),withXsrfToken:H.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let i=s&&c.merge(s.common,s[o.method]);s&&c.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),o.headers=M.concat(i,s);let a=[],p=!0;this.interceptors.request.forEach(function(D){typeof D.runWhen=="function"&&D.runWhen(o)===!1||(p=p&&D.synchronous,a.unshift(D.fulfilled,D.rejected))});let u=[];this.interceptors.response.forEach(function(D){u.push(D.fulfilled,D.rejected)});let l,T=0,b;if(!p){let g=[dt.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,u),b=g.length,l=Promise.resolve(o);T{if(!t._listeners)return;let s=t._listeners.length;for(;s-- >0;)t._listeners[s](r);t._listeners=null}),this.promise.then=r=>{let s,i=new Promise(a=>{t.subscribe(a),s=a}).then(r);return i.cancel=function(){t.unsubscribe(s)},i},e(function(s,i,a){t.reason||(t.reason=new q(s,i,a),o(t.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let o=this._listeners.indexOf(e);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){let e=new AbortController,o=t=>{e.abort(t)};return this.subscribe(o),e.signal.unsubscribe=()=>this.unsubscribe(o),e.signal}static source(){let e;return{token:new n(function(r){e=r}),cancel:e}}},lo=Zt;function en(n){return function(o){return n.apply(null,o)}}function tn(n){return c.isObject(n)&&n.isAxiosError===!0}var nn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(nn).forEach(([n,e])=>{nn[e]=n});var fo=nn;function To(n){let e=new Ce(n),o=Ee(Ce.prototype.request,e);return c.extend(o,Ce.prototype,e,{allOwnKeys:!0}),c.extend(o,e,null,{allOwnKeys:!0}),o.create=function(r){return To(F(n,r))},o}var w=To(ce);w.Axios=Ce;w.CanceledError=q;w.CancelToken=lo;w.isCancel=xe;w.VERSION=mt;w.toFormData=K;w.AxiosError=y;w.Cancel=w.CanceledError;w.all=function(e){return Promise.all(e)};w.spread=en;w.isAxiosError=tn;w.mergeConfig=F;w.AxiosHeaders=M;w.formToJSON=n=>rt(c.isHTMLForm(n)?new FormData(n):n);w.getAdapter=ut.getAdapter;w.HttpStatusCode=fo;w.default=w;var lt=w;var{Axios:yd,AxiosError:go,CanceledError:Ed,isCancel:Dd,CancelToken:bd,VERSION:vd,all:Nd,Cancel:Rd,isAxiosError:xd,spread:Id,toFormData:Sd,AxiosHeaders:Ld,HttpStatusCode:Cd,formToJSON:Ad,getAdapter:wd,mergeConfig:Od}=lt;var j=class n extends go{constructor(o,t,r,s,i,a){super(o,t,r,s,i);this.isNlicError=!0;this.name="NlicError",a&&(this.stack=a),Object.setPrototypeOf(this,n.prototype)}};var ho=function(n={}){let e={...n};if(e.amountFix&&e.amountPercent)throw new j('Properties "amountFix" and "amountPercent" cannot be used at the same time');return R(e,{setTotalPrice(t){m(e,"totalPrice",t)},getTotalPrice(t){return d(e,"totalPrice",t)},setCurrency(t){m(e,"currency",t)},getCurrency(t){return d(e,"currency",t)},setAmountFix(t){m(e,"amountFix",t)},getAmountFix(t){return d(e,"amountFix",t)},setAmountPercent(t){m(e,"amountPercent",t)},getAmountPercent(t){return d(e,"amountPercent",t)},toString(){let t=this.getTotalPrice(),r=this.getCurrency(),s=this.getAmountPercent()?`${this.getAmountPercent()}%`:this.getAmountFix();return t&&r&&s?`${t};${r};${s}`:""}},ho,{set:(t,r)=>{r==="amountFix"&&delete t.amountPercent,r==="amountPercent"&&delete t.amountFix}})},ft=ho;var ee=n=>{let e=N(n),o=e.discount;return delete e.discount,o&&(e.discounts=o.map(t=>ft(t))),Ge(e)};var Po=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setName(t){m(e,"name",t)},getName(t){return d(e,"name",t)},setLicensingModel(t){m(e,"licensingModel",t)},getLicensingModel(t){return d(e,"licensingModel",t)},setMaxCheckoutValidity(t){m(e,"maxCheckoutValidity",t)},getMaxCheckoutValidity(t){return d(e,"maxCheckoutValidity",t)},setYellowThreshold(t){m(e,"yellowThreshold",t)},getYellowThreshold(t){return d(e,"yellowThreshold",t)},setRedThreshold(t){m(e,"redThreshold",t)},getRedThreshold(t){return d(e,"redThreshold",t)},setProductNumber(t){m(e,"productNumber",t)},getProductNumber(t){return d(e,"productNumber",t)},serialize(){return L(e,{ignore:["inUse"]})}},Po)},Tt=Po;var te=n=>Tt(N(n));var yo=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setExpirationTime(t){m(e,"expirationTime",t)},getExpirationTime(t){return d(e,"expirationTime",t)},setTokenType(t){m(e,"tokenType",t)},getTokenType(t){return d(e,"tokenType",t)},setLicenseeNumber(t){m(e,"licenseeNumber",t)},getLicenseeNumber(t){return d(e,"licenseeNumber",t)},setAction(t){m(e,"action",t)},getAction(t){return d(e,"action",t)},setApiKeyRole(t){m(e,"apiKeyRole",t)},getApiKeyRole(t){return d(e,"apiKeyRole",t)},setBundleNumber(t){m(e,"bundleNumber",t)},getBundleNumber(t){return d(e,"bundleNumber",t)},setBundlePrice(t){m(e,"bundlePrice",t)},getBundlePrice(t){return d(e,"bundlePrice",t)},setProductNumber(t){m(e,"productNumber",t)},getProductNumber(t){return d(e,"productNumber",t)},setPredefinedShoppingItem(t){m(e,"predefinedShoppingItem",t)},getPredefinedShoppingItem(t){return d(e,"predefinedShoppingItem",t)},setSuccessURL(t){m(e,"successURL",t)},getSuccessURL(t){return d(e,"successURL",t)},setSuccessURLTitle(t){m(e,"successURLTitle",t)},getSuccessURLTitle(t){return d(e,"successURLTitle",t)},setCancelURL(t){m(e,"cancelURL",t)},getCancelURL(t){return d(e,"cancelURL",t)},setCancelURLTitle(t){m(e,"cancelURLTitle",t)},getCancelURLTitle(t){return d(e,"cancelURLTitle",t)},getShopURL(t){return d(e,"shopURL",t)},serialize(){return L(e,{ignore:["shopURL"]})}},yo)},gt=yo;var pe=n=>{let e=N(n),{expirationTime:o}=e;return o&&typeof o=="string"&&(e.expirationTime=new Date(o)),gt(e)};var on=class{constructor(e,o){this.transaction=e,this.license=o}setTransaction(e){this.transaction=e}getTransaction(){return this.transaction}setLicense(e){this.license=e}getLicense(){return this.license}},ht=(n,e)=>new on(n,e);var Eo=function(n={}){let e={...n};return R(e,{setActive(t){m(e,"active",t)},getActive(t){return d(e,"active",t)},setNumber(t){m(e,"number",t)},getNumber(t){return d(e,"number",t)},setStatus(t){m(e,"status",t)},getStatus(t){return d(e,"status",t)},setSource(t){m(e,"source",t)},getSource(t){return d(e,"source",t)},setGrandTotal(t){m(e,"grandTotal",t)},getGrandTotal(t){return d(e,"grandTotal",t)},setDiscount(t){m(e,"discount",t)},getDiscount(t){return d(e,"discount",t)},setCurrency(t){m(e,"currency",t)},getCurrency(t){return d(e,"currency",t)},setDateCreated(t){m(e,"dateCreated",t)},getDateCreated(t){return d(e,"dateCreated",t)},setDateClosed(t){m(e,"dateClosed",t)},getDateClosed(t){return d(e,"dateClosed",t)},setPaymentMethod(t){m(e,"paymentMethod",t)},getPaymentMethod(t){return d(e,"paymentMethod",t)},setLicenseTransactionJoins(t){m(e,"licenseTransactionJoins",t)},getLicenseTransactionJoins(t){return d(e,"licenseTransactionJoins",t)},serialize(){return L(e,{ignore:["licenseTransactionJoins","inUse"]})}},Eo)},Ae=Eo;var ne=n=>{let e=N(n),{dateCreated:o,dateClosed:t}=e;o&&typeof o=="string"&&(e.dateCreated=new Date(o)),t&&typeof t=="string"&&(e.dateClosed=new Date(t));let r=e.licenseTransactionJoin;return delete e.licenseTransactionJoin,r&&(e.licenseTransactionJoins=r.map(({transactionNumber:s,licenseNumber:i})=>{let a=Ae({number:s}),p=re({number:i});return ht(a,p)})),Ae(e)};var Do=lt.create(),bo=null,vo=[],No=n=>{Do=n},Pt=()=>Do,rn=n=>{bo=n},Ro=()=>bo,sn=n=>{vo=n},xo=()=>vo;var an={name:"netlicensing-client",version:"1.2.39",description:"JavaScript Wrapper for Labs64 NetLicensing RESTful API",keywords:["labs64","netlicensing","licensing","licensing-as-a-service","license","license-management","software-license","client","restful","restful-api","javascript","wrapper","api","client"],license:"Apache-2.0",author:"Labs64 GmbH",homepage:"https://netlicensing.io",repository:{type:"git",url:"https://github.com/Labs64/NetLicensingClient-javascript"},bugs:{url:"https://github.com/Labs64/NetLicensingClient-javascript/issues"},contributors:[{name:"Ready Brown",email:"ready.brown@hotmail.de",url:"https://github.com/r-brown"},{name:"Viacheslav Rudkovskiy",email:"viachaslau.rudkovski@labs64.de",url:"https://github.com/v-rudkovskiy"},{name:"Andrei Yushkevich",email:"yushkevich@me.com",url:"https://github.com/yushkevich"}],main:"dist/index.cjs",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.mjs",require:"./dist/index.cjs"}},files:["dist"],scripts:{build:"tsup",release:"npm run lint:typecheck && npm run test && npm run build",dev:"tsup --watch",test:"vitest run","test:dev":"vitest watch",lint:"eslint --ext .js,.mjs,.ts src",typecheck:"tsc --noEmit","lint:typecheck":"npm run lint && npm run typecheck"},peerDependencies:{axios:"^1.9.0"},dependencies:{},devDependencies:{"@eslint/js":"^9.24.0","@types/node":"^22.14.0","@typescript-eslint/eslint-plugin":"^8.29.1","@typescript-eslint/parser":"^8.29.1","@vitest/eslint-plugin":"^1.1.43",axios:"^1.9.0",eslint:"^9.24.0","eslint-plugin-import":"^2.31.0",prettier:"3.5.3",tsup:"^8.4.0",typescript:"^5.8.3","typescript-eslint":"^8.29.1",vitest:"^3.1.1"},engines:{node:">= 16.9.0",npm:">= 8.0.0"},browserslist:["> 1%","last 2 versions","not ie <= 10"]};var yt=n=>{let e=[],o=(t,r)=>{if(t!=null){if(Array.isArray(t)){t.forEach(s=>{o(s,r?`${r}`:"")});return}if(t instanceof Date){e.push(`${r}=${encodeURIComponent(t.toISOString())}`);return}if(typeof t=="object"){Object.keys(t).forEach(s=>{let i=t[s];o(i,r?`${r}[${encodeURIComponent(s)}]`:encodeURIComponent(s))});return}e.push(`${r}=${encodeURIComponent(t)}`)}};return o(n),e.join("&")};var le=async(n,e,o,t,r)=>{let s={Accept:"application/json","X-Requested-With":"XMLHttpRequest"};typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(s["User-agent"]=`NetLicensing/Javascript ${an.version}/node&${process.version}`);let i={method:e,headers:s,url:encodeURI(`${n.getBaseUrl()}/${o}`),responseType:"json",transformRequest:(p,u)=>u["Content-Type"]==="application/x-www-form-urlencoded"?yt(p):(u["NetLicensing-Origin"]||(u["NetLicensing-Origin"]=`NetLicensing/Javascript ${an.version}`),p)};switch(["put","post","patch"].indexOf(e.toLowerCase())>=0?(i.method==="post"&&(s["Content-Type"]="application/x-www-form-urlencoded"),i.data=t):i.params=t,n.getSecurityMode()){case V.BASIC_AUTHENTICATION:{if(!n.getUsername())throw new j('Missing parameter "username"');if(!n.getPassword())throw new j('Missing parameter "password"');i.auth={username:n.getUsername(),password:n.getPassword()}}break;case V.APIKEY_IDENTIFICATION:if(!n.getApiKey())throw new j('Missing parameter "apiKey"');s.Authorization=`Basic ${btoa(`apiKey:${n.getApiKey()}`)}`;break;case V.ANONYMOUS_IDENTIFICATION:break;default:throw new j("Unknown security mode")}let a=r?.axiosInstance||Pt();try{let p=await a(i),u=p.data.infos?.info||[];if(rn(p),sn(u),r?.onResponse&&r.onResponse(p),u.length>0){r?.onInfo&&r.onInfo(u);let l=u.find(({type:T})=>T==="ERROR");if(l)throw new j(l.value,l.id,p.config,p.request,p)}return p}catch(p){let u=p,l=u.response,T=l?.data?.infos?.info||[];if(rn(l||null),sn(T),p.isAxiosError){let b=p.message;if(l?.data&&T.length>0){let I=T.find(({type:g})=>g==="ERROR");I&&(b=I.value)}throw new j(b,u.code,u.config,u.request,u.response)}throw p}};var Io=(n,e,o,t)=>le(n,"get",e,o,t),So=(n,e,o,t)=>le(n,"post",e,o,t),Lo=(n,e,o,t)=>le(n,"delete",e,o,t);var Cs={setAxiosInstance(n){No(n)},getAxiosInstance(){return Pt()},getLastHttpRequestInfo(){return Ro()},getInfo(){return xo()},get(n,e,o,t){return Io(n,e,o,t)},post(n,e,o,t){return So(n,e,o,t)},delete(n,e,o,t){return Lo(n,e,o,t)},request(n,e,o,t,r){return le(n,e,o,t,r)},toQueryString(n){return yt(n)}},f=Cs;var Co=";",Ao="=",S=n=>Object.keys(n).map(e=>`${e}${Ao}${String(n[e])}`).join(Co),wo=n=>{let e={};return n.split(Co).forEach(o=>{let[t,r]=o.split(Ao);e[t]=r}),e};var cn=n=>typeof n<"u"&&typeof n!="function",we=n=>cn(n)?typeof n=="number"?!Number.isNaN(n):!0:!1,v=(n,e)=>{if(n===null)throw new TypeError(`Parameter "${e}" cannot be null.`);if(!we(n))throw new TypeError(`Parameter "${e}" has an invalid value.`)},E=(n,e)=>{if(v(n,e),!n)throw new TypeError(`Parameter "${e}" cannot be empty.`)};var Oo=function(n,e){let o=parseInt(e?.pagenumber||"0",10),t=parseInt(e?.itemsnumber||"0",10),r=parseInt(e?.totalpages||"0",10),s=parseInt(e?.totalitems||"0",10),i={getContent(){return n},getPagination(){return{pageNumber:o,itemsNumber:t,totalPages:r,totalItems:s,hasNext:r>o+1}},getPageNumber(){return o},getItemsNumber(){return t},getTotalPages(){return r},getTotalItems(){return s},hasNext(){return r>o+1}};return new Proxy(n,{get(a,p,u){return Object.hasOwn(i,p)?i[p]:Reflect.get(a,p,u)},set(a,p,u,l){return Reflect.set(a,p,u,l)},getPrototypeOf(){return Oo.prototype||null}})},x=Oo;var fe=h.Bundle.ENDPOINT_PATH,As=h.Bundle.ENDPOINT_OBTAIN_PATH,Et=h.Bundle.TYPE,ws={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${fe}/${e}`,{},o)).data.items?.item.find(s=>s.type===Et);return G(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,fe,t,o)).data.items,i=s?.item.filter(a=>a.type===Et).map(a=>G(a));return x(i||[],s)},async create(n,e,o){v(e,"bundle");let r=(await f.post(n,fe,e.serialize(),o)).data.items?.item.find(s=>s.type===Et);return G(r)},async update(n,e,o,t){E(e,"number"),v(o,"bundle");let s=(await f.post(n,`${fe}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===Et);return G(s)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${fe}/${e}`,{forceCascade:!!o},t)},async obtain(n,e,o,t){E(e,"number"),E(o,"licenseeNumber");let r={[h.Licensee.LICENSEE_NUMBER]:o};return(await f.post(n,`${fe}/${e}/${As}`,r,t)).data.items?.item.filter(p=>p.type===h.License.TYPE)?.map(p=>z(p))||[]}},Mo=ws;var un=class{constructor(){this.validations={}}getValidators(){return this.validations}setValidation(e){return this.validations[e.productModuleNumber]=e,this}getValidation(e,o){return this.validations[e]||o}setProductModuleValidation(e){return this.setValidation(e)}getProductModuleValidation(e,o){return this.getValidation(e,o)}setTtl(e){if(!we(e))throw new TypeError(`Bad ttl:${e.toString()}`);return this.ttl=new Date(e),this}getTtl(){return this.ttl}toString(){let e="ValidationResult [";return Object.keys(this.validations).forEach(o=>{e+=`ProductModule<${o}>`,o in this.validations&&(e+=JSON.stringify(this.validations[o]))}),e+="]",e}},Dt=()=>new un;var oe=h.Licensee.ENDPOINT_PATH,Os=h.Licensee.ENDPOINT_PATH_VALIDATE,Ms=h.Licensee.ENDPOINT_PATH_TRANSFER,bt=h.Licensee.TYPE,_s={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${oe}/${e}`,{},o)).data.items?.item.find(s=>s.type===bt);return W(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,oe,t,o)).data.items,i=s?.item.filter(a=>a.type===bt).map(a=>W(a));return x(i||[],s)},async create(n,e,o,t){v(o,"licensee");let r=o.serialize();e&&(r.productNumber=e);let i=(await f.post(n,oe,r,t)).data.items?.item.find(a=>a.type===bt);return W(i)},async update(n,e,o,t){E(e,"number"),v(o,"licensee");let s=(await f.post(n,`${oe}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===bt);return W(s)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${oe}/${e}`,{forceCascade:!!o},t)},async validate(n,e,o,t){E(e,"number");let r={};if(o){let u=o.productNumber;u&&(r.productNumber=u);let l=o.licenseeProperties;Object.keys(l).forEach(b=>{r[b]=o.getLicenseeProperty(b)}),o.isForOfflineUse()&&(r.forOfflineUse=!0),o.isDryRun()&&(r.dryRun=!0);let T=o.getParameters();Object.keys(T).forEach((b,I)=>{r[`${h.ProductModule.PRODUCT_MODULE_NUMBER}${I}`]=b;let g=T[b];g&&Object.keys(g).forEach(D=>{r[D+I]=g[D]})})}let s=await f.post(n,`${oe}/${e}/${Os}`,r,t),i=Dt(),a=s.data.ttl;return a&&i.setTtl(a),s.data.items?.item.filter(u=>u.type===h.Validation.TYPE)?.forEach(u=>{i.setValidation(N(u))}),i},transfer(n,e,o,t){E(e,"number"),E(o,"sourceLicenseeNumber");let r={sourceLicenseeNumber:o};return f.post(n,`${oe}/${e}/${Ms}`,r,t)}},_o=_s;var Oe=h.License.ENDPOINT_PATH,vt=h.License.TYPE,Us={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${Oe}/${e}`,{},o)).data.items?.item.find(s=>s.type===vt);return z(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,Oe,t,o)).data.items,i=s?.item.filter(a=>a.type===vt).map(a=>z(a));return x(i||[],s)},async create(n,e,o,t,r,s){v(r,"license");let i=r.serialize();e&&(i.licenseeNumber=e),o&&(i.licenseTemplateNumber=o),t&&(i.transactionNumber=t);let p=(await f.post(n,Oe,i,s)).data.items?.item.find(u=>u.type===vt);return z(p)},async update(n,e,o,t,r){E(e,"number"),v(t,"license");let s=t.serialize();o&&(s.transactionNumber=o);let a=(await f.post(n,`${Oe}/${e}`,s,r)).data.items?.item.find(p=>p.type===vt);return z(a)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${Oe}/${e}`,{forceCascade:!!o},t)}},Uo=Us;var Me=h.LicenseTemplate.ENDPOINT_PATH,Nt=h.LicenseTemplate.TYPE,ks={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${Me}/${e}`,{},o)).data.items?.item.find(s=>s.type===Nt);return X(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,Me,t,o)).data.items,i=s?.item.filter(a=>a.type===Nt).map(a=>X(a));return x(i||[],s)},async create(n,e,o,t){v(o,"licenseTemplate");let r=o.serialize();e&&(r.productModuleNumber=e);let i=(await f.post(n,Me,r,t)).data.items?.item.find(a=>a.type===Nt);return X(i)},async update(n,e,o,t){E(e,"number"),v(o,"licenseTemplate");let s=(await f.post(n,`${Me}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===Nt);return X(s)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${Me}/${e}`,{forceCascade:!!o},t)}},ko=ks;var _e=h.Notification.ENDPOINT_PATH,Rt=h.Notification.TYPE,js={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${_e}/${e}`,{},o)).data.items?.item.find(s=>s.type===Rt);return Q(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,_e,t,o)).data.items,i=s?.item.filter(a=>a.type===Rt).map(a=>Q(a));return x(i||[],s)},async create(n,e,o){v(e,"notification");let r=(await f.post(n,_e,e.serialize(),o)).data.items?.item.find(s=>s.type===Rt);return Q(r)},async update(n,e,o,t){E(e,"number"),v(o,"notification");let s=(await f.post(n,`${_e}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===Rt);return Q(s)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${_e}/${e}`,{forceCascade:!!o},t)}},jo=js;var dn=h.PaymentMethod.ENDPOINT_PATH,mn=h.PaymentMethod.TYPE,Bs={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${dn}/${e}`,{},o)).data.items?.item.find(s=>s.type===mn);return se(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,dn,t,o)).data.items,i=s?.item.filter(a=>a.type===mn).map(a=>se(a));return x(i||[],s)},async update(n,e,o,t){E(e,"number"),v(o,"paymentMethod");let s=(await f.post(n,`${dn}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===mn);return se(s)}},Bo=Bs;var Ue=h.ProductModule.ENDPOINT_PATH,xt=h.ProductModule.TYPE,Fs={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${Ue}/${e}`,{},o)).data.items?.item.find(s=>s.type===xt);return te(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,Ue,t,o)).data.items,i=s?.item.filter(a=>a.type===xt).map(a=>te(a));return x(i||[],s)},async create(n,e,o,t){v(o,"productModule");let r=o.serialize();e&&(r.productNumber=e);let i=(await f.post(n,Ue,r,t)).data.items?.item.find(a=>a.type===xt);return te(i)},async update(n,e,o,t){E(e,"number"),v(o,"productModule");let s=(await f.post(n,`${Ue}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===xt);return te(s)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${Ue}/${e}`,{forceCascade:!!o},t)}},Fo=Fs;var ke=h.Product.ENDPOINT_PATH,It=h.Product.TYPE,Vs={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${ke}/${e}`,{},o)).data.items?.item.find(s=>s.type===It);return ee(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,ke,t,o)).data.items,i=s?.item.filter(a=>a.type===It).map(a=>ee(a));return x(i||[],s)},async create(n,e,o){v(e,"product");let r=(await f.post(n,ke,e.serialize(),o)).data.items?.item.find(s=>s.type===It);return ee(r)},async update(n,e,o,t){E(e,"number"),v(o,"product");let s=(await f.post(n,`${ke}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===It);return ee(s)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${ke}/${e}`,{forceCascade:!!o},t)}},Vo=Vs;var St=h.Token.ENDPOINT_PATH,pn=h.Token.TYPE,qs={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${St}/${e}`,{},o)).data.items?.item.find(s=>s.type===pn);return pe(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,St,t,o)).data.items,i=s?.item.filter(a=>a.type===pn).map(a=>pe(a));return x(i||[],s)},async create(n,e,o){v(e,"token");let r=(await f.post(n,St,e.serialize(),o)).data.items?.item.find(s=>s.type===pn);return pe(r)},delete(n,e,o,t){return E(e,"number"),f.delete(n,`${St}/${e}`,{forceCascade:!!o},t)}},qo=qs;var Lt=h.Transaction.ENDPOINT_PATH,Ct=h.Transaction.TYPE,Hs={async get(n,e,o){E(e,"number");let r=(await f.get(n,`${Lt}/${e}`,{},o)).data.items?.item.find(s=>s.type===Ct);return ne(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let s=(await f.get(n,Lt,t,o)).data.items,i=s?.item.filter(a=>a.type===Ct).map(a=>ne(a));return x(i||[],s)},async create(n,e,o){v(e,"transaction");let r=(await f.post(n,Lt,e.serialize(),o)).data.items?.item.find(s=>s.type===Ct);return ne(r)},async update(n,e,o,t){E(e,"number"),v(o,"transaction");let s=(await f.post(n,`${Lt}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===Ct);return ne(s)}},Ho=Hs;var ln=h.Utility.ENDPOINT_PATH,$s={async listLicenseTypes(n,e){let o=`${ln}/${h.Utility.ENDPOINT_PATH_LICENSE_TYPES}`,r=(await f.get(n,o,void 0,e)).data.items,s=h.Utility.LICENSE_TYPE,i=r?.item.filter(a=>a.type===s).map(a=>N(a).name);return x(i||[],r)},async listLicensingModels(n,e){let o=`${ln}/${h.Utility.ENDPOINT_PATH_LICENSING_MODELS}`,r=(await f.get(n,o,void 0,e)).data.items,s=h.Utility.LICENSING_MODEL_TYPE,i=r?.item.filter(a=>a.type===s).map(a=>N(a).name);return x(i||[],r)},async listCountries(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:S(e));let r=`${ln}/${h.Utility.ENDPOINT_PATH_COUNTRIES}`,i=(await f.get(n,r,t,o)).data.items,a=h.Utility.COUNTRY_TYPE,p=i?.item.filter(u=>u.type===a).map(u=>$e(u));return x(p||[],i)}},$o=$s;var fn=class{constructor(e){this.baseUrl=e?.baseUrl||"https://go.netlicensing.io/core/v2/rest",this.securityMode=e?.securityMode||V.BASIC_AUTHENTICATION,this.username=e?.username,this.password=e?.password,this.apiKey=e?.apiKey,this.publicKey=e?.publicKey}setBaseUrl(e){return this.baseUrl=e,this}getBaseUrl(){return this.baseUrl}setSecurityMode(e){return this.securityMode=e,this}getSecurityMode(){return this.securityMode}setUsername(e){return this.username=e,this}getUsername(e){return this.username||e}setPassword(e){return this.password=e,this}getPassword(e){return this.password||e}setApiKey(e){return this.apiKey=e,this}getApiKey(e){return this.apiKey||e}setPublicKey(e){return this.publicKey=e,this}getPublicKey(e){return this.publicKey||e}},zo=n=>new fn(n);var Tn=class{constructor(){this.parameters={},this.licenseeProperties={}}setProductNumber(e){return this.productNumber=e,this}getProductNumber(){return this.productNumber}setLicenseeName(e){return this.licenseeProperties.licenseeName=e,this}getLicenseeName(){return this.licenseeProperties.licenseeName}setLicenseeSecret(e){return this.licenseeProperties.licenseeSecret=e,this}getLicenseeSecret(){return this.licenseeProperties.licenseeSecret}getLicenseeProperties(){return this.licenseeProperties}setLicenseeProperty(e,o){return this.licenseeProperties[e]=o,this}getLicenseeProperty(e,o){return this.licenseeProperties[e]||o}setForOfflineUse(e){return this.forOfflineUse=e,this}isForOfflineUse(){return!!this.forOfflineUse}setDryRun(e){return this.dryRun=e,this}isDryRun(){return!!this.dryRun}getParameters(){return this.parameters}setParameter(e,o){return this.parameters[e]=o,this}getParameter(e){return this.parameters[e]}getProductModuleValidationParameters(e){return this.getParameter(e)}setProductModuleValidationParameters(e,o){return this.setParameter(e,o)}},Yo=()=>new Tn;return Xo(zs);})();
+"use strict";var NetLicensing=(()=>{var qt=Object.defineProperty;var sr=Object.getOwnPropertyDescriptor;var ir=Object.getOwnPropertyNames;var ar=Object.prototype.hasOwnProperty;var wn=(n,e)=>{for(var o in e)qt(n,o,{get:e[o],enumerable:!0})},cr=(n,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ir(e))!ar.call(n,r)&&r!==o&&qt(n,r,{get:()=>e[r],enumerable:!(t=sr(e,r))||t.enumerable});return n};var ur=n=>cr(qt({},"__esModule",{value:!0}),n);var ri={};wn(ri,{ApiKeyRole:()=>_n,Bundle:()=>Ze,BundleService:()=>zo,Constants:()=>h,Context:()=>nr,Country:()=>et,License:()=>de,LicenseService:()=>Ko,LicenseTemplate:()=>ot,LicenseTemplateService:()=>Jo,LicenseTransactionJoin:()=>vt,LicenseType:()=>Re,Licensee:()=>nt,LicenseeSecretMode:()=>We,LicenseeService:()=>Yo,LicensingModel:()=>Mn,NlicError:()=>k,NodeSecretMode:()=>Un,Notification:()=>rt,NotificationEvent:()=>Ne,NotificationProtocol:()=>ve,NotificationService:()=>Go,Page:()=>I,PaymentMethod:()=>st,PaymentMethodEnum:()=>jn,PaymentMethodService:()=>Wo,Product:()=>it,ProductDiscount:()=>bt,ProductModule:()=>Rt,ProductModuleService:()=>Xo,ProductService:()=>Qo,SecurityMode:()=>Y,Service:()=>g,TimeVolumePeriod:()=>Xe,Token:()=>Nt,TokenService:()=>Zo,TokenType:()=>Ie,Transaction:()=>Fe,TransactionService:()=>er,TransactionSource:()=>Qe,TransactionStatus:()=>xe,UtilityService:()=>tr,ValidationParameters:()=>or,ValidationResults:()=>St,defineEntity:()=>v,ensureNotEmpty:()=>D,ensureNotNull:()=>R,filterDecode:()=>Ho,filterEncode:()=>x,isDefined:()=>yn,isValid:()=>qe,itemToBundle:()=>ee,itemToCountry:()=>tt,itemToLicense:()=>J,itemToLicenseTemplate:()=>ne,itemToLicensee:()=>te,itemToNotification:()=>oe,itemToObject:()=>N,itemToPaymentMethod:()=>me,itemToProduct:()=>se,itemToProductModule:()=>ie,itemToToken:()=>ye,itemToTransaction:()=>ae,serialize:()=>C});var dr=Object.freeze({DISABLED:"DISABLED",PREDEFINED:"PREDEFINED",CLIENT:"CLIENT"}),We=dr;var mr=Object.freeze({FEATURE:"FEATURE",TIMEVOLUME:"TIMEVOLUME",FLOATING:"FLOATING",QUANTITY:"QUANTITY"}),Re=mr;var pr=Object.freeze({LICENSEE_CREATED:"LICENSEE_CREATED",LICENSE_CREATED:"LICENSE_CREATED",WARNING_LEVEL_CHANGED:"WARNING_LEVEL_CHANGED",PAYMENT_TRANSACTION_PROCESSED:"PAYMENT_TRANSACTION_PROCESSED"}),Ne=pr;var lr=Object.freeze({WEBHOOK:"WEBHOOK"}),ve=lr;var fr=Object.freeze({BASIC_AUTHENTICATION:"BASIC_AUTH",APIKEY_IDENTIFICATION:"APIKEY",ANONYMOUS_IDENTIFICATION:"ANONYMOUS"}),Y=fr;var gr=Object.freeze({DAY:"DAY",WEEK:"WEEK",MONTH:"MONTH",YEAR:"YEAR"}),Xe=gr;var Tr=Object.freeze({DEFAULT:"DEFAULT",SHOP:"SHOP",APIKEY:"APIKEY",ACTION:"ACTION"}),Ie=Tr;var Pr=Object.freeze({SHOP:"SHOP",AUTO_LICENSE_CREATE:"AUTO_LICENSE_CREATE",AUTO_LICENSE_UPDATE:"AUTO_LICENSE_UPDATE",AUTO_LICENSE_DELETE:"AUTO_LICENSE_DELETE",AUTO_LICENSEE_CREATE:"AUTO_LICENSEE_CREATE",AUTO_LICENSEE_DELETE:"AUTO_LICENSEE_DELETE",AUTO_LICENSEE_VALIDATE:"AUTO_LICENSEE_VALIDATE",AUTO_LICENSETEMPLATE_DELETE:"AUTO_LICENSETEMPLATE_DELETE",AUTO_PRODUCTMODULE_DELETE:"AUTO_PRODUCTMODULE_DELETE",AUTO_PRODUCT_DELETE:"AUTO_PRODUCT_DELETE",AUTO_LICENSES_TRANSFER:"AUTO_LICENSES_TRANSFER",SUBSCRIPTION_UPDATE:"SUBSCRIPTION_UPDATE",RECURRING_PAYMENT:"RECURRING_PAYMENT",CANCEL_RECURRING_PAYMENT:"CANCEL_RECURRING_PAYMENT",OBTAIN_BUNDLE:"OBTAIN_BUNDLE"}),Qe=Pr;var hr=Object.freeze({PENDING:"PENDING",CLOSED:"CLOSED",CANCELLED:"CANCELLED"}),xe=hr;var h={LicenseeSecretMode:We,LicenseType:Re,NotificationEvent:Ne,NotificationProtocol:ve,SecurityMode:Y,TimeVolumePeriod:Xe,TokenType:Ie,TransactionSource:Qe,TransactionStatus:xe,BASIC_AUTHENTICATION:"BASIC_AUTH",APIKEY_IDENTIFICATION:"APIKEY",ANONYMOUS_IDENTIFICATION:"ANONYMOUS",FILTER:"filter",Product:{TYPE:"Product",ENDPOINT_PATH:"product"},ProductModule:{TYPE:"ProductModule",ENDPOINT_PATH:"productmodule",PRODUCT_MODULE_NUMBER:"productModuleNumber"},Licensee:{TYPE:"Licensee",ENDPOINT_PATH:"licensee",ENDPOINT_PATH_VALIDATE:"validate",ENDPOINT_PATH_TRANSFER:"transfer",LICENSEE_NUMBER:"licenseeNumber"},LicenseTemplate:{TYPE:"LicenseTemplate",ENDPOINT_PATH:"licensetemplate",LicenseType:Re},License:{TYPE:"License",ENDPOINT_PATH:"license"},Validation:{TYPE:"ProductModuleValidation"},Token:{TYPE:"Token",ENDPOINT_PATH:"token",Type:Ie},PaymentMethod:{TYPE:"PaymentMethod",ENDPOINT_PATH:"paymentmethod"},Bundle:{TYPE:"Bundle",ENDPOINT_PATH:"bundle",ENDPOINT_OBTAIN_PATH:"obtain"},Notification:{TYPE:"Notification",ENDPOINT_PATH:"notification",Protocol:ve,Event:Ne},Transaction:{TYPE:"Transaction",ENDPOINT_PATH:"transaction",Status:xe},Utility:{ENDPOINT_PATH:"utility",ENDPOINT_PATH_LICENSE_TYPES:"licenseTypes",ENDPOINT_PATH_LICENSING_MODELS:"licensingModels",ENDPOINT_PATH_COUNTRIES:"countries",LICENSING_MODEL_TYPE:"LicensingModelProperties",LICENSE_TYPE:"LicenseType",COUNTRY_TYPE:"Country"}};var yr=Object.freeze({ROLE_APIKEY_LICENSEE:"ROLE_APIKEY_LICENSEE",ROLE_APIKEY_ANALYTICS:"ROLE_APIKEY_ANALYTICS",ROLE_APIKEY_OPERATION:"ROLE_APIKEY_OPERATION",ROLE_APIKEY_MAINTENANCE:"ROLE_APIKEY_MAINTENANCE",ROLE_APIKEY_ADMIN:"ROLE_APIKEY_ADMIN"}),_n=yr;var Er=Object.freeze({TRY_AND_BUY:"TryAndBuy",SUBSCRIPTION:"Subscription",RENTAL:"Rental",FLOATING:"Floating",MULTI_FEATURE:"MultiFeature",PAY_PER_USE:"PayPerUse",PRICING_TABLE:"PricingTable",QUOTA:"Quota",NODE_LOCKED:"NodeLocked",DISCOUNT:"Discount"}),Mn=Er;var Dr=Object.freeze({PREDEFINED:"PREDEFINED",CLIENT:"CLIENT"}),Un=Dr;var br=Object.freeze({NULL:"NULL",PAYPAL:"PAYPAL",PAYPAL_SANDBOX:"PAYPAL_SANDBOX",STRIPE:"STRIPE",STRIPE_TESTING:"STRIPE_TESTING"}),jn=br;var Rr=n=>{try{return JSON.parse(n)}catch{return n}},Nr=n=>{let e={};return n?.forEach(({name:o,value:t})=>{e[o]=Rr(t)}),e},vr=n=>{let e={};return n?.forEach(o=>{let{name:t}=o;e[t]=e[t]||[],e[t].push(Bn(o))}),e},Bn=n=>n?{...Nr(n.property),...vr(n.list)}:{},N=Bn;var Vt=(n,e)=>Object.hasOwn(n,e),l=(n,e,o)=>{n[e]=o},p=(n,e,o)=>Vt(n,e)?n[e]:o;var C=(n,e={})=>{let o={},{ignore:t=[]}=e;return Object.entries(n).forEach(([r,s])=>{if(!t.includes(r)&&typeof s!="function")if(s===void 0)o[r]="";else if(typeof s=="string")o[r]=s;else if(s instanceof Date)o[r]=s.toISOString();else if(typeof s!="object"||s===null)o[r]=String(s);else try{o[r]=JSON.stringify(s)}catch{o[r]=String(s)}}),o};var Ir=function(n,e,o={},t){let r={set:[],get:[]};t?.get&&r.get.push(t.get),t?.set&&r.set.push(t.set);let s={set(i,a){l(n,i,a)},get(i,a){return p(n,i,a)},has(i){return Vt(n,i)},setProperty(i,a){this.set(i,a)},addProperty(i,a){this.set(i,a)},getProperty(i,a){return this.get(i,a)},hasProperty(i){return this.has(i)},setProperties(i){Object.entries(i).forEach(([a,d])=>{this.set(a,d)})},serialize(){return C(n)}};return new Proxy(n,{get(i,a,d){return Object.hasOwn(e,a)?e[a]:Object.hasOwn(s,a)?s[a]:(r.get.forEach(u=>{u(i,a,d)}),Reflect.get(i,a,d))},set(i,a,d,u){return r.set.forEach(m=>{m(i,a,d,u)}),Reflect.set(i,a,d,u)},getPrototypeOf(){return o.prototype||null}})},v=Ir;var kn=function(n={}){let e={...n};return v(e,{setActive(t){l(e,"active",t)},getActive(t){return p(e,"active",t)},setNumber(t){l(e,"number",t)},getNumber(t){return p(e,"number",t)},setName(t){l(e,"name",t)},getName(t){return p(e,"name",t)},setPrice(t){l(e,"price",t)},getPrice(t){return p(e,"price",t)},setCurrency(t){l(e,"currency",t)},getCurrency(t){return p(e,"currency",t)},setProductNumber(t){l(e,"productNumber",t)},getProductNumber(t){return p(e,"productNumber",t)},setLicenseTemplateNumbers(t){l(e,"licenseTemplateNumbers",t)},addLicenseTemplateNumber(t){e.licenseTemplateNumbers||(e.licenseTemplateNumbers=[]),e.licenseTemplateNumbers.push(t)},getLicenseTemplateNumbers(t){return p(e,"licenseTemplateNumbers",t)},removeLicenseTemplateNumber(t){let{licenseTemplateNumbers:r=[]}=e;r.splice(r.indexOf(t),1),e.licenseTemplateNumbers=r},getStaleLicenseTemplateNumbers(t){return p(e,"staleLicenseTemplateNumbers",t)},serialize(){let t={};return e.licenseTemplateNumbers&&(t.licenseTemplateNumbers=e.licenseTemplateNumbers.join(",")),C({...e,...t},{ignore:["staleLicenseTemplateNumbers"]})}},kn)},Ze=kn;var ee=n=>{let e=N(n),{licenseTemplateNumbers:o}=e;return o&&typeof o=="string"&&(e.licenseTemplateNumbers=o.split(",")),Ze(e)};var Fn=function(n={}){let o={...{code:"",name:"",vatPercent:0,isEu:!1},...n};return v(o,{getCode(){return o.code},getName(){return o.name},getVatPercent(){return o.vatPercent},getIsEu(){return o.isEu}},Fn)},et=Fn;var tt=n=>et(N(n));var qn=function(n={}){let e={...n};return v(e,{setActive(t){l(e,"active",t)},getActive(t){return p(e,"active",t)},setNumber(t){l(e,"number",t)},getNumber(t){return p(e,"number",t)},setName(t){l(e,"name",t)},getName(t){return p(e,"name",t)},setPrice(t){l(e,"price",t)},getPrice(t){return p(e,"price",t)},setCurrency(t){l(e,"currency",t)},getCurrency(t){return p(e,"currency",t)},setHidden(t){l(e,"hidden",t)},getHidden(t){return p(e,"hidden",t)},setLicenseeNumber(t){l(e,"licenseeNumber",t)},getLicenseeNumber(t){return p(e,"licenseeNumber",t)},setLicenseTemplateNumber(t){l(e,"licenseTemplateNumber",t)},getLicenseTemplateNumber(t){return p(e,"licenseTemplateNumber",t)},setProductModuleNumber(t){l(e,"productModuleNumber",t)},getProductModuleNumber(t){return p(e,"productModuleNumber",t)},serialize(){return C(e,{ignore:["inUse"]})}},qn)},de=qn;var J=n=>{let e=N(n),{startDate:o}=e;return o&&typeof o=="string"&&(e.startDate=o==="now"?o:new Date(o)),de(e)};var Vn=function(n={}){let e={...n};return v(e,{setActive(t){l(e,"active",t)},getActive(t){return p(e,"active",t)},setNumber(t){l(e,"number",t)},getNumber(t){return p(e,"number",t)},setName(t){l(e,"name",t)},getName(t){return p(e,"name",t)},setProductNumber(t){l(e,"productNumber",t)},getProductNumber(t){return p(e,"productNumber",t)},setMarkedForTransfer(t){l(e,"markedForTransfer",t)},getMarkedForTransfer(t){return p(e,"markedForTransfer",t)},serialize(){return C(e,{ignore:["inUse"]})}},Vn)},nt=Vn;var te=n=>nt(N(n));var Hn=function(n={}){let e={...n};return v(e,{setActive(t){l(e,"active",t)},getActive(t){return p(e,"active",t)},setNumber(t){l(e,"number",t)},getNumber(t){return p(e,"number",t)},setName(t){l(e,"name",t)},getName(t){return p(e,"name",t)},setLicenseType(t){l(e,"licenseType",t)},getLicenseType(t){return p(e,"licenseType",t)},setPrice(t){l(e,"price",t)},getPrice(t){return p(e,"price",t)},setCurrency(t){l(e,"currency",t)},getCurrency(t){return p(e,"currency",t)},setAutomatic(t){l(e,"automatic",t)},getAutomatic(t){return p(e,"automatic",t)},setHidden(t){l(e,"hidden",t)},getHidden(t){return p(e,"hidden",t)},setHideLicenses(t){l(e,"hideLicenses",t)},getHideLicenses(t){return p(e,"hideLicenses",t)},setProductModuleNumber(t){l(e,"productModuleNumber",t)},getProductModuleNumber(t){return p(e,"productModuleNumber",t)},serialize(){return C(e,{ignore:["inUse"]})}},Hn)},ot=Hn;var ne=n=>ot(N(n));var $n=function(n={}){let e={...n};return v(e,{setActive(t){l(e,"active",t)},getActive(t){return p(e,"active",t)},setNumber(t){l(e,"number",t)},getNumber(t){return p(e,"number",t)},setName(t){l(e,"name",t)},getName(t){return p(e,"name",t)},setProtocol(t){l(e,"protocol",t)},getProtocol(t){return p(e,"protocol",t)},setEvents(t){l(e,"events",t)},getEvents(t){return p(e,"events",t)},addEvent(t){let r=this.getEvents([]);r.push(t),this.setEvents(r)},setPayload(t){l(e,"payload",t)},getPayload(t){return p(e,"payload",t)},setEndpoint(t){l(e,"endpoint",t)},getEndpoint(t){return p(e,"endpoint",t)},serialize(){let t=C(e);return t.events&&(t.events=this.getEvents([]).join(",")),t}},$n)},rt=$n;var oe=n=>{let e=N(n),{events:o}=e;return o&&typeof o=="string"&&(e.events=o.split(",")),rt(e)};var zn=function(n={}){let e={...n};return v(e,{setActive(t){l(e,"active",t)},getActive(t){return p(e,"active",t)},setNumber(t){l(e,"number",t)},getNumber(t){return p(e,"number",t)}},zn)},st=zn;var me=n=>st(N(n));var Yn=function(n={}){let e={...n};return v(e,{setActive(t){l(e,"active",t)},getActive(t){return p(e,"active",t)},setNumber(t){l(e,"number",t)},getNumber(t){return p(e,"number",t)},setName(t){l(e,"name",t)},getName(t){return p(e,"name",t)},setVersion(t){l(e,"version",t)},getVersion(t){return p(e,"version",t)},setDescription(t){l(e,"description",t)},getDescription(t){return p(e,"description",t)},setLicensingInfo(t){l(e,"licensingInfo",t)},getLicensingInfo(t){return p(e,"licensingInfo",t)},setLicenseeAutoCreate(t){l(e,"licenseeAutoCreate",t)},getLicenseeAutoCreate(t){return p(e,"licenseeAutoCreate",t)},setDiscounts(t){l(e,"discounts",t)},getDiscounts(t){return p(e,"discounts",t)},addDiscount(t){let r=this.getDiscounts([]);r.push(t),this.setDiscounts(r)},removeDiscount(t){let r=this.getDiscounts();Array.isArray(r)&&r.length>0&&(r.splice(r.indexOf(t),1),this.setDiscounts(r))},setProductDiscounts(t){this.setDiscounts(t)},getProductDiscounts(t){return this.getDiscounts(t)},serialize(){let t=C(e,{ignore:["discounts","inUse"]}),r=this.getDiscounts();return r&&(t.discount=r.length>0?r.map(s=>s.toString()):""),t}},Yn)},it=Yn;function Le(n,e){return function(){return n.apply(e,arguments)}}var{toString:xr}=Object.prototype,{getPrototypeOf:$t}=Object,{iterator:ct,toStringTag:Jn}=Symbol,ut=(n=>e=>{let o=xr.call(e);return n[o]||(n[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),$=n=>(n=n.toLowerCase(),e=>ut(e)===n),dt=n=>e=>typeof e===n,{isArray:le}=Array,pe=dt("undefined");function Se(n){return n!==null&&!pe(n)&&n.constructor!==null&&!pe(n.constructor)&&B(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}var Gn=$("ArrayBuffer");function Lr(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&Gn(n.buffer),e}var Sr=dt("string"),B=dt("function"),Wn=dt("number"),Ce=n=>n!==null&&typeof n=="object",Cr=n=>n===!0||n===!1,at=n=>{if(ut(n)!=="object")return!1;let e=$t(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Jn in n)&&!(ct in n)},Ar=n=>{if(!Ce(n)||Se(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},Or=$("Date"),wr=$("File"),_r=$("Blob"),Mr=$("FileList"),Ur=n=>Ce(n)&&B(n.pipe),jr=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||B(n.append)&&((e=ut(n))==="formdata"||e==="object"&&B(n.toString)&&n.toString()==="[object FormData]"))},Br=$("URLSearchParams"),[kr,Fr,qr,Vr]=["ReadableStream","Request","Response","Headers"].map($),Hr=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ae(n,e,{allOwnKeys:o=!1}={}){if(n===null||typeof n>"u")return;let t,r;if(typeof n!="object"&&(n=[n]),le(n))for(t=0,r=n.length;t0;)if(r=o[t],e===r.toLowerCase())return r;return null}var re=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Qn=n=>!pe(n)&&n!==re;function Ht(){let{caseless:n,skipUndefined:e}=Qn(this)&&this||{},o={},t=(r,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;let i=n&&Xn(o,s)||s;at(o[i])&&at(r)?o[i]=Ht(o[i],r):at(r)?o[i]=Ht({},r):le(r)?o[i]=r.slice():(!e||!pe(r))&&(o[i]=r)};for(let r=0,s=arguments.length;r(Ae(e,(r,s)=>{o&&B(r)?Object.defineProperty(n,s,{value:Le(r,o),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,s,{value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:t}),n),zr=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),Yr=(n,e,o,t)=>{n.prototype=Object.create(e.prototype,t),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{value:e.prototype}),o&&Object.assign(n.prototype,o)},Kr=(n,e,o,t)=>{let r,s,i,a={};if(e=e||{},n==null)return e;do{for(r=Object.getOwnPropertyNames(n),s=r.length;s-- >0;)i=r[s],(!t||t(i,n,e))&&!a[i]&&(e[i]=n[i],a[i]=!0);n=o!==!1&&$t(n)}while(n&&(!o||o(n,e))&&n!==Object.prototype);return e},Jr=(n,e,o)=>{n=String(n),(o===void 0||o>n.length)&&(o=n.length),o-=e.length;let t=n.indexOf(e,o);return t!==-1&&t===o},Gr=n=>{if(!n)return null;if(le(n))return n;let e=n.length;if(!Wn(e))return null;let o=new Array(e);for(;e-- >0;)o[e]=n[e];return o},Wr=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&$t(Uint8Array)),Xr=(n,e)=>{let t=(n&&n[ct]).call(n),r;for(;(r=t.next())&&!r.done;){let s=r.value;e.call(n,s[0],s[1])}},Qr=(n,e)=>{let o,t=[];for(;(o=n.exec(e))!==null;)t.push(o);return t},Zr=$("HTMLFormElement"),es=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,t,r){return t.toUpperCase()+r}),Kn=(({hasOwnProperty:n})=>(e,o)=>n.call(e,o))(Object.prototype),ts=$("RegExp"),Zn=(n,e)=>{let o=Object.getOwnPropertyDescriptors(n),t={};Ae(o,(r,s)=>{let i;(i=e(r,s,n))!==!1&&(t[s]=i||r)}),Object.defineProperties(n,t)},ns=n=>{Zn(n,(e,o)=>{if(B(n)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;let t=n[o];if(B(t)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},os=(n,e)=>{let o={},t=r=>{r.forEach(s=>{o[s]=!0})};return le(n)?t(n):t(String(n).split(e)),o},rs=()=>{},ss=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function is(n){return!!(n&&B(n.append)&&n[Jn]==="FormData"&&n[ct])}var as=n=>{let e=new Array(10),o=(t,r)=>{if(Ce(t)){if(e.indexOf(t)>=0)return;if(Se(t))return t;if(!("toJSON"in t)){e[r]=t;let s=le(t)?[]:{};return Ae(t,(i,a)=>{let d=o(i,r+1);!pe(d)&&(s[a]=d)}),e[r]=void 0,s}}return t};return o(n,0)},cs=$("AsyncFunction"),us=n=>n&&(Ce(n)||B(n))&&B(n.then)&&B(n.catch),eo=((n,e)=>n?setImmediate:e?((o,t)=>(re.addEventListener("message",({source:r,data:s})=>{r===re&&s===o&&t.length&&t.shift()()},!1),r=>{t.push(r),re.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",B(re.postMessage)),ds=typeof queueMicrotask<"u"?queueMicrotask.bind(re):typeof process<"u"&&process.nextTick||eo,ms=n=>n!=null&&B(n[ct]),c={isArray:le,isArrayBuffer:Gn,isBuffer:Se,isFormData:jr,isArrayBufferView:Lr,isString:Sr,isNumber:Wn,isBoolean:Cr,isObject:Ce,isPlainObject:at,isEmptyObject:Ar,isReadableStream:kr,isRequest:Fr,isResponse:qr,isHeaders:Vr,isUndefined:pe,isDate:Or,isFile:wr,isBlob:_r,isRegExp:ts,isFunction:B,isStream:Ur,isURLSearchParams:Br,isTypedArray:Wr,isFileList:Mr,forEach:Ae,merge:Ht,extend:$r,trim:Hr,stripBOM:zr,inherits:Yr,toFlatObject:Kr,kindOf:ut,kindOfTest:$,endsWith:Jr,toArray:Gr,forEachEntry:Xr,matchAll:Qr,isHTMLForm:Zr,hasOwnProperty:Kn,hasOwnProp:Kn,reduceDescriptors:Zn,freezeMethods:ns,toObjectSet:os,toCamelCase:es,noop:rs,toFiniteNumber:ss,findKey:Xn,global:re,isContextDefined:Qn,isSpecCompliantForm:is,toJSONObject:as,isAsyncFn:cs,isThenable:us,setImmediate:eo,asap:ds,isIterable:ms};var M=class n extends Error{static from(e,o,t,r,s,i){let a=new n(e.message,o||e.code,t,r,s);return a.cause=e,a.name=e.name,i&&Object.assign(a,i),a}constructor(e,o,t,r,s){super(e),this.name="AxiosError",this.isAxiosError=!0,o&&(this.code=o),t&&(this.config=t),r&&(this.request=r),s&&(this.response=s,this.status=s.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}};M.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";M.ERR_BAD_OPTION="ERR_BAD_OPTION";M.ECONNABORTED="ECONNABORTED";M.ETIMEDOUT="ETIMEDOUT";M.ERR_NETWORK="ERR_NETWORK";M.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";M.ERR_DEPRECATED="ERR_DEPRECATED";M.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";M.ERR_BAD_REQUEST="ERR_BAD_REQUEST";M.ERR_CANCELED="ERR_CANCELED";M.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";M.ERR_INVALID_URL="ERR_INVALID_URL";var E=M;var mt=null;function zt(n){return c.isPlainObject(n)||c.isArray(n)}function no(n){return c.endsWith(n,"[]")?n.slice(0,-2):n}function to(n,e,o){return n?n.concat(e).map(function(r,s){return r=no(r),!o&&s?"["+r+"]":r}).join(o?".":""):e}function ps(n){return c.isArray(n)&&!n.some(zt)}var ls=c.toFlatObject(c,{},null,function(e){return/^is[A-Z]/.test(e)});function fs(n,e,o){if(!c.isObject(n))throw new TypeError("target must be an object");e=e||new(mt||FormData),o=c.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,P){return!c.isUndefined(P[y])});let t=o.metaTokens,r=o.visitor||m,s=o.dots,i=o.indexes,d=(o.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(r))throw new TypeError("visitor must be a function");function u(f){if(f===null)return"";if(c.isDate(f))return f.toISOString();if(c.isBoolean(f))return f.toString();if(!d&&c.isBlob(f))throw new E("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(f)||c.isTypedArray(f)?d&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function m(f,y,P){let A=f;if(f&&!P&&typeof f=="object"){if(c.endsWith(y,"{}"))y=t?y:y.slice(0,-2),f=JSON.stringify(f);else if(c.isArray(f)&&ps(f)||(c.isFileList(f)||c.endsWith(y,"[]"))&&(A=c.toArray(f)))return y=no(y),A.forEach(function(_,U){!(c.isUndefined(_)||_===null)&&e.append(i===!0?to([y],U,s):i===null?y:y+"[]",u(_))}),!1}return zt(f)?!0:(e.append(to(P,y,s),u(f)),!1)}let T=[],b=Object.assign(ls,{defaultVisitor:m,convertValue:u,isVisitable:zt});function S(f,y){if(!c.isUndefined(f)){if(T.indexOf(f)!==-1)throw Error("Circular reference detected in "+y.join("."));T.push(f),c.forEach(f,function(A,F){(!(c.isUndefined(A)||A===null)&&r.call(e,A,c.isString(F)?F.trim():F,y,b))===!0&&S(A,y?y.concat(F):[F])}),T.pop()}}if(!c.isObject(n))throw new TypeError("data must be an object");return S(n),e}var X=fs;function oo(n){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function ro(n,e){this._pairs=[],n&&X(n,this,e)}var so=ro.prototype;so.append=function(e,o){this._pairs.push([e,o])};so.toString=function(e){let o=e?function(t){return e.call(this,t,oo)}:oo;return this._pairs.map(function(r){return o(r[0])+"="+o(r[1])},"").join("&")};var pt=ro;function gs(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Oe(n,e,o){if(!e)return n;let t=o&&o.encode||gs,r=c.isFunction(o)?{serialize:o}:o,s=r&&r.serialize,i;if(s?i=s(e,r):i=c.isURLSearchParams(e)?e.toString():new pt(e,r).toString(t),i){let a=n.indexOf("#");a!==-1&&(n=n.slice(0,a)),n+=(n.indexOf("?")===-1?"?":"&")+i}return n}var Yt=class{constructor(){this.handlers=[]}use(e,o,t){return this.handlers.push({fulfilled:e,rejected:o,synchronous:t?t.synchronous:!1,runWhen:t?t.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(t){t!==null&&e(t)})}},Kt=Yt;var fe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};var io=typeof URLSearchParams<"u"?URLSearchParams:pt;var ao=typeof FormData<"u"?FormData:null;var co=typeof Blob<"u"?Blob:null;var uo={isBrowser:!0,classes:{URLSearchParams:io,FormData:ao,Blob:co},protocols:["http","https","file","blob","url","data"]};var Wt={};wn(Wt,{hasBrowserEnv:()=>Gt,hasStandardBrowserEnv:()=>Ts,hasStandardBrowserWebWorkerEnv:()=>Ps,navigator:()=>Jt,origin:()=>hs});var Gt=typeof window<"u"&&typeof document<"u",Jt=typeof navigator=="object"&&navigator||void 0,Ts=Gt&&(!Jt||["ReactNative","NativeScript","NS"].indexOf(Jt.product)<0),Ps=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hs=Gt&&window.location.href||"http://localhost";var L={...Wt,...uo};function Xt(n,e){return X(n,new L.classes.URLSearchParams,{visitor:function(o,t,r,s){return L.isNode&&c.isBuffer(o)?(this.append(t,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function ys(n){return c.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Es(n){let e={},o=Object.keys(n),t,r=o.length,s;for(t=0;t=o.length;return i=!i&&c.isArray(r)?r.length:i,d?(c.hasOwnProp(r,i)?r[i]=[r[i],t]:r[i]=t,!a):((!r[i]||!c.isObject(r[i]))&&(r[i]=[]),e(o,t,r[i],s)&&c.isArray(r[i])&&(r[i]=Es(r[i])),!a)}if(c.isFormData(n)&&c.isFunction(n.entries)){let o={};return c.forEachEntry(n,(t,r)=>{e(ys(t),r,o,0)}),o}return null}var lt=Ds;function bs(n,e,o){if(c.isString(n))try{return(e||JSON.parse)(n),c.trim(n)}catch(t){if(t.name!=="SyntaxError")throw t}return(o||JSON.stringify)(n)}var Qt={transitional:fe,adapter:["xhr","http","fetch"],transformRequest:[function(e,o){let t=o.getContentType()||"",r=t.indexOf("application/json")>-1,s=c.isObject(e);if(s&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return r?JSON.stringify(lt(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(t.indexOf("application/x-www-form-urlencoded")>-1)return Xt(e,this.formSerializer).toString();if((a=c.isFileList(e))||t.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return X(a?{"files[]":e}:e,d&&new d,this.formSerializer)}}return s||r?(o.setContentType("application/json",!1),bs(e)):e}],transformResponse:[function(e){let o=this.transitional||Qt.transitional,t=o&&o.forcedJSONParsing,r=this.responseType==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(t&&!this.responseType||r)){let i=!(o&&o.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?E.from(a,E.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:L.classes.FormData,Blob:L.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],n=>{Qt.headers[n]={}});var ge=Qt;var Rs=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),mo=n=>{let e={},o,t,r;return n&&n.split(`
+`).forEach(function(i){r=i.indexOf(":"),o=i.substring(0,r).trim().toLowerCase(),t=i.substring(r+1).trim(),!(!o||e[o]&&Rs[o])&&(o==="set-cookie"?e[o]?e[o].push(t):e[o]=[t]:e[o]=e[o]?e[o]+", "+t:t)}),e};var po=Symbol("internals");function we(n){return n&&String(n).trim().toLowerCase()}function ft(n){return n===!1||n==null?n:c.isArray(n)?n.map(ft):String(n)}function Ns(n){let e=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,t;for(;t=o.exec(n);)e[t[1]]=t[2];return e}var vs=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Zt(n,e,o,t,r){if(c.isFunction(t))return t.call(this,e,o);if(r&&(e=o),!!c.isString(e)){if(c.isString(t))return e.indexOf(t)!==-1;if(c.isRegExp(t))return t.test(e)}}function Is(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,o,t)=>o.toUpperCase()+t)}function xs(n,e){let o=c.toCamelCase(" "+e);["get","set","has"].forEach(t=>{Object.defineProperty(n,t+o,{value:function(r,s,i){return this[t].call(this,e,r,s,i)},configurable:!0})})}var Te=class{constructor(e){e&&this.set(e)}set(e,o,t){let r=this;function s(a,d,u){let m=we(d);if(!m)throw new Error("header name must be a non-empty string");let T=c.findKey(r,m);(!T||r[T]===void 0||u===!0||u===void 0&&r[T]!==!1)&&(r[T||d]=ft(a))}let i=(a,d)=>c.forEach(a,(u,m)=>s(u,m,d));if(c.isPlainObject(e)||e instanceof this.constructor)i(e,o);else if(c.isString(e)&&(e=e.trim())&&!vs(e))i(mo(e),o);else if(c.isObject(e)&&c.isIterable(e)){let a={},d,u;for(let m of e){if(!c.isArray(m))throw TypeError("Object iterator must return a key-value pair");a[u=m[0]]=(d=a[u])?c.isArray(d)?[...d,m[1]]:[d,m[1]]:m[1]}i(a,o)}else e!=null&&s(o,e,t);return this}get(e,o){if(e=we(e),e){let t=c.findKey(this,e);if(t){let r=this[t];if(!o)return r;if(o===!0)return Ns(r);if(c.isFunction(o))return o.call(this,r,t);if(c.isRegExp(o))return o.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,o){if(e=we(e),e){let t=c.findKey(this,e);return!!(t&&this[t]!==void 0&&(!o||Zt(this,this[t],t,o)))}return!1}delete(e,o){let t=this,r=!1;function s(i){if(i=we(i),i){let a=c.findKey(t,i);a&&(!o||Zt(t,t[a],a,o))&&(delete t[a],r=!0)}}return c.isArray(e)?e.forEach(s):s(e),r}clear(e){let o=Object.keys(this),t=o.length,r=!1;for(;t--;){let s=o[t];(!e||Zt(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){let o=this,t={};return c.forEach(this,(r,s)=>{let i=c.findKey(t,s);if(i){o[i]=ft(r),delete o[s];return}let a=e?Is(s):String(s).trim();a!==s&&delete o[s],o[a]=ft(r),t[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let o=Object.create(null);return c.forEach(this,(t,r)=>{t!=null&&t!==!1&&(o[r]=e&&c.isArray(t)?t.join(", "):t)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,o])=>e+": "+o).join(`
+`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...o){let t=new this(e);return o.forEach(r=>t.set(r)),t}static accessor(e){let t=(this[po]=this[po]={accessors:{}}).accessors,r=this.prototype;function s(i){let a=we(i);t[a]||(xs(r,i),t[a]=!0)}return c.isArray(e)?e.forEach(s):s(e),this}};Te.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(Te.prototype,({value:n},e)=>{let o=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(t){this[o]=t}}});c.freezeMethods(Te);var w=Te;function _e(n,e){let o=this||ge,t=e||o,r=w.from(t.headers),s=t.data;return c.forEach(n,function(a){s=a.call(o,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function Me(n){return!!(n&&n.__CANCEL__)}var en=class extends E{constructor(e,o,t){super(e??"canceled",E.ERR_CANCELED,o,t),this.name="CanceledError",this.__CANCEL__=!0}},K=en;function Ue(n,e,o){let t=o.config.validateStatus;!o.status||!t||t(o.status)?n(o):e(new E("Request failed with status code "+o.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function tn(n){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function Ls(n,e){n=n||10;let o=new Array(n),t=new Array(n),r=0,s=0,i;return e=e!==void 0?e:1e3,function(d){let u=Date.now(),m=t[s];i||(i=u),o[r]=d,t[r]=u;let T=s,b=0;for(;T!==r;)b+=o[T++],T=T%n;if(r=(r+1)%n,r===s&&(s=(s+1)%n),u-i{o=m,r=null,s&&(clearTimeout(s),s=null),n(...u)};return[(...u)=>{let m=Date.now(),T=m-o;T>=t?i(u,m):(r=u,s||(s=setTimeout(()=>{s=null,i(r)},t-T)))},()=>r&&i(r)]}var fo=Ss;var Pe=(n,e,o=3)=>{let t=0,r=lo(50,250);return fo(s=>{let i=s.loaded,a=s.lengthComputable?s.total:void 0,d=i-t,u=r(d),m=i<=a;t=i;let T={loaded:i,total:a,progress:a?i/a:void 0,bytes:d,rate:u||void 0,estimated:u&&a&&m?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};n(T)},o)},nn=(n,e)=>{let o=n!=null;return[t=>e[0]({lengthComputable:o,total:n,loaded:t}),e[1]]},on=n=>(...e)=>c.asap(()=>n(...e));var go=L.hasStandardBrowserEnv?((n,e)=>o=>(o=new URL(o,L.origin),n.protocol===o.protocol&&n.host===o.host&&(e||n.port===o.port)))(new URL(L.origin),L.navigator&&/(msie|trident)/i.test(L.navigator.userAgent)):()=>!0;var To=L.hasStandardBrowserEnv?{write(n,e,o,t,r,s,i){if(typeof document>"u")return;let a=[`${n}=${encodeURIComponent(e)}`];c.isNumber(o)&&a.push(`expires=${new Date(o).toUTCString()}`),c.isString(t)&&a.push(`path=${t}`),c.isString(r)&&a.push(`domain=${r}`),s===!0&&a.push("secure"),c.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(n){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function rn(n){return typeof n!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function sn(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function je(n,e,o){let t=!rn(e);return n&&(t||o==!1)?sn(n,e):e}var Po=n=>n instanceof w?{...n}:n;function z(n,e){e=e||{};let o={};function t(u,m,T,b){return c.isPlainObject(u)&&c.isPlainObject(m)?c.merge.call({caseless:b},u,m):c.isPlainObject(m)?c.merge({},m):c.isArray(m)?m.slice():m}function r(u,m,T,b){if(c.isUndefined(m)){if(!c.isUndefined(u))return t(void 0,u,T,b)}else return t(u,m,T,b)}function s(u,m){if(!c.isUndefined(m))return t(void 0,m)}function i(u,m){if(c.isUndefined(m)){if(!c.isUndefined(u))return t(void 0,u)}else return t(void 0,m)}function a(u,m,T){if(T in e)return t(u,m);if(T in n)return t(void 0,u)}let d={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,m,T)=>r(Po(u),Po(m),T,!0)};return c.forEach(Object.keys({...n,...e}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;let T=c.hasOwnProp(d,m)?d[m]:r,b=T(n[m],e[m],m);c.isUndefined(b)&&T!==a||(o[m]=b)}),o}var gt=n=>{let e=z({},n),{data:o,withXSRFToken:t,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:a}=e;if(e.headers=i=w.from(i),e.url=Oe(je(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),c.isFormData(o)){if(L.hasStandardBrowserEnv||L.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(c.isFunction(o.getHeaders)){let d=o.getHeaders(),u=["content-type","content-length"];Object.entries(d).forEach(([m,T])=>{u.includes(m.toLowerCase())&&i.set(m,T)})}}if(L.hasStandardBrowserEnv&&(t&&c.isFunction(t)&&(t=t(e)),t||t!==!1&&go(e.url))){let d=r&&s&&To.read(s);d&&i.set(r,d)}return e};var Cs=typeof XMLHttpRequest<"u",ho=Cs&&function(n){return new Promise(function(o,t){let r=gt(n),s=r.data,i=w.from(r.headers).normalize(),{responseType:a,onUploadProgress:d,onDownloadProgress:u}=r,m,T,b,S,f;function y(){S&&S(),f&&f(),r.cancelToken&&r.cancelToken.unsubscribe(m),r.signal&&r.signal.removeEventListener("abort",m)}let P=new XMLHttpRequest;P.open(r.method.toUpperCase(),r.url,!0),P.timeout=r.timeout;function A(){if(!P)return;let _=w.from("getAllResponseHeaders"in P&&P.getAllResponseHeaders()),H={data:!a||a==="text"||a==="json"?P.responseText:P.response,status:P.status,statusText:P.statusText,headers:_,config:n,request:P};Ue(function(q){o(q),y()},function(q){t(q),y()},H),P=null}"onloadend"in P?P.onloadend=A:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.indexOf("file:")===0)||setTimeout(A)},P.onabort=function(){P&&(t(new E("Request aborted",E.ECONNABORTED,n,P)),P=null)},P.onerror=function(U){let H=U&&U.message?U.message:"Network Error",Q=new E(H,E.ERR_NETWORK,n,P);Q.event=U||null,t(Q),P=null},P.ontimeout=function(){let U=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded",H=r.transitional||fe;r.timeoutErrorMessage&&(U=r.timeoutErrorMessage),t(new E(U,H.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,n,P)),P=null},s===void 0&&i.setContentType(null),"setRequestHeader"in P&&c.forEach(i.toJSON(),function(U,H){P.setRequestHeader(H,U)}),c.isUndefined(r.withCredentials)||(P.withCredentials=!!r.withCredentials),a&&a!=="json"&&(P.responseType=r.responseType),u&&([b,f]=Pe(u,!0),P.addEventListener("progress",b)),d&&P.upload&&([T,S]=Pe(d),P.upload.addEventListener("progress",T),P.upload.addEventListener("loadend",S)),(r.cancelToken||r.signal)&&(m=_=>{P&&(t(!_||_.type?new K(null,n,P):_),P.abort(),P=null)},r.cancelToken&&r.cancelToken.subscribe(m),r.signal&&(r.signal.aborted?m():r.signal.addEventListener("abort",m)));let F=tn(r.url);if(F&&L.protocols.indexOf(F)===-1){t(new E("Unsupported protocol "+F+":",E.ERR_BAD_REQUEST,n));return}P.send(s||null)})};var As=(n,e)=>{let{length:o}=n=n?n.filter(Boolean):[];if(e||o){let t=new AbortController,r,s=function(u){if(!r){r=!0,a();let m=u instanceof Error?u:this.reason;t.abort(m instanceof E?m:new K(m instanceof Error?m.message:m))}},i=e&&setTimeout(()=>{i=null,s(new E(`timeout of ${e}ms exceeded`,E.ETIMEDOUT))},e),a=()=>{n&&(i&&clearTimeout(i),i=null,n.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),n=null)};n.forEach(u=>u.addEventListener("abort",s));let{signal:d}=t;return d.unsubscribe=()=>c.asap(a),d}},yo=As;var Os=function*(n,e){let o=n.byteLength;if(!e||o{let r=ws(n,e),s=0,i,a=d=>{i||(i=!0,t&&t(d))};return new ReadableStream({async pull(d){try{let{done:u,value:m}=await r.next();if(u){a(),d.close();return}let T=m.byteLength;if(o){let b=s+=T;o(b)}d.enqueue(new Uint8Array(m))}catch(u){throw a(u),u}},cancel(d){return a(d),r.return()}},{highWaterMark:2})};var Eo=64*1024,{isFunction:Tt}=c,Ms=(({Request:n,Response:e})=>({Request:n,Response:e}))(c.global),{ReadableStream:Do,TextEncoder:bo}=c.global,Ro=(n,...e)=>{try{return!!n(...e)}catch{return!1}},Us=n=>{n=c.merge.call({skipUndefined:!0},Ms,n);let{fetch:e,Request:o,Response:t}=n,r=e?Tt(e):typeof fetch=="function",s=Tt(o),i=Tt(t);if(!r)return!1;let a=r&&Tt(Do),d=r&&(typeof bo=="function"?(f=>y=>f.encode(y))(new bo):async f=>new Uint8Array(await new o(f).arrayBuffer())),u=s&&a&&Ro(()=>{let f=!1,y=new o(L.origin,{body:new Do,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!y}),m=i&&a&&Ro(()=>c.isReadableStream(new t("").body)),T={stream:m&&(f=>f.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!T[f]&&(T[f]=(y,P)=>{let A=y&&y[f];if(A)return A.call(y);throw new E(`Response type '${f}' is not supported`,E.ERR_NOT_SUPPORT,P)})});let b=async f=>{if(f==null)return 0;if(c.isBlob(f))return f.size;if(c.isSpecCompliantForm(f))return(await new o(L.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(c.isArrayBufferView(f)||c.isArrayBuffer(f))return f.byteLength;if(c.isURLSearchParams(f)&&(f=f+""),c.isString(f))return(await d(f)).byteLength},S=async(f,y)=>{let P=c.toFiniteNumber(f.getContentLength());return P??b(y)};return async f=>{let{url:y,method:P,data:A,signal:F,cancelToken:_,timeout:U,onDownloadProgress:H,onUploadProgress:Q,responseType:q,headers:kt,withCredentials:Ke="same-origin",fetchOptions:xn}=gt(f),Ln=e||fetch;q=q?(q+"").toLowerCase():"text";let Je=yo([F,_&&_.toAbortSignal()],U),be=null,Z=Je&&Je.unsubscribe&&(()=>{Je.unsubscribe()}),Sn;try{if(Q&&u&&P!=="get"&&P!=="head"&&(Sn=await S(kt,A))!==0){let W=new o(y,{method:"POST",body:A,duplex:"half"}),ue;if(c.isFormData(A)&&(ue=W.headers.get("content-type"))&&kt.setContentType(ue),W.body){let[Ft,Ge]=nn(Sn,Pe(on(Q)));A=an(W.body,Eo,Ft,Ge)}}c.isString(Ke)||(Ke=Ke?"include":"omit");let j=s&&"credentials"in o.prototype,Cn={...xn,signal:Je,method:P.toUpperCase(),headers:kt.normalize().toJSON(),body:A,duplex:"half",credentials:j?Ke:void 0};be=s&&new o(y,Cn);let G=await(s?Ln(be,xn):Ln(y,Cn)),An=m&&(q==="stream"||q==="response");if(m&&(H||An&&Z)){let W={};["status","statusText","headers"].forEach(On=>{W[On]=G[On]});let ue=c.toFiniteNumber(G.headers.get("content-length")),[Ft,Ge]=H&&nn(ue,Pe(on(H),!0))||[];G=new t(an(G.body,Eo,Ft,()=>{Ge&&Ge(),Z&&Z()}),W)}q=q||"text";let rr=await T[c.findKey(T,q)||"text"](G,f);return!An&&Z&&Z(),await new Promise((W,ue)=>{Ue(W,ue,{data:rr,headers:w.from(G.headers),status:G.status,statusText:G.statusText,config:f,request:be})})}catch(j){throw Z&&Z(),j&&j.name==="TypeError"&&/Load failed|fetch/i.test(j.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,f,be,j&&j.response),{cause:j.cause||j}):E.from(j,j&&j.code,f,be,j&&j.response)}}},js=new Map,cn=n=>{let e=n&&n.env||{},{fetch:o,Request:t,Response:r}=e,s=[t,r,o],i=s.length,a=i,d,u,m=js;for(;a--;)d=s[a],u=m.get(d),u===void 0&&m.set(d,u=a?new Map:Us(e)),m=u;return u},wu=cn();var un={http:mt,xhr:ho,fetch:{get:cn}};c.forEach(un,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});var No=n=>`- ${n}`,ks=n=>c.isFunction(n)||n===null||n===!1;function Fs(n,e){n=c.isArray(n)?n:[n];let{length:o}=n,t,r,s={};for(let i=0;i`adapter ${d} `+(u===!1?"is not supported by the environment":"is not available in the build")),a=o?i.length>1?`since :
+`+i.map(No).join(`
+`):" "+No(i[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r}var Pt={getAdapter:Fs,adapters:un};function dn(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new K(null,n)}function ht(n){return dn(n),n.headers=w.from(n.headers),n.data=_e.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Pt.getAdapter(n.adapter||ge.adapter,n)(n).then(function(t){return dn(n),t.data=_e.call(n,n.transformResponse,t),t.headers=w.from(t.headers),t},function(t){return Me(t)||(dn(n),t&&t.response&&(t.response.data=_e.call(n,n.transformResponse,t.response),t.response.headers=w.from(t.response.headers))),Promise.reject(t)})}var yt="1.13.5";var Et={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{Et[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});var vo={};Et.transitional=function(e,o,t){function r(s,i){return"[Axios v"+yt+"] Transitional option '"+s+"'"+i+(t?". "+t:"")}return(s,i,a)=>{if(e===!1)throw new E(r(i," has been removed"+(o?" in "+o:"")),E.ERR_DEPRECATED);return o&&!vo[i]&&(vo[i]=!0,console.warn(r(i," has been deprecated since v"+o+" and will be removed in the near future"))),e?e(s,i,a):!0}};Et.spelling=function(e){return(o,t)=>(console.warn(`${t} is likely a misspelling of ${e}`),!0)};function qs(n,e,o){if(typeof n!="object")throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);let t=Object.keys(n),r=t.length;for(;r-- >0;){let s=t[r],i=e[s];if(i){let a=n[s],d=a===void 0||i(a,s,n);if(d!==!0)throw new E("option "+s+" must be "+d,E.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new E("Unknown option "+s,E.ERR_BAD_OPTION)}}var Be={assertOptions:qs,validators:Et};var V=Be.validators,he=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Kt,response:new Kt}}async request(e,o){try{return await this._request(e,o)}catch(t){if(t instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;let s=r.stack?r.stack.replace(/^.+\n/,""):"";try{t.stack?s&&!String(t.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(t.stack+=`
+`+s):t.stack=s}catch{}}throw t}}_request(e,o){typeof e=="string"?(o=o||{},o.url=e):o=e||{},o=z(this.defaults,o);let{transitional:t,paramsSerializer:r,headers:s}=o;t!==void 0&&Be.assertOptions(t,{silentJSONParsing:V.transitional(V.boolean),forcedJSONParsing:V.transitional(V.boolean),clarifyTimeoutError:V.transitional(V.boolean),legacyInterceptorReqResOrdering:V.transitional(V.boolean)},!1),r!=null&&(c.isFunction(r)?o.paramsSerializer={serialize:r}:Be.assertOptions(r,{encode:V.function,serialize:V.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),Be.assertOptions(o,{baseUrl:V.spelling("baseURL"),withXsrfToken:V.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let i=s&&c.merge(s.common,s[o.method]);s&&c.forEach(["delete","get","head","post","put","patch","common"],f=>{delete s[f]}),o.headers=w.concat(i,s);let a=[],d=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(o)===!1)return;d=d&&y.synchronous;let P=o.transitional||fe;P&&P.legacyInterceptorReqResOrdering?a.unshift(y.fulfilled,y.rejected):a.push(y.fulfilled,y.rejected)});let u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let m,T=0,b;if(!d){let f=[ht.bind(this),void 0];for(f.unshift(...a),f.push(...u),b=f.length,m=Promise.resolve(o);T{if(!t._listeners)return;let s=t._listeners.length;for(;s-- >0;)t._listeners[s](r);t._listeners=null}),this.promise.then=r=>{let s,i=new Promise(a=>{t.subscribe(a),s=a}).then(r);return i.cancel=function(){t.unsubscribe(s)},i},e(function(s,i,a){t.reason||(t.reason=new K(s,i,a),o(t.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let o=this._listeners.indexOf(e);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){let e=new AbortController,o=t=>{e.abort(t)};return this.subscribe(o),e.signal.unsubscribe=()=>this.unsubscribe(o),e.signal}static source(){let e;return{token:new n(function(r){e=r}),cancel:e}}},Io=mn;function pn(n){return function(o){return n.apply(null,o)}}function ln(n){return c.isObject(n)&&n.isAxiosError===!0}var fn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(fn).forEach(([n,e])=>{fn[e]=n});var xo=fn;function Lo(n){let e=new ke(n),o=Le(ke.prototype.request,e);return c.extend(o,ke.prototype,e,{allOwnKeys:!0}),c.extend(o,e,null,{allOwnKeys:!0}),o.create=function(r){return Lo(z(n,r))},o}var O=Lo(ge);O.Axios=ke;O.CanceledError=K;O.CancelToken=Io;O.isCancel=Me;O.VERSION=yt;O.toFormData=X;O.AxiosError=E;O.Cancel=O.CanceledError;O.all=function(e){return Promise.all(e)};O.spread=pn;O.isAxiosError=ln;O.mergeConfig=z;O.AxiosHeaders=w;O.formToJSON=n=>lt(c.isHTMLForm(n)?new FormData(n):n);O.getAdapter=Pt.getAdapter;O.HttpStatusCode=xo;O.default=O;var Dt=O;var{Axios:Ad,AxiosError:So,CanceledError:Od,isCancel:wd,CancelToken:_d,VERSION:Md,all:Ud,Cancel:jd,isAxiosError:Bd,spread:kd,toFormData:Fd,AxiosHeaders:qd,HttpStatusCode:Vd,formToJSON:Hd,getAdapter:$d,mergeConfig:zd}=Dt;var k=class n extends So{constructor(o,t,r,s,i,a){super(o,t,r,s,i);this.isNlicError=!0;this.name="NlicError",a&&(this.stack=a),Object.setPrototypeOf(this,n.prototype)}};var Co=function(n={}){let e={...n};if(e.amountFix&&e.amountPercent)throw new k('Properties "amountFix" and "amountPercent" cannot be used at the same time');return v(e,{setTotalPrice(t){l(e,"totalPrice",t)},getTotalPrice(t){return p(e,"totalPrice",t)},setCurrency(t){l(e,"currency",t)},getCurrency(t){return p(e,"currency",t)},setAmountFix(t){l(e,"amountFix",t)},getAmountFix(t){return p(e,"amountFix",t)},setAmountPercent(t){l(e,"amountPercent",t)},getAmountPercent(t){return p(e,"amountPercent",t)},toString(){let t=this.getTotalPrice(),r=this.getCurrency(),s=this.getAmountPercent()?`${this.getAmountPercent()}%`:this.getAmountFix();return t&&r&&s?`${t};${r};${s}`:""}},Co,{set:(t,r)=>{r==="amountFix"&&delete t.amountPercent,r==="amountPercent"&&delete t.amountFix}})},bt=Co;var se=n=>{let e=N(n),o=e.discount;return delete e.discount,o&&(e.discounts=o.map(t=>bt(t))),it(e)};var Ao=function(n={}){let e={...n};return v(e,{setActive(t){l(e,"active",t)},getActive(t){return p(e,"active",t)},setNumber(t){l(e,"number",t)},getNumber(t){return p(e,"number",t)},setName(t){l(e,"name",t)},getName(t){return p(e,"name",t)},setLicensingModel(t){l(e,"licensingModel",t)},getLicensingModel(t){return p(e,"licensingModel",t)},setProductNumber(t){l(e,"productNumber",t)},getProductNumber(t){return p(e,"productNumber",t)},serialize(){return C(e,{ignore:["inUse"]})}},Ao)},Rt=Ao;var ie=n=>Rt(N(n));var Oo=function(n={}){let e={...n};return v(e,{setActive(t){l(e,"active",t)},getActive(t){return p(e,"active",t)},setNumber(t){l(e,"number",t)},getNumber(t){return p(e,"number",t)},setExpirationTime(t){l(e,"expirationTime",t)},getExpirationTime(t){return p(e,"expirationTime",t)},setTokenType(t){l(e,"tokenType",t)},getTokenType(t){return p(e,"tokenType",t)},setLicenseeNumber(t){l(e,"licenseeNumber",t)},getLicenseeNumber(t){return p(e,"licenseeNumber",t)},setAction(t){l(e,"action",t)},getAction(t){return p(e,"action",t)},setApiKeyRole(t){l(e,"apiKeyRole",t)},getApiKeyRole(t){return p(e,"apiKeyRole",t)},setBundleNumber(t){l(e,"bundleNumber",t)},getBundleNumber(t){return p(e,"bundleNumber",t)},setBundlePrice(t){l(e,"bundlePrice",t)},getBundlePrice(t){return p(e,"bundlePrice",t)},setProductNumber(t){l(e,"productNumber",t)},getProductNumber(t){return p(e,"productNumber",t)},setPredefinedShoppingItem(t){l(e,"predefinedShoppingItem",t)},getPredefinedShoppingItem(t){return p(e,"predefinedShoppingItem",t)},setSuccessURL(t){l(e,"successURL",t)},getSuccessURL(t){return p(e,"successURL",t)},setSuccessURLTitle(t){l(e,"successURLTitle",t)},getSuccessURLTitle(t){return p(e,"successURLTitle",t)},setCancelURL(t){l(e,"cancelURL",t)},getCancelURL(t){return p(e,"cancelURL",t)},setCancelURLTitle(t){l(e,"cancelURLTitle",t)},getCancelURLTitle(t){return p(e,"cancelURLTitle",t)},getShopURL(t){return p(e,"shopURL",t)},serialize(){return C(e,{ignore:["shopURL"]})}},Oo)},Nt=Oo;var ye=n=>{let e=N(n),{expirationTime:o}=e;return o&&typeof o=="string"&&(e.expirationTime=new Date(o)),Nt(e)};var gn=class{constructor(e,o){this.transaction=e,this.license=o}setTransaction(e){this.transaction=e}getTransaction(){return this.transaction}setLicense(e){this.license=e}getLicense(){return this.license}},vt=(n,e)=>new gn(n,e);var wo=function(n={}){let e={...n};return v(e,{setActive(t){l(e,"active",t)},getActive(t){return p(e,"active",t)},setNumber(t){l(e,"number",t)},getNumber(t){return p(e,"number",t)},setStatus(t){l(e,"status",t)},getStatus(t){return p(e,"status",t)},setSource(t){l(e,"source",t)},getSource(t){return p(e,"source",t)},setGrandTotal(t){l(e,"grandTotal",t)},getGrandTotal(t){return p(e,"grandTotal",t)},setDiscount(t){l(e,"discount",t)},getDiscount(t){return p(e,"discount",t)},setCurrency(t){l(e,"currency",t)},getCurrency(t){return p(e,"currency",t)},setDateCreated(t){l(e,"dateCreated",t)},getDateCreated(t){return p(e,"dateCreated",t)},setDateClosed(t){l(e,"dateClosed",t)},getDateClosed(t){return p(e,"dateClosed",t)},setPaymentMethod(t){l(e,"paymentMethod",t)},getPaymentMethod(t){return p(e,"paymentMethod",t)},setLicenseTransactionJoins(t){l(e,"licenseTransactionJoins",t)},getLicenseTransactionJoins(t){return p(e,"licenseTransactionJoins",t)},serialize(){let t={...e};return t.datecreated=e.dateCreated,t.dateclosed=e.dateClosed,delete t.dateCreated,delete t.dateClosed,C(t,{ignore:["licenseTransactionJoins","inUse"]})}},wo)},Fe=wo;var ae=n=>{let e=N(n),{datecreated:o,dateclosed:t}=e;o&&typeof o=="string"&&(e.dateCreated=new Date(o),delete e.datecreated),t&&typeof t=="string"&&(e.dateClosed=new Date(t),delete e.dateclosed);let r=e.licenseTransactionJoin;return delete e.licenseTransactionJoin,r&&(e.licenseTransactionJoins=r.map(({transactionNumber:s,licenseNumber:i})=>{let a=Fe({number:s}),d=de({number:i});return vt(a,d)})),Fe(e)};var _o=Dt.create(),Mo=null,Uo=[],jo=n=>{_o=n},It=()=>_o,Tn=n=>{Mo=n},Bo=()=>Mo,Pn=n=>{Uo=n},ko=()=>Uo;var hn={name:"netlicensing-client",version:"2.0.0",description:"JavaScript Wrapper for Labs64 NetLicensing RESTful API",keywords:["labs64","netlicensing","licensing","licensing-as-a-service","license","license-management","software-license","client","restful","restful-api","javascript","wrapper","api","client"],license:"Apache-2.0",author:"Labs64 GmbH",homepage:"https://netlicensing.io",repository:{type:"git",url:"https://github.com/Labs64/NetLicensingClient-javascript"},bugs:{url:"https://github.com/Labs64/NetLicensingClient-javascript/issues"},contributors:[{name:"Ready Brown",email:"ready.brown@hotmail.de",url:"https://github.com/r-brown"},{name:"Viacheslav Rudkovskiy",email:"viachaslau.rudkovski@labs64.de",url:"https://github.com/v-rudkovskiy"},{name:"Andrei Yushkevich",email:"yushkevich@me.com",url:"https://github.com/yushkevich"}],main:"dist/index.cjs",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.mjs",require:"./dist/index.cjs"}},files:["dist"],scripts:{build:"tsup",release:"npm run lint:typecheck && npm run test && npm run build",dev:"tsup --watch",test:"vitest run","test:dev":"vitest watch",lint:"eslint --ext .js,.mjs,.ts src",typecheck:"tsc --noEmit","lint:typecheck":"npm run lint && npm run typecheck"},peerDependencies:{axios:"^1.9.0"},dependencies:{},devDependencies:{"@eslint/js":"^9.24.0","@types/node":"^22.14.0","@typescript-eslint/eslint-plugin":"^8.29.1","@typescript-eslint/parser":"^8.29.1","@vitest/eslint-plugin":"^1.1.43",axios:"^1.13.0",eslint:"^9.24.0","eslint-plugin-import":"^2.31.0",prettier:"3.5.3",tsup:"^8.4.0",typescript:"^5.8.3","typescript-eslint":"^8.29.1",vitest:"^3.1.1"},engines:{node:">= 16.9.0",npm:">= 8.0.0"},browserslist:["> 1%","last 2 versions","not ie <= 10"]};var xt=n=>{let e=[],o=(t,r)=>{if(t!=null){if(Array.isArray(t)){t.forEach(s=>{o(s,r?`${r}`:"")});return}if(t instanceof Date){e.push(`${r}=${encodeURIComponent(t.toISOString())}`);return}if(typeof t=="object"){Object.keys(t).forEach(s=>{let i=t[s];o(i,r?`${r}[${encodeURIComponent(s)}]`:encodeURIComponent(s))});return}e.push(`${r}=${encodeURIComponent(t)}`)}};return o(n),e.join("&")};var Ee=async(n,e,o,t,r)=>{let s={Accept:"application/json","X-Requested-With":"XMLHttpRequest"};typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]"&&(s["User-agent"]=`NetLicensing/Javascript ${hn.version}/node&${process.version}`);let i={method:e,headers:s,url:encodeURI(`${n.getBaseUrl()}/${o}`),responseType:"json",transformRequest:(d,u)=>u["Content-Type"]==="application/x-www-form-urlencoded"?xt(d):(u["NetLicensing-Origin"]||(u["NetLicensing-Origin"]=`NetLicensing/Javascript ${hn.version}`),d)};switch(["put","post","patch"].indexOf(e.toLowerCase())>=0?(i.method==="post"&&(s["Content-Type"]="application/x-www-form-urlencoded"),i.data=t):i.params=t,n.getSecurityMode()){case Y.BASIC_AUTHENTICATION:{if(!n.getUsername())throw new k('Missing parameter "username"');if(!n.getPassword())throw new k('Missing parameter "password"');i.auth={username:n.getUsername(),password:n.getPassword()}}break;case Y.APIKEY_IDENTIFICATION:if(!n.getApiKey())throw new k('Missing parameter "apiKey"');s.Authorization=`Basic ${btoa(`apiKey:${n.getApiKey()}`)}`;break;case Y.ANONYMOUS_IDENTIFICATION:break;default:throw new k("Unknown security mode")}let a=r?.axiosInstance||It();try{let d=await a(i),u=d.data.infos?.info||[];if(Tn(d),Pn(u),r?.onResponse&&r.onResponse(d),u.length>0){r?.onInfo&&r.onInfo(u);let m=u.find(({type:T})=>T==="ERROR");if(m)throw new k(m.value,m.id,d.config,d.request,d)}return d}catch(d){let u=d,m=u.response,T=m?.data?.infos?.info||[];if(Tn(m||null),Pn(T),d.isAxiosError){let b=d.message;if(m?.data&&T.length>0){let S=T.find(({type:f})=>f==="ERROR");S&&(b=S.value)}throw new k(b,u.code,u.config,u.request,u.response)}throw d}};var Fo=(n,e,o,t)=>Ee(n,"get",e,o,t),qo=(n,e,o,t)=>Ee(n,"post",e,o,t),Vo=(n,e,o,t)=>Ee(n,"delete",e,o,t);var Hs={setAxiosInstance(n){jo(n)},getAxiosInstance(){return It()},getLastHttpRequestInfo(){return Bo()},getInfo(){return ko()},get(n,e,o,t){return Fo(n,e,o,t)},post(n,e,o,t){return qo(n,e,o,t)},delete(n,e,o,t){return Vo(n,e,o,t)},request(n,e,o,t,r){return Ee(n,e,o,t,r)},toQueryString(n){return xt(n)}},g=Hs;var x=n=>Object.keys(n).map(e=>`${e}=${String(n[e])}`).join(";"),Ho=n=>{let e={};return n.split(";").forEach(o=>{let[t,r]=o.split("=");e[t]=r}),e};var yn=n=>typeof n<"u"&&typeof n!="function",qe=n=>yn(n)?typeof n=="number"?!Number.isNaN(n):!0:!1,R=(n,e)=>{if(n===null)throw new TypeError(`Parameter "${e}" cannot be null.`);if(!qe(n))throw new TypeError(`Parameter "${e}" has an invalid value.`)},D=(n,e)=>{if(R(n,e),!n)throw new TypeError(`Parameter "${e}" cannot be empty.`)};var $o=function(n,e){let o=parseInt(e?.pagenumber||"0",10),t=parseInt(e?.itemsnumber||"0",10),r=parseInt(e?.totalpages||"0",10),s=parseInt(e?.totalitems||"0",10),i={getContent(){return n},getPagination(){return{pageNumber:o,itemsNumber:t,totalPages:r,totalItems:s,hasNext:r>o+1}},getPageNumber(){return o},getItemsNumber(){return t},getTotalPages(){return r},getTotalItems(){return s},hasNext(){return r>o+1}};return new Proxy(n,{get(a,d,u){return Object.hasOwn(i,d)?i[d]:Reflect.get(a,d,u)},set(a,d,u,m){return Reflect.set(a,d,u,m)},getPrototypeOf(){return $o.prototype||null}})},I=$o;var De=h.Bundle.ENDPOINT_PATH,$s=h.Bundle.ENDPOINT_OBTAIN_PATH,Lt=h.Bundle.TYPE,zs={async get(n,e,o){D(e,"number");let r=(await g.get(n,`${De}/${e}`,{},o)).data.items?.item.find(s=>s.type===Lt);return ee(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:x(e));let s=(await g.get(n,De,t,o)).data.items,i=s?.item.filter(a=>a.type===Lt).map(a=>ee(a));return I(i||[],s)},async create(n,e,o){R(e,"bundle");let r=(await g.post(n,De,e.serialize(),o)).data.items?.item.find(s=>s.type===Lt);return ee(r)},async update(n,e,o,t){D(e,"number"),R(o,"bundle");let s=(await g.post(n,`${De}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===Lt);return ee(s)},delete(n,e,o,t){return D(e,"number"),g.delete(n,`${De}/${e}`,{forceCascade:!!o},t)},async obtain(n,e,o,t){D(e,"number"),D(o,"licenseeNumber");let r={[h.Licensee.LICENSEE_NUMBER]:o};return(await g.post(n,`${De}/${e}/${$s}`,r,t)).data.items?.item.filter(d=>d.type===h.License.TYPE)?.map(d=>J(d))||[]}},zo=zs;var En=class{constructor(){this.validations={}}getValidators(){return this.validations}setValidation(e){return this.validations[e.productModuleNumber]=e,this}getValidation(e,o){return this.validations[e]||o}setProductModuleValidation(e){return this.setValidation(e)}getProductModuleValidation(e,o){return this.getValidation(e,o)}setTtl(e){if(!qe(e))throw new TypeError(`Bad ttl:${e.toString()}`);return this.ttl=new Date(e),this}getTtl(){return this.ttl}toString(){let e="ValidationResult [";return Object.keys(this.validations).forEach(o=>{e+=`ProductModule<${o}>`,o in this.validations&&(e+=JSON.stringify(this.validations[o]))}),e+="]",e}},St=()=>new En;var ce=h.Licensee.ENDPOINT_PATH,Ys=h.Licensee.ENDPOINT_PATH_VALIDATE,Ks=h.Licensee.ENDPOINT_PATH_TRANSFER,Ct=h.Licensee.TYPE,Js={async get(n,e,o){D(e,"number");let r=(await g.get(n,`${ce}/${e}`,{},o)).data.items?.item.find(s=>s.type===Ct);return te(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:x(e));let s=(await g.get(n,ce,t,o)).data.items,i=s?.item.filter(a=>a.type===Ct).map(a=>te(a));return I(i||[],s)},async create(n,e,o,t){R(o,"licensee");let r=o.serialize();e&&(r.productNumber=e);let i=(await g.post(n,ce,r,t)).data.items?.item.find(a=>a.type===Ct);return te(i)},async update(n,e,o,t){D(e,"number"),R(o,"licensee");let s=(await g.post(n,`${ce}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===Ct);return te(s)},delete(n,e,o,t){return D(e,"number"),g.delete(n,`${ce}/${e}`,{forceCascade:!!o},t)},async validate(n,e,o,t){D(e,"number");let r={};if(o){let u=o.productNumber;u&&(r.productNumber=u);let m=o.licenseeProperties;Object.keys(m).forEach(b=>{r[b]=o.getLicenseeProperty(b)}),o.isForOfflineUse()&&(r.forOfflineUse=!0),o.isDryRun()&&(r.dryRun=!0);let T=o.getParameters();Object.keys(T).forEach((b,S)=>{r[`${h.ProductModule.PRODUCT_MODULE_NUMBER}${S}`]=b;let f=T[b];f&&Object.keys(f).forEach(y=>{r[y+S]=f[y]})})}let s=await g.post(n,`${ce}/${e}/${Ys}`,r,t),i=St(),a=s.data.ttl;return a&&i.setTtl(a),s.data.items?.item.filter(u=>u.type===h.Validation.TYPE)?.forEach(u=>{i.setValidation(N(u))}),i},transfer(n,e,o,t){D(e,"number"),D(o,"sourceLicenseeNumber");let r={sourceLicenseeNumber:o};return g.post(n,`${ce}/${e}/${Ks}`,r,t)}},Yo=Js;var Ve=h.License.ENDPOINT_PATH,At=h.License.TYPE,Gs={async get(n,e,o){D(e,"number");let r=(await g.get(n,`${Ve}/${e}`,{},o)).data.items?.item.find(s=>s.type===At);return J(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:x(e));let s=(await g.get(n,Ve,t,o)).data.items,i=s?.item.filter(a=>a.type===At).map(a=>J(a));return I(i||[],s)},async create(n,e,o,t,r,s){R(r,"license");let i=r.serialize();e&&(i.licenseeNumber=e),o&&(i.licenseTemplateNumber=o),t&&(i.transactionNumber=t);let d=(await g.post(n,Ve,i,s)).data.items?.item.find(u=>u.type===At);return J(d)},async update(n,e,o,t,r){D(e,"number"),R(t,"license");let s=t.serialize();o&&(s.transactionNumber=o);let a=(await g.post(n,`${Ve}/${e}`,s,r)).data.items?.item.find(d=>d.type===At);return J(a)},delete(n,e,o,t){return D(e,"number"),g.delete(n,`${Ve}/${e}`,{forceCascade:!!o},t)}},Ko=Gs;var He=h.LicenseTemplate.ENDPOINT_PATH,Ot=h.LicenseTemplate.TYPE,Ws={async get(n,e,o){D(e,"number");let r=(await g.get(n,`${He}/${e}`,{},o)).data.items?.item.find(s=>s.type===Ot);return ne(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:x(e));let s=(await g.get(n,He,t,o)).data.items,i=s?.item.filter(a=>a.type===Ot).map(a=>ne(a));return I(i||[],s)},async create(n,e,o,t){R(o,"licenseTemplate");let r=o.serialize();e&&(r.productModuleNumber=e);let i=(await g.post(n,He,r,t)).data.items?.item.find(a=>a.type===Ot);return ne(i)},async update(n,e,o,t){D(e,"number"),R(o,"licenseTemplate");let s=(await g.post(n,`${He}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===Ot);return ne(s)},delete(n,e,o,t){return D(e,"number"),g.delete(n,`${He}/${e}`,{forceCascade:!!o},t)}},Jo=Ws;var $e=h.Notification.ENDPOINT_PATH,wt=h.Notification.TYPE,Xs={async get(n,e,o){D(e,"number");let r=(await g.get(n,`${$e}/${e}`,{},o)).data.items?.item.find(s=>s.type===wt);return oe(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:x(e));let s=(await g.get(n,$e,t,o)).data.items,i=s?.item.filter(a=>a.type===wt).map(a=>oe(a));return I(i||[],s)},async create(n,e,o){R(e,"notification");let r=(await g.post(n,$e,e.serialize(),o)).data.items?.item.find(s=>s.type===wt);return oe(r)},async update(n,e,o,t){D(e,"number"),R(o,"notification");let s=(await g.post(n,`${$e}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===wt);return oe(s)},delete(n,e,o,t){return D(e,"number"),g.delete(n,`${$e}/${e}`,{forceCascade:!!o},t)}},Go=Xs;var Dn=h.PaymentMethod.ENDPOINT_PATH,bn=h.PaymentMethod.TYPE,Qs={async get(n,e,o){D(e,"number");let r=(await g.get(n,`${Dn}/${e}`,{},o)).data.items?.item.find(s=>s.type===bn);return me(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:x(e));let s=(await g.get(n,Dn,t,o)).data.items,i=s?.item.filter(a=>a.type===bn).map(a=>me(a));return I(i||[],s)},async update(n,e,o,t){D(e,"number"),R(o,"paymentMethod");let s=(await g.post(n,`${Dn}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===bn);return me(s)}},Wo=Qs;var ze=h.ProductModule.ENDPOINT_PATH,_t=h.ProductModule.TYPE,Zs={async get(n,e,o){D(e,"number");let r=(await g.get(n,`${ze}/${e}`,{},o)).data.items?.item.find(s=>s.type===_t);return ie(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:x(e));let s=(await g.get(n,ze,t,o)).data.items,i=s?.item.filter(a=>a.type===_t).map(a=>ie(a));return I(i||[],s)},async create(n,e,o,t){R(o,"productModule");let r=o.serialize();e&&(r.productNumber=e);let i=(await g.post(n,ze,r,t)).data.items?.item.find(a=>a.type===_t);return ie(i)},async update(n,e,o,t){D(e,"number"),R(o,"productModule");let s=(await g.post(n,`${ze}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===_t);return ie(s)},delete(n,e,o,t){return D(e,"number"),g.delete(n,`${ze}/${e}`,{forceCascade:!!o},t)}},Xo=Zs;var Ye=h.Product.ENDPOINT_PATH,Mt=h.Product.TYPE,ei={async get(n,e,o){D(e,"number");let r=(await g.get(n,`${Ye}/${e}`,{},o)).data.items?.item.find(s=>s.type===Mt);return se(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:x(e));let s=(await g.get(n,Ye,t,o)).data.items,i=s?.item.filter(a=>a.type===Mt).map(a=>se(a));return I(i||[],s)},async create(n,e,o){R(e,"product");let r=(await g.post(n,Ye,e.serialize(),o)).data.items?.item.find(s=>s.type===Mt);return se(r)},async update(n,e,o,t){D(e,"number"),R(o,"product");let s=(await g.post(n,`${Ye}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===Mt);return se(s)},delete(n,e,o,t){return D(e,"number"),g.delete(n,`${Ye}/${e}`,{forceCascade:!!o},t)}},Qo=ei;var Ut=h.Token.ENDPOINT_PATH,Rn=h.Token.TYPE,ti={async get(n,e,o){D(e,"number");let r=(await g.get(n,`${Ut}/${e}`,{},o)).data.items?.item.find(s=>s.type===Rn);return ye(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:x(e));let s=(await g.get(n,Ut,t,o)).data.items,i=s?.item.filter(a=>a.type===Rn).map(a=>ye(a));return I(i||[],s)},async create(n,e,o){R(e,"token");let r=(await g.post(n,Ut,e.serialize(),o)).data.items?.item.find(s=>s.type===Rn);return ye(r)},delete(n,e,o,t){return D(e,"number"),g.delete(n,`${Ut}/${e}`,{forceCascade:!!o},t)}},Zo=ti;var jt=h.Transaction.ENDPOINT_PATH,Bt=h.Transaction.TYPE,ni={async get(n,e,o){D(e,"number");let r=(await g.get(n,`${jt}/${e}`,{},o)).data.items?.item.find(s=>s.type===Bt);return ae(r)},async list(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:x(e));let s=(await g.get(n,jt,t,o)).data.items,i=s?.item.filter(a=>a.type===Bt).map(a=>ae(a));return I(i||[],s)},async create(n,e,o){R(e,"transaction");let r=(await g.post(n,jt,e.serialize(),o)).data.items?.item.find(s=>s.type===Bt);return ae(r)},async update(n,e,o,t){D(e,"number"),R(o,"transaction");let s=(await g.post(n,`${jt}/${e}`,o.serialize(),t)).data.items?.item.find(i=>i.type===Bt);return ae(s)}},er=ni;var Nn=h.Utility.ENDPOINT_PATH,oi={async listLicenseTypes(n,e){let o=`${Nn}/${h.Utility.ENDPOINT_PATH_LICENSE_TYPES}`,r=(await g.get(n,o,void 0,e)).data.items,s=h.Utility.LICENSE_TYPE,i=r?.item.filter(a=>a.type===s).map(a=>N(a).name);return I(i||[],r)},async listLicensingModels(n,e){let o=`${Nn}/${h.Utility.ENDPOINT_PATH_LICENSING_MODELS}`,r=(await g.get(n,o,void 0,e)).data.items,s=h.Utility.LICENSING_MODEL_TYPE,i=r?.item.filter(a=>a.type===s).map(a=>N(a).name);return I(i||[],r)},async listCountries(n,e,o){let t={};e&&(t[h.FILTER]=typeof e=="string"?e:x(e));let r=`${Nn}/${h.Utility.ENDPOINT_PATH_COUNTRIES}`,i=(await g.get(n,r,t,o)).data.items,a=h.Utility.COUNTRY_TYPE,d=i?.item.filter(u=>u.type===a).map(u=>tt(u));return I(d||[],i)}},tr=oi;var vn=class{constructor(e){this.baseUrl=e?.baseUrl||"https://go.netlicensing.io/core/v2/rest",this.securityMode=e?.securityMode||Y.BASIC_AUTHENTICATION,this.username=e?.username,this.password=e?.password,this.apiKey=e?.apiKey,this.publicKey=e?.publicKey}setBaseUrl(e){return this.baseUrl=e,this}getBaseUrl(){return this.baseUrl}setSecurityMode(e){return this.securityMode=e,this}getSecurityMode(){return this.securityMode}setUsername(e){return this.username=e,this}getUsername(e){return this.username||e}setPassword(e){return this.password=e,this}getPassword(e){return this.password||e}setApiKey(e){return this.apiKey=e,this}getApiKey(e){return this.apiKey||e}setPublicKey(e){return this.publicKey=e,this}getPublicKey(e){return this.publicKey||e}},nr=n=>new vn(n);var In=class{constructor(){this.parameters={},this.licenseeProperties={}}setProductNumber(e){return this.productNumber=e,this}getProductNumber(){return this.productNumber}setLicenseeName(e){return this.licenseeProperties.licenseeName=e,this}getLicenseeName(){return this.licenseeProperties.licenseeName}setLicenseeSecret(e){return this.licenseeProperties.licenseeSecret=e,this}getLicenseeSecret(){return this.licenseeProperties.licenseeSecret}getLicenseeProperties(){return this.licenseeProperties}setLicenseeProperty(e,o){return this.licenseeProperties[e]=o,this}getLicenseeProperty(e,o){return this.licenseeProperties[e]||o}setForOfflineUse(e){return this.forOfflineUse=e,this}isForOfflineUse(){return!!this.forOfflineUse}setDryRun(e){return this.dryRun=e,this}isDryRun(){return!!this.dryRun}getParameters(){return this.parameters}setParameter(e,o){return this.parameters[e]=o,this}getParameter(e){return this.parameters[e]}getProductModuleValidationParameters(e){return this.getParameter(e)}setProductModuleValidationParameters(e,o){return this.setParameter(e,o)}},or=()=>new In;return ur(ri);})();
//# sourceMappingURL=index.global.js.map
\ No newline at end of file
diff --git a/dist/index.global.js.map b/dist/index.global.js.map
index ec6e5fb..337ca2c 100644
--- a/dist/index.global.js.map
+++ b/dist/index.global.js.map
@@ -1 +1 @@
-{"version":3,"sources":["../src/index.ts","../src/constants/LicenseeSecretMode.ts","../src/constants/LicenseType.ts","../src/constants/NotificationEvent.ts","../src/constants/NotificationProtocol.ts","../src/constants/SecurityMode.ts","../src/constants/TimeVolumePeriod.ts","../src/constants/TokenType.ts","../src/constants/TransactionSource.ts","../src/constants/TransactionStatus.ts","../src/constants/index.ts","../src/constants/ApiKeyRole.ts","../src/constants/LicensingModel.ts","../src/constants/NodeSecretMode.ts","../src/constants/PaymentMethodEnum.ts","../src/converters/itemToObject.ts","../src/utils/helpers.ts","../src/utils/serialize.ts","../src/entities/defineEntity.ts","../src/entities/Bundle.ts","../src/converters/itemToBundle.ts","../src/entities/Country.ts","../src/converters/itemToCountry.ts","../src/entities/License.ts","../src/converters/itemToLicense.ts","../src/entities/Licensee.ts","../src/converters/itemToLicensee.ts","../src/entities/LicenseTemplate.ts","../src/converters/itemToLicenseTemplate.ts","../src/entities/Notification.ts","../src/converters/itemToNotification.ts","../src/entities/PaymentMethod.ts","../src/converters/itemToPaymentMethod.ts","../src/entities/Product.ts","../node_modules/axios/lib/helpers/bind.js","../node_modules/axios/lib/utils.js","../node_modules/axios/lib/core/AxiosError.js","../node_modules/axios/lib/helpers/null.js","../node_modules/axios/lib/helpers/toFormData.js","../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../node_modules/axios/lib/helpers/buildURL.js","../node_modules/axios/lib/core/InterceptorManager.js","../node_modules/axios/lib/defaults/transitional.js","../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../node_modules/axios/lib/platform/browser/classes/FormData.js","../node_modules/axios/lib/platform/browser/classes/Blob.js","../node_modules/axios/lib/platform/browser/index.js","../node_modules/axios/lib/platform/common/utils.js","../node_modules/axios/lib/platform/index.js","../node_modules/axios/lib/helpers/toURLEncodedForm.js","../node_modules/axios/lib/helpers/formDataToJSON.js","../node_modules/axios/lib/defaults/index.js","../node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/axios/lib/core/AxiosHeaders.js","../node_modules/axios/lib/core/transformData.js","../node_modules/axios/lib/cancel/isCancel.js","../node_modules/axios/lib/cancel/CanceledError.js","../node_modules/axios/lib/core/settle.js","../node_modules/axios/lib/helpers/parseProtocol.js","../node_modules/axios/lib/helpers/speedometer.js","../node_modules/axios/lib/helpers/throttle.js","../node_modules/axios/lib/helpers/progressEventReducer.js","../node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/axios/lib/helpers/cookies.js","../node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/axios/lib/helpers/combineURLs.js","../node_modules/axios/lib/core/buildFullPath.js","../node_modules/axios/lib/core/mergeConfig.js","../node_modules/axios/lib/helpers/resolveConfig.js","../node_modules/axios/lib/adapters/xhr.js","../node_modules/axios/lib/helpers/composeSignals.js","../node_modules/axios/lib/helpers/trackStream.js","../node_modules/axios/lib/adapters/fetch.js","../node_modules/axios/lib/adapters/adapters.js","../node_modules/axios/lib/core/dispatchRequest.js","../node_modules/axios/lib/env/data.js","../node_modules/axios/lib/helpers/validator.js","../node_modules/axios/lib/core/Axios.js","../node_modules/axios/lib/cancel/CancelToken.js","../node_modules/axios/lib/helpers/spread.js","../node_modules/axios/lib/helpers/isAxiosError.js","../node_modules/axios/lib/helpers/HttpStatusCode.js","../node_modules/axios/lib/axios.js","../node_modules/axios/index.js","../src/errors/NlicError.ts","../src/entities/ProductDiscount.ts","../src/converters/itemToProduct.ts","../src/entities/ProductModule.ts","../src/converters/itemToProductModule.ts","../src/entities/Token.ts","../src/converters/itemToToken.ts","../src/entities/LicenseTransactionJoin.ts","../src/entities/Transaction.ts","../src/converters/itemToTransaction.ts","../src/services/Service/instance.ts","../package.json","../src/services/Service/toQueryString.ts","../src/services/Service/request.ts","../src/services/Service/methods.ts","../src/services/Service/index.ts","../src/utils/filter.ts","../src/utils/validation.ts","../src/vo/Page.ts","../src/services/BundleService.ts","../src/vo/ValidationResults.ts","../src/services/LicenseeService.ts","../src/services/LicenseService.ts","../src/services/LicenseTemplateService.ts","../src/services/NotificationService.ts","../src/services/PaymentMethodService.ts","../src/services/ProductModuleService.ts","../src/services/ProductService.ts","../src/services/TokenService.ts","../src/services/TransactionService.ts","../src/services/UtilityService.ts","../src/vo/Context.ts","../src/vo/ValidationParameters.ts"],"sourcesContent":["// constants\nimport Constants from '@/constants';\nimport ApiKeyRole from '@/constants/ApiKeyRole';\nimport LicenseeSecretMode from '@/constants/LicenseeSecretMode';\nimport LicenseType from '@/constants/LicenseType';\nimport LicensingModel from '@/constants/LicensingModel';\nimport NodeSecretMode from '@/constants/NodeSecretMode';\nimport NotificationEvent from '@/constants/NotificationEvent';\nimport NotificationProtocol from '@/constants/NotificationProtocol';\nimport PaymentMethodEnum from '@/constants/PaymentMethodEnum';\nimport SecurityMode from '@/constants/SecurityMode';\nimport TimeVolumePeriod from '@/constants/TimeVolumePeriod';\nimport TokenType from '@/constants/TokenType';\nimport TransactionSource from '@/constants/TransactionSource';\nimport TransactionStatus from '@/constants/TransactionStatus';\n\n// converters\nimport itemToBundle from '@/converters/itemToBundle';\nimport itemToCountry from '@/converters/itemToCountry';\nimport itemToLicense from '@/converters/itemToLicense';\nimport itemToLicensee from '@/converters/itemToLicensee';\nimport itemToLicenseTemplate from '@/converters/itemToLicenseTemplate';\nimport itemToNotification from '@/converters/itemToNotification';\nimport itemToObject from '@/converters/itemToObject';\nimport itemToPaymentMethod from '@/converters/itemToPaymentMethod';\nimport itemToProduct from '@/converters/itemToProduct';\nimport itemToProductModule from '@/converters/itemToProductModule';\nimport itemToToken from '@/converters/itemToToken';\nimport itemToTransaction from '@/converters/itemToTransaction';\n\n// entities\nimport Bundle from '@/entities/Bundle';\nimport Country from '@/entities/Country';\nimport defineEntity from '@/entities/defineEntity';\nimport License from '@/entities/License';\nimport Licensee from '@/entities/Licensee';\nimport LicenseTemplate from '@/entities/LicenseTemplate';\nimport LicenseTransactionJoin from '@/entities/LicenseTransactionJoin';\nimport Notification from '@/entities/Notification';\nimport PaymentMethod from '@/entities/PaymentMethod';\nimport Product from '@/entities/Product';\nimport ProductDiscount from '@/entities/ProductDiscount';\nimport ProductModule from '@/entities/ProductModule';\nimport Token from '@/entities/Token';\nimport Transaction from '@/entities/Transaction';\n\n// errors\nimport NlicError from '@/errors/NlicError';\n\n// services\nimport BundleService from '@/services/BundleService';\nimport LicenseeService from '@/services/LicenseeService';\nimport LicenseService from '@/services/LicenseService';\nimport LicenseTemplateService from '@/services/LicenseTemplateService';\nimport NotificationService from '@/services/NotificationService';\nimport PaymentMethodService from '@/services/PaymentMethodService';\nimport ProductModuleService from '@/services/ProductModuleService';\nimport ProductService from '@/services/ProductService';\nimport Service from '@/services/Service';\nimport TokenService from '@/services/TokenService';\nimport TransactionService from '@/services/TransactionService';\nimport UtilityService from '@/services/UtilityService';\n\n// utils\nimport { encode as filterEncode, decode as filterDecode } from '@/utils/filter';\nimport serialize from '@/utils/serialize';\nimport { isValid, isDefined, ensureNotNull, ensureNotEmpty } from '@/utils/validation';\n\n// value object\nimport Context from '@/vo/Context';\nimport Page from '@/vo/Page';\nimport ValidationParameters from '@/vo/ValidationParameters';\nimport ValidationResults from '@/vo/ValidationResults';\n\n// types\nexport type * from '@/types';\n\nexport {\n // constants\n Constants,\n ApiKeyRole,\n LicenseeSecretMode,\n LicenseType,\n LicensingModel,\n NodeSecretMode,\n NotificationEvent,\n NotificationProtocol,\n PaymentMethodEnum,\n SecurityMode,\n TimeVolumePeriod,\n TokenType,\n TransactionSource,\n TransactionStatus,\n\n // converters\n itemToBundle,\n itemToCountry,\n itemToLicense,\n itemToLicensee,\n itemToLicenseTemplate,\n itemToNotification,\n itemToObject,\n itemToPaymentMethod,\n itemToProduct,\n itemToProductModule,\n itemToToken,\n itemToTransaction,\n\n // entities\n Bundle,\n Country,\n defineEntity,\n License,\n Licensee,\n LicenseTemplate,\n LicenseTransactionJoin,\n Notification,\n PaymentMethod,\n Product,\n ProductDiscount,\n ProductModule,\n Token,\n Transaction,\n\n // errors\n NlicError,\n\n // services\n BundleService,\n LicenseeService,\n LicenseService,\n LicenseTemplateService,\n NotificationService,\n PaymentMethodService,\n ProductModuleService,\n ProductService,\n Service,\n TokenService,\n TransactionService,\n UtilityService,\n\n // utils\n filterEncode,\n filterDecode,\n serialize,\n isValid,\n isDefined,\n ensureNotNull,\n ensureNotEmpty,\n\n // vo\n Context,\n Page,\n ValidationParameters,\n ValidationResults,\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nconst LicenseeSecretMode = Object.freeze({\n // @deprecated\n DISABLED: 'DISABLED',\n PREDEFINED: 'PREDEFINED',\n CLIENT: 'CLIENT',\n});\n\nexport default LicenseeSecretMode;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nconst LicenseType = Object.freeze({\n FEATURE: 'FEATURE',\n TIMEVOLUME: 'TIMEVOLUME',\n FLOATING: 'FLOATING',\n QUANTITY: 'QUANTITY',\n});\n\nexport default LicenseType;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nconst NotificationEvent = Object.freeze({\n LICENSEE_CREATED: 'LICENSEE_CREATED',\n LICENSE_CREATED: 'LICENSE_CREATED',\n WARNING_LEVEL_CHANGED: 'WARNING_LEVEL_CHANGED',\n PAYMENT_TRANSACTION_PROCESSED: 'PAYMENT_TRANSACTION_PROCESSED',\n});\n\nexport default NotificationEvent;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nconst NotificationProtocol = Object.freeze({\n WEBHOOK: 'WEBHOOK',\n});\n\nexport default NotificationProtocol;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nconst SecurityMode = Object.freeze({\n BASIC_AUTHENTICATION: 'BASIC_AUTH',\n APIKEY_IDENTIFICATION: 'APIKEY',\n ANONYMOUS_IDENTIFICATION: 'ANONYMOUS',\n});\n\nexport default SecurityMode;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nconst TimeVolumePeriod = Object.freeze({\n DAY: 'DAY',\n WEEK: 'WEEK',\n MONTH: 'MONTH',\n YEAR: 'YEAR',\n});\n\nexport default TimeVolumePeriod;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nconst TokenType = Object.freeze({\n DEFAULT: 'DEFAULT',\n SHOP: 'SHOP',\n APIKEY: 'APIKEY',\n ACTION: 'ACTION',\n});\n\nexport default TokenType;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nconst TransactionSource = Object.freeze({\n SHOP: 'SHOP',\n\n AUTO_LICENSE_CREATE: 'AUTO_LICENSE_CREATE',\n AUTO_LICENSE_UPDATE: 'AUTO_LICENSE_UPDATE',\n AUTO_LICENSE_DELETE: 'AUTO_LICENSE_DELETE',\n\n AUTO_LICENSEE_CREATE: 'AUTO_LICENSEE_CREATE',\n AUTO_LICENSEE_DELETE: 'AUTO_LICENSEE_DELETE',\n AUTO_LICENSEE_VALIDATE: 'AUTO_LICENSEE_VALIDATE',\n\n AUTO_LICENSETEMPLATE_DELETE: 'AUTO_LICENSETEMPLATE_DELETE',\n\n AUTO_PRODUCTMODULE_DELETE: 'AUTO_PRODUCTMODULE_DELETE',\n\n AUTO_PRODUCT_DELETE: 'AUTO_PRODUCT_DELETE',\n\n AUTO_LICENSES_TRANSFER: 'AUTO_LICENSES_TRANSFER',\n\n SUBSCRIPTION_UPDATE: 'SUBSCRIPTION_UPDATE',\n\n RECURRING_PAYMENT: 'RECURRING_PAYMENT',\n\n CANCEL_RECURRING_PAYMENT: 'CANCEL_RECURRING_PAYMENT',\n\n OBTAIN_BUNDLE: 'OBTAIN_BUNDLE',\n});\n\nexport default TransactionSource;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nconst TransactionStatus = Object.freeze({\n PENDING: 'PENDING',\n CLOSED: 'CLOSED',\n CANCELLED: 'CANCELLED',\n});\n\nexport default TransactionStatus;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nimport LicenseeSecretMode from '@/constants/LicenseeSecretMode';\nimport LicenseType from '@/constants/LicenseType';\nimport NotificationEvent from '@/constants/NotificationEvent';\nimport NotificationProtocol from '@/constants/NotificationProtocol';\nimport SecurityMode from '@/constants/SecurityMode';\nimport TimeVolumePeriod from '@/constants/TimeVolumePeriod';\nimport TokenType from '@/constants/TokenType';\nimport TransactionSource from '@/constants/TransactionSource';\nimport TransactionStatus from '@/constants/TransactionStatus';\n\nexport default {\n LicenseeSecretMode,\n LicenseType,\n NotificationEvent,\n NotificationProtocol,\n SecurityMode,\n TimeVolumePeriod,\n TokenType,\n TransactionSource,\n TransactionStatus,\n\n // @deprecated use SecurityMode.BASIC_AUTHENTICATION instead\n BASIC_AUTHENTICATION: 'BASIC_AUTH',\n\n // @deprecated use SecurityMode.APIKEY_IDENTIFICATION instead\n APIKEY_IDENTIFICATION: 'APIKEY',\n\n // @deprecated use SecurityMode.ANONYMOUS_IDENTIFICATION instead\n ANONYMOUS_IDENTIFICATION: 'ANONYMOUS',\n\n FILTER: 'filter',\n\n Product: {\n TYPE: 'Product',\n ENDPOINT_PATH: 'product',\n },\n\n ProductModule: {\n TYPE: 'ProductModule',\n ENDPOINT_PATH: 'productmodule',\n PRODUCT_MODULE_NUMBER: 'productModuleNumber',\n },\n\n Licensee: {\n TYPE: 'Licensee',\n ENDPOINT_PATH: 'licensee',\n ENDPOINT_PATH_VALIDATE: 'validate',\n ENDPOINT_PATH_TRANSFER: 'transfer',\n LICENSEE_NUMBER: 'licenseeNumber',\n },\n\n LicenseTemplate: {\n TYPE: 'LicenseTemplate',\n ENDPOINT_PATH: 'licensetemplate',\n\n // @deprecated use LicenseType directly instead\n LicenseType,\n },\n\n License: {\n TYPE: 'License',\n ENDPOINT_PATH: 'license',\n },\n\n Validation: {\n TYPE: 'ProductModuleValidation',\n },\n\n Token: {\n TYPE: 'Token',\n ENDPOINT_PATH: 'token',\n\n // @deprecated use TokenType directly instead\n Type: TokenType,\n },\n\n PaymentMethod: {\n TYPE: 'PaymentMethod',\n ENDPOINT_PATH: 'paymentmethod',\n },\n\n Bundle: {\n TYPE: 'Bundle',\n ENDPOINT_PATH: 'bundle',\n ENDPOINT_OBTAIN_PATH: 'obtain',\n },\n\n Notification: {\n TYPE: 'Notification',\n ENDPOINT_PATH: 'notification',\n\n // @deprecated use NotificationProtocol directly instead\n Protocol: NotificationProtocol,\n\n // @deprecated use NotificationEvent directly instead\n Event: NotificationEvent,\n },\n\n Transaction: {\n TYPE: 'Transaction',\n ENDPOINT_PATH: 'transaction',\n\n // @deprecated use TransactionStatus directly instead\n Status: TransactionStatus,\n },\n\n Utility: {\n ENDPOINT_PATH: 'utility',\n ENDPOINT_PATH_LICENSE_TYPES: 'licenseTypes',\n ENDPOINT_PATH_LICENSING_MODELS: 'licensingModels',\n ENDPOINT_PATH_COUNTRIES: 'countries',\n LICENSING_MODEL_TYPE: 'LicensingModelProperties',\n LICENSE_TYPE: 'LicenseType',\n COUNTRY_TYPE: 'Country',\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nconst ApiKeyRole = Object.freeze({\n ROLE_APIKEY_LICENSEE: 'ROLE_APIKEY_LICENSEE',\n ROLE_APIKEY_ANALYTICS: 'ROLE_APIKEY_ANALYTICS',\n ROLE_APIKEY_OPERATION: 'ROLE_APIKEY_OPERATION',\n ROLE_APIKEY_MAINTENANCE: 'ROLE_APIKEY_MAINTENANCE',\n ROLE_APIKEY_ADMIN: 'ROLE_APIKEY_ADMIN',\n});\n\nexport default ApiKeyRole;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nconst LicensingModel = Object.freeze({\n TRY_AND_BUY: 'TryAndBuy',\n SUBSCRIPTION: 'Subscription',\n RENTAL: 'Rental',\n FLOATING: 'Floating',\n MULTI_FEATURE: 'MultiFeature',\n PAY_PER_USE: 'PayPerUse',\n PRICING_TABLE: 'PricingTable',\n QUOTA: 'Quota',\n NODE_LOCKED: 'NodeLocked',\n DISCOUNT: 'Discount',\n});\n\nexport default LicensingModel;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nconst NodeSecretMode = Object.freeze({\n PREDEFINED: 'PREDEFINED',\n CLIENT: 'CLIENT',\n});\n\nexport default NodeSecretMode;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nconst PaymentMethodEnum = Object.freeze({\n NULL: 'NULL',\n PAYPAL: 'PAYPAL',\n PAYPAL_SANDBOX: 'PAYPAL_SANDBOX',\n STRIPE: 'STRIPE',\n STRIPE_TESTING: 'STRIPE_TESTING',\n});\n\nexport default PaymentMethodEnum;\n","import { Item, List } from '@/types/api/response';\n\nconst cast = (value: string): unknown => {\n try {\n return JSON.parse(value);\n } catch (e) {\n return value;\n }\n};\n\nconst extractProperties = (properties?: { name: string; value: string }[]) => {\n const result: Record = {};\n properties?.forEach(({ name, value }) => {\n result[name] = cast(value);\n });\n return result;\n};\n\nconst extractLists = (lists?: List[]) => {\n const result: Record = {};\n\n lists?.forEach((list) => {\n const { name } = list;\n result[name] = result[name] || [];\n result[name].push(itemToObject(list));\n });\n return result;\n};\n\nconst itemToObject = >(item?: Item | List): T => {\n return item ? ({ ...extractProperties(item.property), ...extractLists(item.list) } as T) : ({} as T);\n};\n\nexport default itemToObject;\n","export const has = (obj: T, key: K): boolean => {\n return Object.hasOwn(obj, key);\n};\n\nexport const set = (obj: T, key: K, value: T[K]): void => {\n obj[key] = value;\n};\n\nexport const get = (obj: T, key: K, def?: D): T[K] | D => {\n return has(obj, key) ? obj[key] : (def as D);\n};\n\nexport default {\n has,\n set,\n get,\n};\n","/**\n * Converts an object into a map of type Record, where the value of each object property is converted\n * to a string.\n * If the property's value is `undefined`, it will be replaced with an empty string.\n * If the value is already a string, it will remain unchanged.\n * If the value is Date instance, it wll be replaced with an ISO format date string.\n * For complex types (objects, arrays, etc.), the value will be serialized into a JSON string.\n * If serialization fails, the value will be converted to a string using `String()`.\n *\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n *\n * @param obj - The object to be converted into a map.\n * @param options\n * @returns A map (Record) with converted property values from the object.\n */\nexport default (obj: T, options: { ignore?: string[] } = {}): Record => {\n const map: Record = {};\n\n const { ignore = [] } = options;\n\n Object.entries(obj).forEach(([k, v]) => {\n // ignore keys\n if (ignore.includes(k)) {\n return;\n }\n\n if (typeof v === 'function') {\n // ignore functions\n return;\n } else if (v === undefined) {\n map[k] = ''; // if the value is `undefined`, replace it with an empty string\n } else if (typeof v === 'string') {\n map[k] = v; // If the value is already a string, leave it unchanged\n } else if (v instanceof Date) {\n // if the value is Date, convert it to ISO string\n map[k] = v.toISOString();\n } else if (typeof v !== 'object' || v === null) {\n // If it's not an object (or is null), convert it to string\n map[k] = String(v);\n } else {\n // Try to serialize the object or array into JSON\n try {\n map[k] = JSON.stringify(v);\n } catch {\n map[k] = String(v);\n }\n }\n });\n\n return map;\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n// types\nimport type {\n Entity,\n EntityMethods,\n Proto,\n PropGetEventListener,\n PropSetEventListener,\n} from '@/types/entities/defineEntity';\n\n// utils\nimport { set, has, get } from '@/utils/helpers';\nimport serialize from '@/utils/serialize';\n\nconst defineEntity = function (\n props: T,\n methods: M,\n proto: P = {} as P,\n options?: { set?: PropSetEventListener; get?: PropGetEventListener },\n) {\n const listeners: { set: PropSetEventListener[]; get: PropGetEventListener[] } = {\n set: [],\n get: [],\n };\n\n if (options?.get) {\n listeners.get.push(options.get);\n }\n\n if (options?.set) {\n listeners.set.push(options.set);\n }\n\n const base: EntityMethods = {\n set(this: void, key, value): void {\n set(props, key, value);\n },\n\n get(this: void, key, def) {\n return get(props, key, def);\n },\n\n has(this: void, key) {\n return has(props, key);\n },\n\n // Aliases\n setProperty(key, value) {\n this.set(key, value);\n },\n\n addProperty(key, value) {\n this.set(key, value);\n },\n\n getProperty(key, def) {\n return this.get(key, def);\n },\n\n hasProperty(key) {\n return this.has(key);\n },\n\n setProperties(properties) {\n Object.entries(properties).forEach(([k, v]) => {\n this.set(k as keyof T, v as T[keyof T]);\n });\n },\n\n serialize(this: void) {\n return serialize(props);\n },\n };\n\n return new Proxy(props, {\n get(obj: T, prop: string | symbol, receiver) {\n if (Object.hasOwn(methods, prop)) {\n return methods[prop as keyof typeof methods];\n }\n\n if (Object.hasOwn(base, prop)) {\n return base[prop as keyof typeof base];\n }\n\n listeners.get.forEach((l) => {\n l(obj, prop, receiver);\n });\n\n return Reflect.get(obj, prop, receiver);\n },\n\n set(obj, prop, value, receiver) {\n listeners.set.forEach((l) => {\n l(obj, prop, value, receiver);\n });\n\n return Reflect.set(obj, prop, value, receiver);\n },\n\n getPrototypeOf() {\n return proto.prototype || null;\n },\n }) as Entity;\n};\n\nexport default defineEntity;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\n// types\nimport type { BundleProps, BundleMethods, BundleEntity } from '@/types/entities/Bundle';\n\n// utils\nimport { set, get } from '@/utils/helpers';\nimport serialize from '@/utils/serialize';\n\n// entity factory\nimport defineEntity from './defineEntity';\n\n/**\n * NetLicensing Bundle entity.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number that identifies the bundle. Vendor can assign this number when creating a bundle or\n * let NetLicensing generate one.\n * @property string number\n *\n * If set to false, the bundle is disabled.\n * @property boolean active\n *\n * Bundle name.\n * @property string name\n *\n * Price for the bundle. If >0, it must always be accompanied by the currency specification.\n * @property number price\n *\n * Specifies currency for the bundle price. Check data types to discover which currencies are\n * supported.\n * @property string currency\n *\n * The bundle includes a set of templates, each identified by a unique template number.\n * @property string[] licenseTemplateNumbers\n *\n * Arbitrary additional user properties of string type may be associated with each bundle. The name of user property\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted.\n */\nconst Bundle = function (properties: BundleProps = {} as BundleProps): BundleEntity {\n const props: BundleProps = { ...properties };\n\n const methods: BundleMethods = {\n setActive(this: void, active: boolean) {\n set(props, 'active', active);\n },\n\n getActive(this: void, def?: D): boolean | D {\n return get(props, 'active', def) as boolean | D;\n },\n\n setNumber(this: void, number: string) {\n set(props, 'number', number);\n },\n\n getNumber(this: void, def?: D): string | D {\n return get(props, 'number', def) as string | D;\n },\n\n setName(this: void, name: string): void {\n set(props, 'name', name);\n },\n\n getName(this: void, def?: D): string | D {\n return get(props, 'name', def) as string | D;\n },\n\n setPrice(this: void, price: number): void {\n set(props, 'price', price);\n },\n\n getPrice(this: void, def?: D): number | D {\n return get(props, 'price', def) as number | D;\n },\n\n setCurrency(this: void, currency: string): void {\n set(props, 'currency', currency);\n },\n\n getCurrency(this: void, def?: D): string | D {\n return get(props, 'currency', def) as string | D;\n },\n\n setLicenseTemplateNumbers(this: void, numbers: string[]): void {\n set(props, 'licenseTemplateNumbers', numbers);\n },\n\n addLicenseTemplateNumber(this: void, number: string): void {\n if (!props.licenseTemplateNumbers) {\n props.licenseTemplateNumbers = [];\n }\n\n props.licenseTemplateNumbers.push(number);\n },\n\n getLicenseTemplateNumbers(this: void, def?: D): string[] | D {\n return get(props, 'licenseTemplateNumbers', def) as string[] | D;\n },\n\n removeLicenseTemplateNumber(this: void, number: string): void {\n const { licenseTemplateNumbers: numbers = [] } = props;\n\n numbers.splice(numbers.indexOf(number), 1);\n props.licenseTemplateNumbers = numbers;\n },\n\n serialize(this: void): Record {\n if (props.licenseTemplateNumbers) {\n const licenseTemplateNumbers = props.licenseTemplateNumbers.join(',');\n return serialize({ ...props, licenseTemplateNumbers });\n }\n\n return serialize(props);\n },\n };\n\n return defineEntity(props as BundleProps, methods, Bundle);\n};\n\nexport default Bundle;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nimport itemToObject from '@/converters/itemToObject';\nimport Bundle from '@/entities/Bundle';\n\n// types\nimport { Item } from '@/types/api/response';\nimport { BundleProps } from '@/types/entities/Bundle';\n\nexport default (item?: Item) => {\n const props = itemToObject>(item);\n\n const { licenseTemplateNumbers } = props;\n\n if (licenseTemplateNumbers && typeof licenseTemplateNumbers === 'string') {\n props.licenseTemplateNumbers = licenseTemplateNumbers.split(',');\n }\n\n return Bundle(props as BundleProps);\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n// types\nimport type { CountryProps, CountryMethods, CountryEntity } from '@/types/entities/Country';\n\n// entity factory\nimport defineEntity from './defineEntity';\n\n/**\n * Country entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * @property code - Unique code of country.\n * @property name - Unique name of country\n * @property vatPercent - Country vat.\n * @property isEu - is country in EU.\n */\nconst Country = function (properties: CountryProps = {} as CountryProps): CountryEntity {\n const defaults: CountryProps = {\n code: '',\n name: '',\n vatPercent: 0,\n isEu: false,\n };\n\n const props: CountryProps = { ...defaults, ...properties };\n\n const methods: CountryMethods = {\n getCode(this: void): string {\n return props.code;\n },\n\n getName(this: void): string {\n return props.name;\n },\n\n getVatPercent(this: void): number {\n return props.vatPercent as number;\n },\n\n getIsEu(this: void): boolean {\n return props.isEu;\n },\n };\n\n return defineEntity(props, methods, Country);\n};\n\nexport default Country;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nimport itemToObject from '@/converters/itemToObject';\n\n// entities\nimport Country from '@/entities/Country';\n\n// types\nimport { Item } from '@/types/api/response';\nimport { CountryProps } from '@/types/entities/Country';\n\nexport default (item?: Item) => Country(itemToObject(item));\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n// types\nimport { TimeVolumePeriodValues } from '@/types/constants/TimeVolumePeriod';\nimport { LicenseMethods, LicenseProps, LicenseEntity } from '@/types/entities/License';\n\n// utils\nimport { set, get } from '@/utils/helpers';\nimport serialize from '@/utils/serialize';\n\n// entity factory\nimport defineEntity from './defineEntity';\n\n/**\n * License entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can\n * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation\n * transaction status is set to closed.\n * @property string number\n *\n * Name for the licensed item. Set from license template on creation, if not specified explicitly.\n * @property string name\n *\n * If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled,\n * the license is excluded from the validation process.\n * @property boolean active\n *\n * price for the license. If >0, it must always be accompanied by the currency specification. Read-only,\n * set from license template on creation.\n * @property number price\n *\n * specifies currency for the license price. Check data types to discover which currencies are\n * supported. Read-only, set from license template on creation.\n * @property string currency\n *\n * If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license\n * template on creation, if not specified explicitly.\n * @property boolean hidden\n *\n * The unique identifier assigned to the licensee (the entity to whom the license is issued). This number is typically\n * associated with a specific customer or organization. It is used internally to reference the licensee and cannot be\n * changed after the license is created.\n * @property string licenseeNumber\n *\n * The unique identifier for the license template from which this license was created.\n * @property string licenseTemplateNumber\n *\n * A boolean flag indicating whether the license is actively being used. If true, it means the license is currently in\n * use. If false, the license is not currently assigned or in use.\n * @property boolean inUse\n *\n * This parameter is specific to TimeVolume licenses and indicates the total volume of time (e.g., in hours, days, etc.)\n * associated with the license. This value defines the amount of time the license covers, which may affect the usage\n * period and limits associated with the license.\n * @property number timeVolume\n *\n * Also, specific to TimeVolume licenses, this field defines the period of time for the timeVolume\n * (e.g., \"DAY\", \"WEEK\", \"MONTH\", \"YEAR\"). It provides the time unit for the timeVolume value, clarifying whether the\n * time is measured in days, weeks, or any other defined period.\n * @property string timeVolumePeriod\n *\n * For TimeVolume licenses, this field indicates the start date of the license’s validity period. This date marks when\n * the license becomes active and the associated time volume starts being consumed.\n * It can be represented as a string \"now\" or a Date object.\n * @property string|Date Date startDate\n *\n * Parent(Feature) license number\n * @property string parentfeature\n *\n * Arbitrary additional user properties of string type may be associated with each license. The name of user property\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, licenseeNumber,\n * licenseTemplateNumber.\n */\nconst License = function (properties: LicenseProps = {} as LicenseProps): LicenseEntity {\n const props: LicenseProps = { ...(properties as T) };\n\n const methods: LicenseMethods = {\n setActive(this: void, active: boolean): void {\n set(props, 'active', active);\n },\n\n getActive(this: void, def?: D): boolean | D {\n return get(props, 'active', def) as boolean | D;\n },\n\n setNumber(this: void, number: string): void {\n set(props, 'number', number);\n },\n\n getNumber(this: void, def?: D): string | D {\n return get(props, 'number', def) as string | D;\n },\n\n setName(this: void, name: string): void {\n set(props, 'name', name);\n },\n\n getName(this: void, def?: D): string | D {\n return get(props, 'name', def) as string | D;\n },\n\n setPrice(this: void, price: number): void {\n set(props, 'price', price);\n },\n\n getPrice(this: void, def?: D): number | D {\n return get(props, 'price', def) as number | D;\n },\n\n setCurrency(this: void, currency: string): void {\n set(props, 'currency', currency);\n },\n\n getCurrency(this: void, def?: D): string | D {\n return get(props, 'currency', def) as string | D;\n },\n\n setHidden(this: void, hidden: boolean): void {\n set(props, 'hidden', hidden);\n },\n\n getHidden(this: void, def?: D): boolean | D {\n return get(props, 'hidden', def) as boolean | D;\n },\n\n setLicenseeNumber(this: void, number: string): void {\n set(props, 'licenseeNumber', number);\n },\n\n getLicenseeNumber(this: void, def?: D): string | D {\n return get(props, 'licenseeNumber', def) as string | D;\n },\n\n setLicenseTemplateNumber(this: void, number: string): void {\n set(props, 'licenseTemplateNumber', number);\n },\n\n getLicenseTemplateNumber(this: void, def?: D): string | D {\n return get(props, 'licenseTemplateNumber', def) as string | D;\n },\n\n // TimeVolume\n setTimeVolume(this: void, timeVolume: number): void {\n set(props, 'timeVolume', timeVolume);\n },\n\n getTimeVolume(this: void, def?: D): number | D {\n return get(props, 'timeVolume', def) as number | D;\n },\n\n setTimeVolumePeriod(this: void, timeVolumePeriod: TimeVolumePeriodValues): void {\n set(props, 'timeVolumePeriod', timeVolumePeriod);\n },\n\n getTimeVolumePeriod(this: void, def?: D): TimeVolumePeriodValues | D {\n return get(props, 'timeVolumePeriod', def) as TimeVolumePeriodValues | D;\n },\n\n setStartDate(this: void, startDate: Date | 'now'): void {\n set(props, 'startDate', startDate);\n },\n\n getStartDate(this: void, def?: D): Date | 'now' | D {\n return get(props, 'startDate', def) as Date | 'now' | D;\n },\n\n // Rental\n setParentfeature(this: void, parentfeature?: string): void {\n set(props, 'parentfeature', parentfeature);\n },\n\n getParentfeature(this: void, def?: D): string | D {\n return get(props, 'parentfeature', def) as string | D;\n },\n\n serialize(this: void): Record {\n return serialize(props, { ignore: ['inUse'] });\n },\n };\n\n return defineEntity(props as LicenseProps, methods, License);\n};\n\nexport default License;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nimport itemToObject from '@/converters/itemToObject';\nimport License from '@/entities/License';\n\n// types\nimport { Item } from '@/types/api/response';\nimport { LicenseProps } from '@/types/entities/License';\n\nexport default (item?: Item) => {\n const props = itemToObject>(item);\n\n const { startDate } = props;\n\n if (startDate && typeof startDate === 'string') {\n props.startDate = startDate === 'now' ? startDate : new Date(startDate);\n }\n\n return License(props as LicenseProps);\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\n// entity factory\nimport defineEntity from '@/entities/defineEntity';\n\n// types\nimport { LicenseeMethods, LicenseeProps, LicenseeEntity } from '@/types/entities/Licensee';\n\n// utils\nimport { set, get } from '@/utils/helpers';\nimport serialize from '@/utils/serialize';\n\n/**\n * Licensee entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this\n * number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for\n * the licensee.\n * @property string number\n *\n * Licensee name.\n * @property string name\n *\n * If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is\n * disabled (tbd).\n * @property boolean active\n *\n * Licensee Secret for licensee deprecated use Node-Locked Licensing Model instead\n * @property string licenseeSecret\n *\n * Mark licensee for transfer.\n * @property boolean markedForTransfer\n *\n * Arbitrary additional user properties of string type may be associated with each licensee. The name of user property\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, productNumber\n */\n\nconst Licensee = function (properties: LicenseeProps = {} as LicenseeProps): LicenseeEntity {\n const props: LicenseeProps = { ...properties };\n\n const methods: LicenseeMethods = {\n setActive(this: void, active: boolean): void {\n set(props, 'active', active);\n },\n\n getActive(this: void, def?: D): boolean | D {\n return get(props, 'active', def) as boolean | D;\n },\n\n setNumber(this: void, number: string): void {\n set(props, 'number', number);\n },\n getNumber(this: void, def?: D): string | D {\n return get(props, 'number', def) as string | D;\n },\n\n setName(this: void, name: string): void {\n set(props, 'name', name);\n },\n\n getName(this: void, def?: D): string | D {\n return get(props, 'name', def) as string | D;\n },\n\n setProductNumber(this: void, number: string): void {\n set(props, 'productNumber', number);\n },\n\n getProductNumber(this: void, def?: D): string | D {\n return get(props, 'productNumber', def) as string | D;\n },\n\n setMarkedForTransfer(this: void, mark: boolean): void {\n set(props, 'markedForTransfer', mark);\n },\n\n getMarkedForTransfer(this: void, def?: D): boolean | D {\n return get(props, 'markedForTransfer', def) as boolean | D;\n },\n\n serialize(this: void): Record {\n return serialize(props, { ignore: ['inUse'] });\n },\n };\n\n return defineEntity(props as LicenseeProps, methods, Licensee);\n};\n\nexport default Licensee;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nimport itemToObject from '@/converters/itemToObject';\nimport Licensee from '@/entities/Licensee';\n\n// types\nimport { Item } from '@/types/api/response';\nimport { LicenseeProps } from '@/types/entities/Licensee';\n\nexport default (item?: Item) => Licensee(itemToObject(item));\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link https://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n// entity factory\nimport defineEntity from '@/entities/defineEntity';\n\n// types\nimport { LicenseTypeValues } from '@/types/constants/LicenseType';\nimport { TimeVolumePeriodValues } from '@/types/constants/TimeVolumePeriod';\nimport { LicenseTemplateMethods, LicenseTemplateProps, LicenseTemplateEntity } from '@/types/entities/LicenseTemplate';\n\n// utils\nimport { set, get } from '@/utils/helpers';\nimport serialize from '@/utils/serialize';\n\n/**\n * License template entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number (across all products of a vendor) that identifies the license template. Vendor can\n * assign this number when creating a license template or let NetLicensing generate one.\n * Read-only after creation of the first license from this license template.\n * @property string number\n *\n * If set to false, the license template is disabled. Licensee can not obtain any new licenses off this\n * license template.\n * @property boolean active\n *\n * Name for the licensed item.\n * @property string name\n *\n * Type of licenses created from this license template. Supported types: \"FEATURE\", \"TIMEVOLUME\",\n * \"FLOATING\", \"QUANTITY\"\n * @property string licenseType\n *\n * Price for the license. If >0, it must always be accompanied by the currency specification.\n * @property number price\n *\n * Specifies currency for the license price. Check data types to discover which currencies are\n * supported.\n * @property string currency\n *\n * If set to true, every new licensee automatically gets one license out of this license template on\n * creation. Automatic licenses must have their price set to 0.\n * @property boolean automatic\n *\n * If set to true, this license template is not shown in NetLicensing Shop as offered for purchase.\n * @property boolean hidden\n *\n * If set to true, licenses from this license template are not visible to the end customer, but\n * participate in validation.\n * @property boolean hideLicenses\n *\n * If set to true, this license template defines grace period of validity granted after subscription expiration.\n * @property boolean gracePeriod\n *\n * Mandatory for 'TIMEVOLUME' license type.\n * @property number timeVolume\n *\n * Time volume period for 'TIMEVOLUME' license type. Supported types: \"DAY\", \"WEEK\", \"MONTH\", \"YEAR\"\n * @property string timeVolumePeriod\n *\n * Mandatory for 'FLOATING' license type.\n * @property number maxSessions\n *\n * Mandatory for 'QUANTITY' license type.\n * @property number quantity\n */\n\nconst LicenseTemplate = function (\n properties: LicenseTemplateProps = {} as LicenseTemplateProps,\n): LicenseTemplateEntity {\n const props: LicenseTemplateProps = { ...properties };\n\n const methods: LicenseTemplateMethods = {\n setActive(this: void, active: boolean): void {\n set(props, 'active', active);\n },\n\n getActive(this: void, def?: D): boolean | D {\n return get(props, 'active', def) as boolean | D;\n },\n\n setNumber(this: void, number: string): void {\n set(props, 'number', number);\n },\n\n getNumber(this: void, def?: D): string | D {\n return get(props, 'number', def) as string | D;\n },\n\n setName(this: void, name: string): void {\n set(props, 'name', name);\n },\n\n getName(this: void, def?: D): string | D {\n return get(props, 'name', def) as string | D;\n },\n\n setLicenseType(this: void, type: LicenseTypeValues): void {\n set(props, 'licenseType', type);\n },\n\n getLicenseType(this: void, def?: D): LicenseTypeValues | D {\n return get(props, 'licenseType', def) as LicenseTypeValues | D;\n },\n\n setPrice(this: void, price: number): void {\n set(props, 'price', price);\n },\n\n getPrice(this: void, def?: D): number | D {\n return get(props, 'price', def) as number | D;\n },\n\n setCurrency(this: void, currency: string): void {\n set(props, 'currency', currency);\n },\n\n getCurrency(this: void, def?: D): string | D {\n return get(props, 'currency', def) as string | D;\n },\n\n setAutomatic(this: void, automatic: boolean): void {\n set(props, 'automatic', automatic);\n },\n\n getAutomatic(this: void, def?: D): boolean | D {\n return get(props, 'automatic', def) as boolean | D;\n },\n\n setHidden(this: void, hidden: boolean): void {\n set(props, 'hidden', hidden);\n },\n\n getHidden(this: void, def?: D): boolean | D {\n return get(props, 'hidden', def) as boolean | D;\n },\n\n setHideLicenses(this: void, hideLicenses: boolean): void {\n set(props, 'hideLicenses', hideLicenses);\n },\n\n getHideLicenses(this: void, def?: D): boolean | D {\n return get(props, 'hideLicenses', def) as boolean | D;\n },\n\n setGracePeriod(this: void, gradePeriod: boolean): void {\n set(props, 'gracePeriod', gradePeriod);\n },\n\n getGracePeriod(this: void, def?: D): boolean | D {\n return get(props, 'gracePeriod', def) as boolean | D;\n },\n\n setTimeVolume(this: void, timeVolume: number): void {\n set(props, 'timeVolume', timeVolume);\n },\n\n getTimeVolume(this: void, def?: D): number | D {\n return get(props, 'timeVolume', def) as number | D;\n },\n\n setTimeVolumePeriod(this: void, timeVolumePeriod: TimeVolumePeriodValues): void {\n set(props, 'timeVolumePeriod', timeVolumePeriod);\n },\n\n getTimeVolumePeriod(this: void, def?: D): TimeVolumePeriodValues | D {\n return get(props, 'timeVolumePeriod', def) as TimeVolumePeriodValues | D;\n },\n\n setMaxSessions(this: void, maxSessions: number): void {\n set(props, 'maxSessions', maxSessions);\n },\n\n getMaxSessions(this: void, def?: D): number | D {\n return get(props, 'maxSessions', def) as number | D;\n },\n\n setQuantity(this: void, quantity: number): void {\n set(props, 'quantity', quantity);\n },\n\n getQuantity(this: void, def?: D): number | D {\n return get(props, 'quantity', def) as number | D;\n },\n\n setProductModuleNumber(this: void, productModuleNumber: string): void {\n set(props, 'productModuleNumber', productModuleNumber);\n },\n\n getProductModuleNumber(this: void, def?: D): string | D {\n return get(props, 'productModuleNumber', def) as string | D;\n },\n\n serialize(this: void): Record {\n return serialize(props, { ignore: ['inUse'] });\n },\n };\n\n return defineEntity(props as LicenseTemplateProps