/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/@bit-ui-libs/common@1.0.33/dist/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";var __create=Object.create,__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropNames=Object.getOwnPropertyNames,__getOwnPropSymbols=Object.getOwnPropertySymbols,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,i)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,__spreadValues=(e,t)=>{for(var i in t||(t={}))__hasOwnProp.call(t,i)&&__defNormalProp(e,i,t[i]);if(__getOwnPropSymbols)for(var i of __getOwnPropSymbols(t))__propIsEnum.call(t,i)&&__defNormalProp(e,i,t[i]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__export=(e,t)=>{for(var i in t)__defProp(e,i,{get:t[i],enumerable:!0})},__copyProps=(e,t,i,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of __getOwnPropNames(t))__hasOwnProp.call(e,s)||s===i||__defProp(e,s,{get:()=>t[s],enumerable:!(r=__getOwnPropDesc(t,s))||r.enumerable});return e},__toESM=(e,t,i)=>(i=null!=e?__create(__getProtoOf(e)):{},__copyProps(!t&&e&&e.__esModule?i:__defProp(i,"default",{value:e,enumerable:!0}),e)),__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,i)=>new Promise(((r,s)=>{var n=e=>{try{l(i.next(e))}catch(e){s(e)}},a=e=>{try{l(i.throw(e))}catch(e){s(e)}},l=e=>e.done?r(e.value):Promise.resolve(e.value).then(n,a);l((i=i.apply(e,t)).next())})),src_exports={};__export(src_exports,{APP_ID:()=>APP_ID,ASSET_STATUSES:()=>ASSET_STATUSES,ASSET_STEPS:()=>ASSET_STEPS,ActionType:()=>ActionType,AddressService:()=>AddressService,AddressTypeEnum:()=>AddressTypeEnum,AssetLevelEnum:()=>AssetLevelEnum,AssetService:()=>AssetService,AssetStatusEnum:()=>AssetStatusEnum,AttachmentClassification:()=>AttachmentClassification,AttachmentType:()=>AttachmentType,BEING_ID_LEVELS:()=>BEING_ID_LEVELS,BaseService:()=>BaseService,BeingLevelEnum:()=>BeingLevelEnum,BidReasonsEnum:()=>BidReasonsEnum,BidService:()=>BidService,BidStatusEnum:()=>BidStatusEnum,BiometricsModeEnum:()=>BiometricsModeEnum,BiometricsService:()=>BiometricsService,BiometricsStorageKeyEnum:()=>BiometricsStorageKeyEnum,BuyerProfileService:()=>BuyerProfileService,CategoriesService:()=>CategoriesService,CategoryStatusEnum:()=>CategoryStatusEnum,ChainAssetService:()=>ChainAssetService,ChainServiceService:()=>ChainServiceService,ChainTypeEnum:()=>ChainTypeEnum,ChainUtils:()=>ChainUtils,CheckInService:()=>CheckInService,CommonAdminService:()=>CommonAdminService,ConsentActionTypesEnum:()=>ConsentActionTypesEnum,CoreEventTypeEnum:()=>CoreEventTypeEnum,CreatorProfileService:()=>CreatorProfileService,DEFAULT_APP_ID:()=>DEFAULT_APP_ID,DEFAULT_ORG_ID:()=>DEFAULT_ORG_ID,DEVICE_LEVELS:()=>DEVICE_LEVELS,DeviceService:()=>DeviceService,DeviceTypeEnum:()=>DeviceTypeEnum,DeviceTypeIdEnum:()=>DeviceTypeIdEnum,DocumentStatusEnum:()=>DocumentStatusEnum,DocumentTypesService:()=>DocumentTypesService,DocumentsService:()=>DocumentsService,EAddressType:()=>EAddressType,EAttachmentUploadStatus:()=>EAttachmentUploadStatus,EBeingLevel:()=>EBeingLevel,EEventStatus:()=>EEventStatus,EFycCheckStatus:()=>EFycCheckStatus,EGovIdType:()=>EGovIdType,ENCRYPTED_STORAGE_KEYS:()=>ENCRYPTED_STORAGE_KEYS,EOrderStatus:()=>EOrderStatus,EndUserNotificationEventNameEnum:()=>EndUserNotificationEventNameEnum,EventService:()=>EventService,FeedbackEnum:()=>FeedbackEnum,FeedbackService:()=>FeedbackService,FileFormatEnum:()=>FileFormatEnum,FileTypeEnum:()=>FileTypeEnum,HARDWARE_LEVELS:()=>HARDWARE_LEVELS,InfoTypeEnum:()=>InfoTypeEnum,InventoryService:()=>InventoryService,InviteTypeEnum:()=>InviteTypeEnum,ListedStatusEnum:()=>ListedStatusEnum,ListingService:()=>ListingService,LocationAccuracy:()=>LocationAccuracy,MeasurementUnitEnum:()=>MeasurementUnitEnum,MenuService:()=>MenuService,NotificationService:()=>NotificationService,NotificationStatusEnum:()=>NotificationStatusEnum,OrderStatusEnum:()=>OrderStatusEnum,OrderTypeEnum:()=>OrderTypeEnum,OrdersService:()=>OrdersService,OrganizationLocationService:()=>OrganizationLocationService,OrganizationService:()=>OrganizationService,PaymentDetailsService:()=>PaymentDetailsService,PaymentTypeEnum:()=>PaymentTypeEnum,ProfileService:()=>ProfileService,ProfileTypeEnum:()=>ProfileTypeEnum,QrPackageTypeEnum:()=>QrPackageTypeEnum,ReferenceType:()=>ReferenceType,RelationTypeEnum:()=>RelationTypeEnum,RelationsTypeEnum:()=>RelationsTypeEnum,ReportHistoryStatusEnum:()=>ReportHistoryStatusEnum,ReportHistoryTypeEnum:()=>ReportHistoryTypeEnum,ReportTypeEnum:()=>ReportTypeEnum,ReportsService:()=>ReportsService,RoleService:()=>RoleService,S2CAssetService:()=>S2CAssetService,SKIPPABLE_ASSET_STEPS:()=>SKIPPABLE_ASSET_STEPS,SellerProfileService:()=>SellerProfileService,SellerTypeEnum:()=>SellerTypeEnum,SellingMethodEnum:()=>SellingMethodEnum,ShippingAddressService:()=>ShippingAddressService,SocialMediaSiteTypeEnum:()=>SocialMediaSiteTypeEnum,StepEnum:()=>StepEnum,SubjectTypeEnum:()=>SubjectTypeEnum,TraitTypeEnum:()=>TraitTypeEnum,TypesService:()=>TypesService,UserRoleEnum:()=>UserRoleEnum,UserRoleIdEnum:()=>UserRoleIdEnum,UserService:()=>UserService,UserTypeEnum:()=>UserTypeEnum,VerificationTypeEnum:()=>VerificationTypeEnum,VerifyCredentialTypeEnum:()=>VerifyCredentialTypeEnum,VerifyType:()=>VerifyType,VerifyTypeEnum:()=>VerifyTypeEnum,WalletPlatformEnum:()=>WalletPlatformEnum,Web3Service:()=>Web3Service,WishlistService:()=>WishlistService,WitnessTypeEnum:()=>WitnessTypeEnum,assetStatuses:()=>assetStatuses,chainServiceStatuses:()=>chainServiceStatuses,createAndUploadAttachments:()=>createAndUploadAttachments,createQueryParams:()=>createQueryParams,debounce:()=>debounce,formatDate:()=>formatDate,formatNumber:()=>formatNumber,getAssetStatusIndex:()=>getAssetStatusIndex,getAssetVerifyRejected:()=>getAssetVerifyRejected,getAssetVerifyStatus:()=>getAssetVerifyStatus,getAssetVerifyStatusBySteps:()=>getAssetVerifyStatusBySteps,getAttachmentLink:()=>getAttachmentLink,getAuth0Id:()=>getAuth0Id,getAuthEmail:()=>getAuthEmail,getErrorMessage:()=>getErrorMessage,isAssetStatusAfter:()=>isAssetStatusAfter,isAssetStatusBefore:()=>isAssetStatusBefore,isAssetStatusFinished:()=>isAssetStatusFinished,isTokenExpired:()=>isTokenExpired,makeCreateAttachmentsRequest:()=>makeCreateAttachmentsRequest,makeCreateCheckInEventRequest:()=>makeCreateCheckInEventRequest,makeCreateQrAttachmentRequest:()=>makeCreateQrAttachmentRequest,makeGetAssetsParams:()=>makeGetAssetsParams,makeSampleGeolocation:()=>makeSampleGeolocation,makeSampleWeatherData:()=>makeSampleWeatherData,makeUpdateCheckInAttachmentRequest:()=>makeUpdateCheckInAttachmentRequest}),module.exports=__toCommonJS(src_exports);var import_axios=__toESM(require("axios")),BaseService=class{constructor(e){var t;this.axiosInstance=null!=(t=e.axiosInstance)?t:import_axios.default.create({timeout:15e3,validateStatus:e=>e>=200&&e<300}),this.apiUrl=e.apiUrl,this.coreApiServicePrefix="core-events",this.coreApiUrl=`${this.apiUrl}/${this.coreApiServicePrefix}`}beforeQuery(e){return __async(this,null,(function*(){}))}beforeMutation(e){return __async(this,null,(function*(){}))}get(e,t,i){return __async(this,null,(function*(){return this.beforeQuery(t),this.axiosInstance.get(e,__spreadValues({params:t},i)).then((e=>e.data))}))}post(e,t,i){return __async(this,null,(function*(){return this.beforeMutation(t),this.axiosInstance.post(e,t,i).then((e=>e.data))}))}put(e,t,i){return __async(this,null,(function*(){return this.beforeMutation(t),this.axiosInstance.put(e,t,i).then((e=>e.data))}))}patch(e,t){return __async(this,null,(function*(){return this.beforeMutation(t),this.axiosInstance.patch(e,t).then((e=>e.data))}))}delete(e,t,i){return __async(this,null,(function*(){return this.beforeQuery(t),this.axiosInstance.delete(e,__spreadValues({params:t},i)).then((e=>e.data))}))}},APP_ID={CHAINIT:"chainit",SPORTAFI:"sportafi",ARTLOCK:"art_lock",PAIRED:"paired",SITESUPER:"site_super",S2C:"s2c",GREENLIGHT_DATA:"gld",ANYTIME_CASH:"anytime_cash"},DEFAULT_APP_ID=APP_ID.CHAINIT,DEFAULT_ORG_ID="00000000-0000-0000-0000-000000000000",DEVICE_LEVELS=[{level:1,label:"Stationary Kiosk on BIT Trusted Network",color:"#6BAF23",bgColor:"#d3e9bb"},{level:2,label:"Floating Kiosk on BIT Trusted Network",color:"#0C682A",bgColor:"#8BE7A9"},{level:3,label:"Verifed Personal Devices on Public Network",color:"#02381B",bgColor:"#81B79A"},{level:4,label:"Unverifed Personal Devices on Public Network",color:"#191617",bgColor:"#989596"}],ENCRYPTED_STORAGE_KEYS={accessToken:"accessToken",bitToken:"bitToken",refreshToken:"refreshToken",chainItNftWalletAddress:"CHAINIT_NFT_WALLET_ADDRESS",codeVerifier:"codeVerifier",state:"state",sessionToken:"sessionToken",expiresIn:"expiresIn",idToken:"idToken",hasProfile:"hasProfile",introPassed:"introPassed",deviceId:"deviceId",mintPlatform:"mintPlatform",isLoggingDisabled:"isLoggingDisabled",incodeUserId:"incodeUserId",organizationId:"organizationId",themeMode:"themeMode",shippingDetails:"shippingDetails",authStep:"authStep",authEmails:"authEmails",incodeInterviewId:"incodeInterviewId",incodeToken:"incodeToken",selfCustodyWalletAddress:"selfCustodyWalletAddress",selfCustodyWalletMnemonic:"selfCustodyWalletMnemonic",selfCustodyWalletPrivateKey:"selfCustodyWalletPrivateKey"},BEING_ID_LEVELS=[{level:1,label:"Government Witness",description:"Government-Issued ID Created"},{level:2,label:"Government Real ID",description:"Government Validation Added"},{level:3,label:"Secondary Government ID",description:"Multiple IDs Added"},{level:4,label:"Witness Confirmation",description:"VDT Created at Kiosk"},{level:5,label:"Multiple Events",description:"Higher Level Witnesses Added"},{level:6,label:"Human",description:"Account Created, Biometric Template Recorded"}],HARDWARE_LEVELS=[{level:1,label:"Stationary Kiosk on BIT Trusted Network",color:"#6BAF23",bgColor:"#d3e9bb"},{level:2,label:"Floating Kiosk on BIT Trusted Network",color:"#0C682A",bgColor:"#8BE7A9"},{level:3,label:"Verifed Personal Devices on Public Network",color:"#02381B",bgColor:"#81B79A"},{level:4,label:"Unverifed Personal Devices on Public Network",color:"#191617",bgColor:"#989596"}],FileFormatEnum=(e=>(e.CSV="CSV",e.PDF="PDF",e))(FileFormatEnum||{}),InfoTypeEnum=(e=>(e.Who="Who",e.What="What",e.When="When",e.Where="Where",e))(InfoTypeEnum||{}),WitnessTypeEnum=(e=>(e.Witness="witness",e.Buyer="buyer",e.Seller="seller",e))(WitnessTypeEnum||{}),AttachmentType=(e=>(e.TokenDocument="TOKEN_DOCUMENT",e.TokenPhoto="TOKEN_PHOTO",e.VerificationPhoto="VERIFICATION_PHOTO",e.WitnessPhoto="WITNESS_PHOTO",e))(AttachmentType||{}),AttachmentClassification=(e=>(e.Face="FACE",e.GovtId="GOVTID",e.FaceAndGovtId="FACEANDGOVTID",e.QrCode="QRCODE",e.AssetPhoto="ASSET_PHOTO",e.AssetVerificationPhoto="ASSET_VERIFICATION_PHOTO",e.AssetWitnessPhoto="ASSET_WITNESS_PHOTO",e.ServicePhoto="SERVICE_PHOTO",e.ServiceVerificationPhoto="SERVICE_VERIFICATION_PHOTO",e.ServiceWitnessPhoto="SERVICE_WITNESS_PHOTO",e.Other="OTHER",e.AssetDocument="ASSET_DOCUMENT",e.ServiceDocument="SERVICE_DOCUMENT",e))(AttachmentClassification||{}),EAttachmentUploadStatus=(e=>(e.New="NEW",e.Uploaded="UPLOADED",e.Error="ERROR",e))(EAttachmentUploadStatus||{}),RelationTypeEnum=(e=>(e.Official="CHECKIN_OFFICIAL",e.Witness="CHECKIN_WITNESS",e.Inspector="CHECKIN_INSPECTOR",e.Archive="CHECKIN_ARCHIVE",e.Buyer="CHECKIN_BUYER",e.Seller="CHECKIN_SELLER",e.ChildVdt="CHILD_VDT",e.ParentVdt="PARENT_VDT",e))(RelationTypeEnum||{}),DeviceTypeIdEnum=(e=>(e[e.STATIONARY_KIOSK=1]="STATIONARY_KIOSK",e[e.MOBILE_KIOSK=2]="MOBILE_KIOSK",e[e.TABLET_KIOSK=3]="TABLET_KIOSK",e[e.PHONE=4]="PHONE",e[e.TABLET=5]="TABLET",e))(DeviceTypeIdEnum||{}),DeviceTypeEnum=(e=>(e.STATIONARY_KIOSK="STATIONARY_KIOSK",e.MOBILE_KIOSK="MOBILE_KIOSK",e.TABLET_KIOSK="TABLET_KIOSK",e.PHONE="PHONE",e.TABLET="TABLET",e))(DeviceTypeEnum||{}),StepEnum=(e=>(e.DATA="DATA",e.PHOTO="PHOTO",e.CONFIRM="CONFIRM",e.OFFICIAL="OFFICIAL",e.QRCODE="QRCODE",e.RFID="RFID",e.PRIVACY="PRIVACY",e.WITNESS="WITNESS",e.DOCUMENT="DOCUMENT",e.REFERENCE_VDTS="REFERENCE_VDTS",e.VDT_MINTED="VDT_MINTED",e))(StepEnum||{}),TraitTypeEnum=(e=>(e.Type="Type",e.TypeWitness="Type-Witness",e.Who="Who",e.WhoBiometrics="Who-Biometrics",e.What="What",e.When="When",e.Where="Where",e.WhereDevice="Where-Device",e))(TraitTypeEnum||{}),QrPackageTypeEnum=(e=>(e.OBJECTS="OBJECTS",e.SERVICES="SERVICES",e.USERS="USERS",e.USER_DEVICES="USER_DEVICES",e.USER_OBJECTS="USER_OBJECTS",e.USER_SERVICES="USER_SERVICES",e.ORGANIZATIONS="ORGANIZATIONS",e.DEVICES="DEVICES",e.ORG_USERS="ORG_USERS",e.ORG_DEVICES="ORG_DEVICES",e.ORG_OBJECTS="ORG_OBJECTS",e.ORG_SERVICES="ORG_SERVICES",e.WITNESS="WITNESS",e.OBJECT_WITNESSES="OBJECT_WITNESSES",e.SERVICE_WITNESSES="SERVICE_WITNESSES",e))(QrPackageTypeEnum||{}),ReferenceType=(e=>(e.PHONE="PHONE",e.DRIVERS_LICENSE="DRIVERS_LICENSE",e.EMPLOYEE_ID="EMPLOYEE_ID",e.AUTH0_IDENTITY="AUTH0_IDENTITY",e.END_USER_ID="END_USER_ID",e.ADMIN_USER_ID="ADMIN_USER_ID",e))(ReferenceType||{}),SubjectTypeEnum=(e=>(e.EMPLOYEE="EMPLOYEE",e.DRIVER="DRIVER",e.USER="USER",e.ASSET_OWNER="ASSET_OWNER",e))(SubjectTypeEnum||{}),WalletPlatformEnum=(e=>(e.Ethereum="ethereum",e.Polygon="polygon",e))(WalletPlatformEnum||{}),import_jwt_decode=__toESM(require("jwt-decode"));function getAuth0Id(e,t){return __async(this,null,(function*(){return(null==t?void 0:t.keepPrefix)?e.sub:e.sub.replace("auth0|","")}))}function getAuthEmail(e){return __async(this,null,(function*(){return e["https://blackinktech.io/schemas/claims/email"]}))}function isTokenExpired(e){try{const t=(0,import_jwt_decode.default)(e);return Date.now()/1e3>t.exp}catch(e){return!1}}var createQueryParams=e=>e?Object.keys(e).filter((t=>void 0!==e[t])).map((t=>{const i=e[t];return Array.isArray(i)?0===i.length?"":encodeURIComponent(t)+"="+encodeURIComponent(i.join(",")):"object"==typeof i?encodeURIComponent(t)+"="+JSON.stringify(i):encodeURIComponent(t)+"="+encodeURIComponent(i)})).join("&"):"",debounce=(e,t=300)=>{let i;return function(...r){clearTimeout(i),i=setTimeout((()=>e.apply(this,r)),t)}};function formatDate(e){return new Date(e).toLocaleDateString("en-US",{day:"2-digit",month:"2-digit",year:"numeric",hour:"numeric",minute:"2-digit"})}function formatNumber(e){const t=e.replace(/[^0-9.]/g,"").replace(/^0+(?=\d)/,"").toString().split(".");return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),t.join(".")}var import_axios2=__toESM(require("axios"));function getErrorMessage(e){var t,i,r,s;if(!e)return"";if(import_axios2.default.isAxiosError(e)||(null==e?void 0:e.response)){const n=e,a=null==(i=null==(t=n.response)?void 0:t.data)?void 0:i.message;if("string"==typeof a)return a;if("object"==typeof a){if(Array.isArray(a)&&a.every((e=>"string"==typeof e)))return a.join(", ");let e=JSON.stringify(a);const t=null==(s=null==(r=n.response)?void 0:r.data)?void 0:s.error;return t&&(e=t+e),e}if(n.message)return n.message}if(e&&"object"==typeof e&&"status"in e&&"data"in e&&Object.prototype.hasOwnProperty.call(e.data,"message"))return e.data.message;if(e instanceof Error){return e.message}return Object.prototype.hasOwnProperty.call(e,"message")?e.message:"string"==typeof e?e:"Unknown error"}function makeSampleGeolocation(){return{latitude:0,longitude:0,meanSeaLevel:0}}function makeSampleWeatherData(){return{AbsHumidity:0,AirDensity:0,AvgCorrectedWindDir:0,AvgCorrectedWindSpeed:0,AvgRelativeWindDir:0,AvgRelativeWindSpeed:0,CompassHeading:0,CorrectedGustDirection:0,CorrectedGustSpeed:0,CorrectedWindDir:0,CorrectedWindSpeed:.92,Dewpoint:75.2,GPSHeading:"",GPSLocation:"+32.843528:-080.015936:+0017.50",GPSSpeedOverGround:"",GPSStatusError:!1,HeatIndex:0,PositionOfTheSun:0,PrecipIntensity:"",RainPresent:!1,Pressure:1019.7,PressureAtSeaLevel:0,PressureAtStation:0,RelGustDir:0,RelGustSpeed:0,RelHumidity:84,RelWindDir:241,RelWindSpeed:.92,SensorStatusError:!1,SolarNoonTime:"",SolarRadiation:"0001",SunriseTime:"",SunsetTime:"",SunshineHours:0,Temperature:80.4,TotalPrecip:"00000.000",TwilightAstronomical:"",TwilightCivil:"",TwilightNautical:"",WetBulbTemperature:0,WindChill:0,WindSensorError:!1,XTilt:0,YTilt:0,ZOrientation:""}}function getAttachmentLink(e){const t={thumb:e.thumb?"true":void 0,bit_token:e.bitToken,access_token:e.accessToken};return`${e.apiUrl}/core-events/v1/chain-assets/attachments/${e.id}/view?${createQueryParams(t)}`}function createAndUploadAttachments(e){return __async(this,null,(function*(){var t;const{service:i,chainApiUrl:r,req:s}=e,{eventId:n,req:a,onUpload:l}=s,o=a.docs.map((e=>__spreadProps(__spreadValues({},e),{data:void 0}))),u=__spreadProps(__spreadValues({},a),{docs:o}),d=yield i.post(`${r}/${n}/attachments`,u),p=[];let c=0;for(const e of a.docs){null==l||l(c+1,a.docs.length);const s={application:a.application,docs:[{mimeType:e.mimeType,docType:e.docType,classification:e.classification,docId:d[c].docId,name:e.name,description:e.description,data:null!=(t=e.data)?t:"",isMain:e.isMain}]};yield i.put(`${r}/${n}/attachments`,s,{onUploadProgress:e=>console.log("Upload attachment progress:",e)}),c++,p.push(s.docs[0])}return p}))}function makeGetAssetsParams(e){var t,i,r,s;return __spreadProps(__spreadValues({},e),{$orderBy:null!=(t=null==e?void 0:e.$orderBy)?t:"createdAt",$order:null!=(i=null==e?void 0:e.$order)?i:"desc",$page:null!=(r=null==e?void 0:e.$page)?r:1,$perPage:null!=(s=null==e?void 0:e.$perPage)?s:10})}var AssetService=class extends BaseService{constructor(e){super(e),this.assetApiUrl=`${this.apiUrl}/assets/v1/${null==e?void 0:e.route}`}list(e={}){return this.get(this.assetApiUrl,makeGetAssetsParams(e))}listPublic(e={}){return this.get(`${this.assetApiUrl}/tokens-public`,makeGetAssetsParams(e))}favorites(e={}){return this.get(`${this.assetApiUrl}/list-favorite`,makeGetAssetsParams(e))}listGroup(){return this.get(`${this.assetApiUrl}/group`)}listCategories(e={}){return this.get(`${this.apiUrl}/assets/v1/asset-category/list`,e)}searchCategories(e={}){return this.get(`${this.apiUrl}/assets/v1/asset-category`,e)}getCategoryByName(e){return this.get(`${this.apiUrl}/assets/v1/asset-category?name=${e}`)}getCategoryById(e,t){return this.get(`${this.apiUrl}/assets/v1/asset-category/${e}`,void 0,{headers:t})}searchAssetTypes(e={}){return this.get(`${this.apiUrl}/assets/v1/asset-type`,e)}listAssetTypes(e={}){return this.get(`${this.apiUrl}/assets/v1/asset-type/list`,e)}getActiveAssetTemplate(e,t){return this.get(`${this.apiUrl}/assets/v1/asset-template/activated`,e,{headers:t})}getAssetType(e,t){return this.get(`${this.apiUrl}/assets/v1/asset-type/${e}`,void 0,{headers:t})}getAssetTypeSteps(e){return this.get(`${this.apiUrl}/assets/v1/asset-type/${e}/steps`)}share(e,t){return this.post(`${this.assetApiUrl}/${e}/share`,t)}witnesses(e={}){return this.get(`${this.assetApiUrl}/witnesses`,e)}witnessesPublic(e={}){return this.get(`${this.assetApiUrl}/witnesses-public`,e)}addReferenceVdt(e){return this.post(`${this.assetApiUrl}/reference-vdt`,e)}createListing(e){return this.post(`${this.assetApiUrl}/listing`,e)}getAssetChainDetails(e){return this.get(`${this.apiUrl}/core-events/v1/chain-assets/${e}`)}getOwnershipHistory(e={}){const t=createQueryParams(__spreadValues({assetName:e.name},e));return this.get(`${this.assetApiUrl}/ownership-history?${t}`)}getAssociatedAssets(e={}){return this.get(`${this.apiUrl}/assets/v1/asset/tokens-public`,e)}vdtReport(e){return this.get(`${this.apiUrl}/assets/v1/asset/collection-report`,{fileFormat:e})}},chainServiceStatuses=["INFO","PHOTO","OFFICIALS","QRCODE","RFID","WITNESS","MINTED"],ASSET_STEPS=["DATA","PHOTO","OFFICIAL","QRCODE","RFID","PRIVACY","WITNESS"],assetStatuses=["INFO","PHOTO","OFFICIALS","QRCODE","RFID","WITNESS","MINTED"],SKIPPABLE_ASSET_STEPS=["RFID","OFFICIAL","WITNESS","CONFIRM"],ASSET_STATUSES=["CREATED","PHOTO_ADDED_STARTED","PHOTO_ADDED_FAILED","PHOTO_ADDED","OFFICIAL_VERIFYING_STARTED","OFFICIAL_VERIFYING_FAILED","OFFICIAL_VERIFIED","QR_BINDING_STARTED","QR_BINDING_FAILED","QR_BOUND","RFID_BINDING_STARTED","RFID_BINDING_FAILED","RFID_BOUND","PRIVACY_STARTED","PRIVACY_FAILED","PRIVACY_DONE","REGISTERING_STARTED","REGISTERING_FAILED","REGISTERED","MINTING_STARTED","MINTING_FAILED","MINTED","INCOMPLETE","COMPLETED"],CategoryStatusEnum=(e=>(e.Normal="NORMAL",e.Fixed="FIXED",e))(CategoryStatusEnum||{}),ChainTypeEnum=(e=>(e.Objects="OBJECTS",e.Services="SERVICES",e.Files="FILES",e.OrgObjects="ORG-OBJECTS",e.OrgServices="ORG-SERVICES",e.OrgFiles="ORG-FILES",e))(ChainTypeEnum||{}),ReportTypeEnum=(e=>(e.Seller="Seller",e.Buyer="Buyer",e))(ReportTypeEnum||{}),FileTypeEnum=(e=>(e.PDF="PDF",e.CSV="CSV",e))(FileTypeEnum||{}),AssetStatusEnum=(e=>(e.CREATED="CREATED",e.PHOTO_ADDED_STARTED="PHOTO_ADDED_STARTED",e.PHOTO_ADDED_FAILED="PHOTO_ADDED_FAILED",e.PHOTO_ADDED="PHOTO_ADDED",e.DOCUMENT_ADDED_STARTED="DOCUMENT_ADDED_STARTED",e.DOCUMENT_ADDED_FAILED="DOCUMENT_ADDED_FAILED",e.DOCUMENT_ADDED="DOCUMENT_ADDED",e.OFFICIAL_VERIFYING_STARTED="OFFICIAL_VERIFYING_STARTED",e.OFFICIAL_VERIFYING_FAILED="OFFICIAL_VERIFYING_FAILED",e.OFFICIAL_VERIFIED="OFFICIAL_VERIFIED",e.QR_BINDING_STARTED="QR_BINDING_STARTED",e.QR_BINDING_FAILED="QR_BINDING_FAILED",e.QR_BOUND="QR_BOUND",e.RFID_BINDING_STARTED="RFID_BINDING_STARTED",e.RFID_BINDING_FAILED="RFID_BINDING_FAILED",e.RFID_BOUND="RFID_BOUND",e.PRIVACY_STARTED="PRIVACY_STARTED",e.PRIVACY_FAILED="PRIVACY_FAILED",e.PRIVACY_DONE="PRIVACY_DONE",e.WITNESS_VERIFYING_STARTED="WITNESS_VERIFYING_STARTED",e.WITNESS_VERIFYING_FAILED="WITNESS_VERIFYING_FAILED",e.WITNESS_VERIFIED="WITNESS_VERIFIED",e.REGISTERING_STARTED="REGISTERING_STARTED",e.REGISTERING_FAILED="REGISTERING_FAILED",e.REGISTERED="REGISTERED",e.MINTING_STARTED="MINTING_STARTED",e.MINTING_FAILED="MINTING_FAILED",e.MINTED="MINTED",e.REFERENCE_VDTS_STARTED="REFERENCE_VDTS_STARTED",e.REFERENCE_VDTS_FAILED="REFERENCE_VDTS_FAILED",e.REFERENCE_VDTS_COMPLETED="REFERENCE_VDTS_COMPLETED",e.CONFIRMED="CONFIRMED",e))(AssetStatusEnum||{}),RelationsTypeEnum=(e=>(e.CHECKIN_OFFICIAL="CHECKIN_OFFICIAL",e.CHECKIN_WITNESS="CHECKIN_WITNESS",e.CHECKIN_INSPECTOR="CHECKIN_INSPECTOR",e.CHECKIN_BUYER="CHECKIN_BUYER",e.CHECKIN_SELLER="CHECKIN_SELLER",e.PARENT_VDT="PARENT_VDT",e.CHILD_VDT="CHILD_VDT",e))(RelationsTypeEnum||{}),AssetLevelEnum=(e=>(e.A_PLUS="A+",e.A="A",e.A_MINUS="A-",e.B_PLUS="B+",e.B="B",e.B_MINUS="B-",e.C_PLUS="C+",e.C="C",e.C_MINUS="C-",e))(AssetLevelEnum||{}),VerifyType=(e=>(e.NOT_VERIFIED="notVerified",e.OFFICIAL_VERIFIED="verifiedByOfficial",e.SELF_VERIFIED="selfVerified",e))(VerifyType||{}),LocationAccuracy=(e=>(e.Exact="exact",e.City="city",e.State="state",e.Country="country",e))(LocationAccuracy||{}),VerifyTypeEnum=(e=>(e.NOT_VERIFIED="notVerified",e.OFFICIAL_VERIFIED="verifiedByOfficial",e.OFFICIAL_REJECTED="rejectedByOfficial",e.SELF_VERIFIED="selfVerified",e))(VerifyTypeEnum||{}),EOrderStatus=(e=>(e.Created="CREATED",e.ShippingInfo="SHIPPING_INFO",e.PaymentCompleted="PAYMENT_COMPLETED",e.PaymentFailed="PAYMENT_FAILED",e.Confirmed="CONFIRMED",e.Canceled="CANCELED",e.OrderShipped="ORDER_SHIPPED",e.OrderDelivered="ORDER_DELIVERED",e.OwnershipTransferStarted="OWNERSHIP_TRANSFER_STARTED",e.OwnershipTransferCompleted="OWNERSHIP_TRANSFER_COMPLETED",e.OwnershipTransferFailed="OWNERSHIP_TRANSFER_FAILED",e.OrderUndelivered="ORDER_UNDELIVERED",e.OrderSuccess="ORDER_SUCCESS",e.Return="RETURN",e.ReturnShipped="RETURN_SHIPPED",e.ReturnDelivered="RETURN_DELIVERED",e.ReturnUndelivered="RETURN_UNDELIVERED",e.Refund="REFUND",e.RefundCompleted="REFUND_COMPLETED",e.RefundFailed="REFUND_FAILED",e))(EOrderStatus||{});function getAssetStatusIndex(e){return ASSET_STATUSES.indexOf(e)}function isAssetStatusBefore(e,t){return getAssetStatusIndex(e)<getAssetStatusIndex(t)}function isAssetStatusAfter(e,t){return getAssetStatusIndex(e)>getAssetStatusIndex(t)}function isAssetStatusFinished(e,t){return getAssetStatusIndex(e)>=getAssetStatusIndex(t)}function getAssetVerifyStatus(e){return isAssetStatusFinished(e.status,"OFFICIAL_VERIFIED")&&e.serializedSteps.find((e=>"OFFICIAL"===e.step&&!0===e.finished))&&"OFFICIAL_VERIFYING_FAILED"!==e.status?"verifiedByOfficial":isAssetStatusFinished(e.status,"OFFICIAL_VERIFIED")&&e.serializedSteps.find((e=>"OFFICIAL"===e.step&&!1===e.finished))&&"OFFICIAL_VERIFYING_FAILED"!==e.status?"selfVerified":(isAssetStatusBefore(e.status,"OFFICIAL_VERIFYING_STARTED"),"notVerified")}function getAssetVerifyStatusBySteps(e){var t,i,r;return(null==(t=e.serializedSteps)?void 0:t.find((e=>"OFFICIAL"===e.step&&!0===e.finished)))&&"OFFICIAL_VERIFYING_FAILED"!==e.status?getAssetVerifyRejected(e.witness)?"verifiedByOfficial":"rejectedByOfficial":(null==(i=e.serializedSteps)?void 0:i.find((e=>"OFFICIAL"===e.step&&!1===e.finished)))&&"OFFICIAL_VERIFYING_FAILED"!==e.status?"selfVerified":(null==(r=e.serializedSteps)?void 0:r.find((e=>"OFFICIAL"===e.step)))?"notVerified":"selfVerified"}function getAssetVerifyRejected(e){return(Array.isArray(e)?e.sort(((e,t)=>new Date(e.updatedAt).getTime()-new Date(t.updatedAt).getTime())).pop():{approved:!1}).approved}var ChainAssetService=class extends BaseService{constructor(e){super(e),this.chainApiUrl=`${this.apiUrl}/${this.coreApiServicePrefix}/v1/chain-assets`}create(e){return this.post(this.chainApiUrl,e)}createAttachments(e){return createAndUploadAttachments({service:this,chainApiUrl:this.chainApiUrl,req:e})}createQrAttachment(e,t){return this.post(`${this.chainApiUrl}/${e}/qr`,t)}getEvent(e){return this.get(`${this.chainApiUrl}/${e}`)}getChildEvents(e){return this.get(`${this.chainApiUrl}/${e}/child-events`)}getDetailsByEvent(e){return this.get(`${this.apiUrl}/assets/v1/asset/${e}/event`)}getDetails(e){return this.get(`${this.apiUrl}/assets/v1/asset/${e}`)}assetByQr(e){return this.get(`${this.coreApiUrl}/v1/qrcode/${e}/asset-info`)}eventPublicByQr(e){return this.get(`${this.coreApiUrl}/v1/qrcode/${e}/asset-info-public`)}getAttachmentImageUrl(e,t){const i=createQueryParams({thumb:t?"true":void 0});return`${this.chainApiUrl}/attachments/${e}/view?${i}`}getWitnesses(e){const t=createQueryParams(__spreadValues({assetId:e.id,assetName:e.name},e));return this.get(`${this.apiUrl}/assets/v1/witness/witnesses-asset?${t}`)}update(e,t){return this.put(`${this.chainApiUrl}/${e}/details`,t)}updateMetadata(e,t){return this.post(`${this.chainApiUrl}/${e}/metadata`,t)}updateLocationPrivacy(e,t){return this.patch(`${this.chainApiUrl}/${e}/privacy`,t)}linkQr(e,t){return this.put(`${this.coreApiUrl}/v1/qrcode/${e}/link`,t)}generateQr(e){return this.post(`${this.coreApiUrl}/v1/qrcode/system-generated`,e)}deleteAttachments(e){return this.delete(`${this.chainApiUrl}/${e}/attachments`)}addReferenceVdt(e){return this.post(`${this.apiUrl}/assets/v1/asset/reference-vdt`,e)}updateAttachments(e,t){return this.put(`${this.chainApiUrl}/${e}/attachments`,t)}updateConfirmStatus(e){return this.patch(`${this.apiUrl}/assets/v1/asset/${e}/confirm`,{})}deleteReferenceVdt(e,t){return this.delete(`${this.apiUrl}/assets/v1/asset/${e}/reference-vdt/${t}`)}eventByQr(e){return this.get(`${this.coreApiUrl}/v1/qrcode/${e}/event-info`)}updateFavorite(e){return this.patch(`${this.chainApiUrl}/favorite`,e)}share(e,t){return this.post(`${this.apiUrl}/assets/v1/asset/${e}/share`,t)}};function makeCreateAttachmentsRequest(e){var t,i,r,s,n,a,l,o;return{eventId:e.eventId,req:{application:{id:null!=(t=e.appId)?t:DEFAULT_APP_ID},docs:null!=(i=e.docs)?i:[],eventId:e.eventId,device:{date:(new Date).toISOString(),deviceId:null!=(r=null==e?void 0:e.deviceId)?r:"",deviceName:null!=(s=null==e?void 0:e.deviceName)?s:"",geolocation:null!=(n=null==e?void 0:e.geolocation)?n:makeSampleGeolocation(),ipAddress:null!=(a=null==e?void 0:e.ipAddress)?a:"",deviceType:null!=(l=null==e?void 0:e.deviceType)?l:"PHONE"}},chainType:null!=(o=e.chainType)?o:""}}function makeCreateQrAttachmentRequest(e){var t,i,r,s,n,a;return{application:{id:null!=(t=null==e?void 0:e.appId)?t:DEFAULT_APP_ID},device:{date:(new Date).toISOString(),deviceId:null!=(i=e.deviceId)?i:"",deviceName:null!=(r=e.deviceName)?r:"",deviceType:null!=(s=e.deviceType)?s:"PHONE",geolocation:null!=(n=e.geolocation)?n:makeSampleGeolocation(),ipAddress:null!=(a=null==e?void 0:e.ipAddress)?a:""},docs:[{docType:"PHOTO",classification:"QRCODE",data:e.qrImageBase64}]}}var ChainServiceService=class extends BaseService{constructor(e){super(e),this.chainApiUrl=`${this.apiUrl}/${this.coreApiServicePrefix}/v1/chain-services`}create(e){return this.post(this.chainApiUrl,e)}createAttachments(e){return createAndUploadAttachments({service:this,chainApiUrl:this.chainApiUrl,req:e})}createQrAttachment(e,t){return this.post(`${this.chainApiUrl}/${e}/qr`,t)}getEvent(e){return this.get(`${this.chainApiUrl}/${e}`)}getChildEvents(e){return this.get(`${this.chainApiUrl}/${e}/child-events`)}getDetailsByEvent(e){return this.get(`${this.apiUrl}/assets/v1/service/${e}/event`)}getDetails(e){return this.get(`${this.apiUrl}/assets/v1/service/${e}`)}assetByQr(e){return this.get(`${this.coreApiUrl}/v1/qrcode/${e}/service-info`)}getAttachmentImageUrl(e,t){const i=createQueryParams({thumb:t?"true":void 0});return`${this.chainApiUrl}/attachments/${e}/view?${i}`}getWitnesses(e){const t=createQueryParams(__spreadValues({serviceId:e.id,serviceName:e.name},e));return this.get(`${this.apiUrl}/assets/v1/witness/witnesses-service?${t}`)}update(e,t){return this.put(`${this.chainApiUrl}/${e}/details`,t)}updateMetadata(e,t){return this.post(`${this.chainApiUrl}/${e}/metadata`,t)}updateLocationPrivacy(e,t){return this.patch(`${this.chainApiUrl}/${e}/privacy`,t)}linkQr(e,t){return this.put(`${this.coreApiUrl}/v1/qrcode/${e}/link`,t)}generateQr(e){return this.post(`${this.coreApiUrl}/v1/qrcode/system-generated`,e)}deleteAttachments(e){return this.delete(`${this.chainApiUrl}/${e}/attachments`)}addReferenceVdt(e){return this.post(`${this.apiUrl}/assets/v1/service/reference-vdt`,e)}updateAttachments(e,t){return this.put(`${this.chainApiUrl}/${e}/attachments`,t)}updateConfirmStatus(e){return this.post(`${this.apiUrl}/assets/v1/service/${e}/confirm`,{})}deleteReferenceVdt(e,t){return this.delete(`${this.apiUrl}/assets/v1/service/${e}/reference-vdt/${t}`)}getS2CEventByQrId(e,t,i){const r=createQueryParams({vdtType:t,orgId:i});return this.get(`${this.apiUrl}/assets/v1/service/s2c/qr/${e}?${r}`)}eventByQr(e){return this.get(`${this.coreApiUrl}/v1/qrcode/${e}/event-info`)}updateFavorite(e){return this.patch(`${this.chainApiUrl}/favorite`,e)}share(e,t){return this.post(`${this.apiUrl}/assets/v1/service/${e}/share`,t)}},ChainUtils=class e{static getName(e){var t,i;return"assetName"in e?null!=(t=e.assetName)?t:"":"serviceName"in e&&null!=(i=e.serviceName)?i:""}static getNameFromProperties(e){var t,i,r,s,n,a,l,o;if(e.some((e=>"isAssetName"in e))){const n=e;return null!=(s=null!=(r=null==(t=n.find((e=>e.isAssetName)))?void 0:t.value)?r:null==(i=n.find((e=>""!==e.value)))?void 0:i.value)?s:""}if(e.some((e=>"isServiceName"in e))){const t=e;return null!=(o=null!=(l=null==(n=t.find((e=>e.isServiceName)))?void 0:n.value)?l:null==(a=t.find((e=>""!==e.value)))?void 0:a.value)?o:""}return""}static getCategories(e){var t,i;return"assetCategory"in e?null!=(t=e.assetCategory)?t:[]:"serviceCategory"in e&&null!=(i=e.serviceCategory)?i:[]}static getProperties(e){var t,i;return"assetProperties"in e?null!=(t=e.assetProperties)?t:[]:"serviceProperties"in e&&null!=(i=e.serviceProperties)?i:[]}static getMimeType(e){return"application/pdf"===e?"TOKEN_DOCUMENT":"TOKEN_PHOTO"}static findMainPhotoByTypeClass(t){var i;const{photos:r,chainType:s,attachmentType:n}=t;return null==(i=null==r?void 0:r.filter((t=>t.classification===e.getAttachmentClassification(s,n)&&t.isMain)))?void 0:i.pop()}static getAttachmentClassification(e,t){var i;return(null==(i={TOKEN_DOCUMENT:{SERVICES:"SERVICE_DOCUMENT",OBJECTS:"ASSET_DOCUMENT",FILES:"ASSET_DOCUMENT"},TOKEN_PHOTO:{SERVICES:"SERVICE_PHOTO",OBJECTS:"ASSET_PHOTO",FILES:"ASSET_PHOTO"},VERIFICATION_PHOTO:{SERVICES:"SERVICE_VERIFICATION_PHOTO",OBJECTS:"ASSET_VERIFICATION_PHOTO",FILES:"ASSET_VERIFICATION_PHOTO"},WITNESS_PHOTO:{SERVICES:"SERVICE_WITNESS_PHOTO",OBJECTS:"ASSET_WITNESS_PHOTO",FILES:"ASSET_WITNESS_PHOTO"}}[t])?void 0:i[e])||null}static getType(e){var t,i,r,s,n,a;let l="",o="";if("assetType"in e){const s=e;o=null!=(i=null==(t=s.metadata)?void 0:t.assetTypeId)?i:"",l=null!=(r=s.assetType)?r:""}if("serviceType"in e){o=null!=(n=null==(s=e.metadata)?void 0:s.serviceTypeId)?n:"",l=null!=(a=e.serviceType)?a:""}return{id:o,name:l}}static makeCreateChainRequest(e){var t,i,r,s,n,a,l,o,u,d,p,c,h,E,m,S,I,v,A,_,T,g,y;const U=null!=(t=null==e?void 0:e.eventDate)?t:(new Date).toISOString(),D={application:{id:null!=(i=null==e?void 0:e.appId)?i:DEFAULT_APP_ID},subject:{subjectType:null!=(r=null==e?void 0:e.subjectType)?r:"USER",references:[{type:"AUTH0_IDENTITY",value:e.auth0Id},{type:"END_USER_ID",value:e.endUserId}],orgId:null==e?void 0:e.orgId},device:{date:U,deviceId:null!=(s=null==e?void 0:e.deviceId)?s:"",deviceName:null!=(n=null==e?void 0:e.deviceName)?n:"",geolocation:null!=(a=null==e?void 0:e.geolocation)?a:makeSampleGeolocation(),ipAddress:null!=(l=null==e?void 0:e.ipAddress)?l:"",deviceType:null!=(o=null==e?void 0:e.deviceType)?o:"PHONE"},weather:null!=(u=null==e?void 0:e.weather)?u:makeSampleWeatherData(),data:{date:U}};return"OBJECTS"===(null==e?void 0:e.chainType)||"FILES"===(null==e?void 0:e.chainType)?((null==e?void 0:e.properties)&&(e.properties=null==(d=e.properties)?void 0:d.map((e=>{var t;return{id:e.id,name:e.name,value:e.value,isAssetName:null!=(t=e.isAssetName)&&t}}))),D.data.asset={assetType:null!=(p=null==e?void 0:e.type)?p:"",assetCategory:null!=(c=null==e?void 0:e.category)?c:[],assetName:null!=(h=null==e?void 0:e.name)?h:"",assetProperties:null!=(E=null==e?void 0:e.properties)?E:[],isFavorite:null==e?void 0:e.isFavorite,metadata:__spreadProps(__spreadValues({},null!=(m=null==e?void 0:e.metadata)?m:{}),{assetTypeId:null!=(S=null==e?void 0:e.typeId)?S:""})}):"SERVICES"===(null==e?void 0:e.chainType)&&((null==e?void 0:e.properties)&&(e.properties=null==(I=e.properties)?void 0:I.map((e=>{var t;return{id:e.id,name:e.name,value:e.value,isServiceName:null!=(t=e.isServiceName)&&t}}))),D.data.service={serviceType:null!=(v=null==e?void 0:e.type)?v:"",serviceCategory:null!=(A=null==e?void 0:e.category)?A:[],serviceName:null!=(_=null==e?void 0:e.name)?_:"",serviceProperties:null!=(T=null==e?void 0:e.properties)?T:[],isFavorite:null==e?void 0:e.isFavorite,metadata:__spreadProps(__spreadValues({},null!=(g=null==e?void 0:e.metadata)?g:{}),{serviceTypeId:null!=(y=null==e?void 0:e.typeId)?y:""})}),D}static makeUpdateChainRequest(e){var t,i,r,s,n,a,l,o;const u={date:(new Date).toISOString()};return"OBJECTS"===e.chainType?u.asset={assetType:null!=(t=null==e?void 0:e.type)?t:"",assetCategory:null!=(i=null==e?void 0:e.category)?i:[],assetName:null!=(r=null==e?void 0:e.name)?r:"",isFavorite:null==e?void 0:e.isFavorite,assetProperties:null!=(s=null==e?void 0:e.properties)?s:[],metadata:null==e?void 0:e.metadata}:"SERVICES"===e.chainType&&(u.service={serviceType:null!=(n=null==e?void 0:e.type)?n:"",serviceCategory:null!=(a=null==e?void 0:e.category)?a:[],serviceName:null!=(l=null==e?void 0:e.name)?l:"",isFavorite:null==e?void 0:e.isFavorite,serviceProperties:null!=(o=null==e?void 0:e.properties)?o:[],metadata:null==e?void 0:e.metadata}),u}static isOfficialVerified(e,t){return __async(this,null,(function*(){return"SERVICES"!==e&&t.some((e=>"CHECKIN_OFFICIAL"===e.relationType))}))}},SellingMethodEnum=(e=>(e.Fixed="fixed",e.Auction="auction",e.Dutch="dutch_auction",e.Inverse="inverse_auction",e))(SellingMethodEnum||{}),MeasurementUnitEnum=(e=>(e.IN="IN",e.CM="CM",e))(MeasurementUnitEnum||{}),S2CAssetService=class extends BaseService{listS2CCategories(e={}){return this.get(`${this.apiUrl}/assets/v1/asset-category/s2c-sub`,e)}listS2CFinalType(e){return this.get(`${this.apiUrl}/assets/v1/asset-category/final-with-types`,e)}},import_jwt_decode2=__toESM(require("jwt-decode")),BiometricsModeEnum=(e=>(e.SignIn="sign-in",e.SignUp="sign-up",e))(BiometricsModeEnum||{}),BiometricsStorageKeyEnum=(e=>(e.AuthEmails="authEmails",e))(BiometricsStorageKeyEnum||{}),BiometricsService=class{constructor(e){this.options=e,this.mode=null,this.logger=e.logger,this.incode=e.incodeService,this.storage=e.storage}initialize(){return __async(this,null,(function*(){var e;const t={apiKey:this.options.apiKey,apiUrl:this.options.apiUrl,isMobileEmulator:this.options.isMobileEmulator,waitForTutorials:this.options.waitForTutorials};null==(e=this.logger)||e.debug("Initializing Incode SDK:",JSON.stringify(t)),yield this.incode.initialize(t)}))}signIn(){return __async(this,null,(function*(){this.mode="sign-in"}))}signUp(e){return __async(this,null,(function*(){var e,t,i;if(this.sessionToken){null==(e=this.logger)||e.debug("Decoding session token:",(0,import_jwt_decode2.default)(this.sessionToken));(0,import_jwt_decode2.default)(this.sessionToken).email,i=yield null==(t=this.storage)?void 0:t.getItem("authEmails")}}))}},CheckInService=class extends BaseService{constructor(e){super(e),this.checkinApiUrl=`${this.coreApiUrl}/v1/checkin`}createCheckIn(e){return this.post(this.checkinApiUrl,e)}getEvent(e){return this.get(`${this.checkinApiUrl}/${e}`)}getCheckInEvents(e){return this.get(this.checkinApiUrl+`?${createQueryParams(e)}`)}updateAttachment(e){return this.put(`${this.checkinApiUrl}/${e.eventId}/attachments`,e)}getAttachmentImage(e,t){const i=createQueryParams({id:e,thumb:t?"true":void 0});return this.get(`${this.checkinApiUrl}/attachments/view?${i}`)}updateLocationPrivacy(e,t){return this.patch(`${this.checkinApiUrl}/${e}/privacy`,t)}},VerificationTypeEnum=(e=>(e.Reject="Reject",e.Official="Official",e.Witness="Witness",e.Buyer="Buyer",e.Seller="Seller",e.Review="Review",e.Inspection="Inspection",e.Archive="Archive",e))(VerificationTypeEnum||{});function makeCreateCheckInEventRequest(e){var t,i,r,s,n,a,l;const o=(new Date).toISOString(),u=[];return(null==e?void 0:e.reference)&&u.push(e.reference),(null==e?void 0:e.auth0Id)&&u.push({type:"AUTH0_IDENTITY",value:e.auth0Id}),{application:{id:null!=(t=null==e?void 0:e.appId)?t:DEFAULT_APP_ID},subject:{subjectType:null!=(i=null==e?void 0:e.subjectType)?i:"EMPLOYEE",references:u,orgId:null==e?void 0:e.orgId},device:{date:o,deviceType:null!=(r=null==e?void 0:e.deviceType)?r:"PHONE",deviceId:null!=(s=null==e?void 0:e.deviceId)?s:"",deviceName:null!=(n=null==e?void 0:e.deviceName)?n:"",geolocation:null!=(a=null==e?void 0:e.geolocation)?a:makeSampleGeolocation(),ipAddress:null!=(l=null==e?void 0:e.ipAddress)?l:""},event:null==e?void 0:e.parentEvent,data:{date:o,properties:null==e?void 0:e.properties,attachments:null==e?void 0:e.attachments,approved:null==e?void 0:e.approved,categoryId:null==e?void 0:e.categoryId}}}function makeUpdateCheckInAttachmentRequest(e){var t,i;return{application:{id:null!=(t=null==e?void 0:e.appId)?t:DEFAULT_APP_ID},eventId:e.eventId,geolocation:e.geolocation,docs:[{docId:e.attachmentId,data:e.imageBase64,docType:"PHOTO",classification:e.classification,name:null!=(i=e.name)?i:"",description:"",mimeType:"image/png",isMain:!!e.isMain}],eventToken:e.eventToken,relationType:e.relationType}}var CommonAdminService=class extends BaseService{listReasons(e){return this.get(`${this.apiUrl}/common-admin/v1/reasons/list`,e)}listApplications(e){return this.get(`${this.apiUrl}/common-admin/v1/applications/list`,e)}},ActionType=(e=>(e.OfficialRejectVerification="OFFICIAL_REJECT_VERIFICATION",e.SellerRejectOrder="SELLER_REJECT_ORDER",e.SellerRejectBid="SELLER_REJECT_BID",e.BuyerRejectDelivery="BUYER_REJECT_DELIVERY",e.UserArchiveS2CToken="USER_ARCHIVE_S2S_TOKEN",e))(ActionType||{}),CoreEventTypeEnum=(e=>(e.CHAIN_SERVICES="CHAIN_SERVICES",e.CHAIN_OBJECTS="CHAIN_OBJECT",e))(CoreEventTypeEnum||{}),EEventStatus=(e=>(e.Initialized="INITIALIZED",e.Uploading="UPLOADING",e.Completed="COMPLETED",e.ForVerification="FOR_VERIFICATION",e.Verified="VERIFIED",e))(EEventStatus||{}),EventService=class extends BaseService{constructor(e){super(e)}getEventById(e){return this.get(`${this.apiUrl}/core-events/v1/events/${e}`)}searchEvents(e){return this.get(`${this.apiUrl}/core-events/v1/events`,e)}},DeviceService=class extends BaseService{constructor(e){super(e),this.deviceApiUrl=`${this.apiUrl}/devices/v1/devices`}searchDevices(e){return this.get(this.deviceApiUrl,e)}registerDevice(e){return this.post(`${this.deviceApiUrl}/register`,e)}registerAdminDevice(e){return this.post(`${this.deviceApiUrl}/admin/register`,e)}getAdminDeviceByExternalId(e){return this.get(`${this.deviceApiUrl}/admin/${e}`)}validateDevice(e){return this.post(`${this.deviceApiUrl}/validate`,e)}getDeviceByExternalId(e){return this.get(`${this.deviceApiUrl}/${e}`)}unregisterDevice(e){return this.delete(`${this.deviceApiUrl}/${e}/unregister`)}initDeviceVdt(e){return this.post(`${this.deviceApiUrl}/init-vdt`,e)}getDeviceInfoById(e){return this.get(`${this.deviceApiUrl}/${e}/info`)}},InventoryService=class extends BaseService{constructor(e){super(e),this.inventoryApiUrl=`${this.apiUrl}/assets/v1/inventory`,this.inventoryItemApiUrl=`${this.apiUrl}/assets/v1/inventory-item`}getInventoryByOrgId(e){return this.get(`${this.inventoryApiUrl}/organization/${e}`)}addInventoryItem(e){return this.post(`${this.inventoryItemApiUrl}`,e)}getInventoryItem(e){return this.get(`${this.inventoryItemApiUrl}`,e)}deleteInventoryItem(e){return this.delete(`${this.inventoryItemApiUrl}/${e.inventoryId}/archive/${e.qrCodeId}`,void 0,{headers:{orgId:e.orgId}})}},ListedStatusEnum=(e=>(e.MINTED="MINTED",e.LISTING_STARTED="LISTING_STARTED",e.LISTING_FAILED="LISTING_FAILED",e.LISTED="LISTED",e.DELIST_STARTED="DELIST_STARTED",e.DELIST_FAILED="DELIST_FAILED",e.DELISTED="DELISTED",e.ORDER_STARTED="ORDER_STARTED",e.ORDER_COMPLETED="ORDER_COMPLETED",e.ORDER_FAILED="ORDER_FAILED",e))(ListedStatusEnum||{}),BidStatusEnum=(e=>(e.PENDING="PENDING",e.REJECTED="REJECTED",e.ACCEPTED="ACCEPTED",e.RETRACTED="RETRACTED",e))(BidStatusEnum||{}),OrderStatusEnum=(e=>(e.CREATED="CREATED",e.PAYMENT_COMPLETED="PAYMENT_COMPLETED",e.PAYMENT_FAILED="PAYMENT_FAILED",e.CANCELLED="CANCELLED",e.ORDER_SHIPPED="ORDER_SHIPPED",e.ORDER_DELIVERED="ORDER_DELIVERED",e.OWNERSHIP_TRANSFER_STARTED="OWNERSHIP_TRANSFER_STARTED",e.OWNERSHIP_TRANSFER_COMPLETED="OWNERSHIP_TRANSFER_COMPLETED",e.OWNERSHIP_TRANSFER_FAILED="OWNERSHIP_TRANSFER_FAILED",e.ORDER_UNDELIVERED="ORDER_UNDELIVERED",e.ORDER_SUCCESS="ORDER_SUCCESS",e.RETURN="RETURN",e.RETURN_SHIPPED="RETURN_SHIPPED",e.RETURN_DELIVERED="RETURN_DELIVERED",e.RETURN_UNDELIVERED="RETURN_UNDELIVERED",e.REFUND="REFUND",e.REFUND_COMPLETED="REFUND_COMPLETED",e.REFUND_FAILED="REFUND_FAILED",e.ONGOING="ON_GOING",e.COMPLETED="COMPLETED",e))(OrderStatusEnum||{}),BidReasonsEnum=(e=>(e.OTHER="Other",e.REJECT_REASON="rejectReason",e.REJECT_DESCRIPTION="rejectDescription",e))(BidReasonsEnum||{}),BidService=class extends BaseService{constructor(e){super(e),this.bidsApiUrl=`${this.apiUrl}/marketplace/v1/bids`}search(e){return this.get(this.bidsApiUrl,e)}create(e){return this.post(this.bidsApiUrl,e)}reject(e){return this.patch(this.bidsApiUrl,e)}getById(e){return this.get(`${this.bidsApiUrl}/${e}`)}accept(e){return this.patch(`${this.bidsApiUrl}/${e}`,{})}},CategoriesService=class extends BaseService{constructor(e){super(e),this.catsApiUrl=`${this.apiUrl}/marketplace/v1/categories`}list(e={}){return this.get(`${this.catsApiUrl}/list`,e)}search(e={}){return this.get(this.catsApiUrl,e)}getById(e){return this.get(`${this.catsApiUrl}/${e}`)}listFromAssets(){return this.post(`${this.catsApiUrl}/load`,{})}},ListingService=class extends BaseService{constructor(e){super(e),this.listingApiUrl=`${this.apiUrl}/marketplace/v1/listings`}search(e={}){return this.get(this.listingApiUrl,e)}editPrice(e){return this.put(this.listingApiUrl,e)}reportDownloadUrl(e){return this.get(`${this.listingApiUrl}/reports`,e)}getById(e){return this.get(`${this.listingApiUrl}/${e}`)}removeById(e){return this.delete(`${this.listingApiUrl}/${e}`)}getPublic(e){return this.get(`${this.listingApiUrl}/${e}/public`)}getByAssetId(e){return this.get(`${this.listingApiUrl}/${e}/asset`)}getPublicByAssetId(e){return this.get(`${this.listingApiUrl}/${e}/public`)}removeByAssetId(e){return this.delete(`${this.listingApiUrl}/${e}/asset`)}listingView(e){return this.put(`${this.listingApiUrl}/${e}/viewed`,{})}},OrdersService=class extends BaseService{constructor(e){super(e),this.orderApiUrl=`${this.apiUrl}/marketplace/v1/orders`}reportDownloadUrl(e){return this.get(`${this.orderApiUrl}/reports/order`,e)}search(e={}){return this.get(this.orderApiUrl,e)}searchStore(e={}){return this.get(`${this.orderApiUrl}/search-store`,e)}searchQuestion(e={}){return this.get(`${this.orderApiUrl}/search-question`,e)}orderPayment(e){return this.post(`${this.orderApiUrl}/order-payment`,e)}shipping(e){return this.put(`${this.orderApiUrl}/shipping`,e)}delivered(e){return this.put(`${this.orderApiUrl}/delivered`,e)}cancel(e){return this.put(`${this.orderApiUrl}/${e.id}/cancel`,e)}getById(e){return this.get(`${this.orderApiUrl}/${e}`)}totalSales(e){return this.get(`${this.orderApiUrl}/total-sales`,e)}salesTax(e){return this.get(`${this.orderApiUrl}/sales-tax`,e)}shippingCost(e){return this.get(`${this.orderApiUrl}/shipping-cost`,e)}stats(e){return this.get(`${this.orderApiUrl}/stats`,e)}getPaymentDetails(e){return this.get(`${this.orderApiUrl}/payment-details`,e)}},OrderTypeEnum=(e=>(e.SELL="SELL",e.BUY="BUY",e))(OrderTypeEnum||{}),TypesService=class extends BaseService{constructor(e){super(e),this.typesApiUrl=`${this.apiUrl}/marketplace/v1/types`}list(e={}){return this.get(`${this.typesApiUrl}/list`,e)}search(e={}){return this.get(this.typesApiUrl,e)}getById(e){return this.get(`${this.typesApiUrl}/${e}`)}listFromAssets(){return this.post(`${this.typesApiUrl}/load`,{})}},WishlistService=class extends BaseService{constructor(e){super(e),this.wishlistApiUrl=`${this.apiUrl}/marketplace/v1/wishlists`}search(e={}){return this.get(this.wishlistApiUrl,e)}add(e){return this.post(this.wishlistApiUrl,e)}getByAssetId(e){return this.get(`${this.wishlistApiUrl}/${e}`)}remove(e){return this.delete(`${this.wishlistApiUrl}/${e}`)}},MenuService=class extends BaseService{constructor(e){super(e),this.menuApiUrl=`${this.apiUrl}/assets/v1/menus`,this.menuItemApiUrl=`${this.apiUrl}/assets/v1/menu-items`}getMenu(e){return this.get(this.menuApiUrl,e)}addMenu(e){return this.post(this.menuApiUrl,e)}getMenuById(e){return this.get(`${this.menuApiUrl}/${e}`)}updateMenu(e){return this.put(`${this.menuApiUrl}/${e.id}`,e)}deleteMenu(e){return this.patch(`${this.menuApiUrl}/${e}/archive`,{})}getMenuItems(e){return this.get(this.menuItemApiUrl,e)}addMenuItems(e){return this.post(this.menuItemApiUrl,e)}getAllergen(e){return this.get(`${this.menuItemApiUrl}/allergens`,e)}getDietary(e){return this.get(`${this.menuItemApiUrl}/dietaries`,e)}getMenuItemsById(e){return this.get(`${this.menuItemApiUrl}/${e.id}`)}updateMenuItem(e){return this.put(`${this.menuItemApiUrl}/${e.id}`,e)}deleteMenuItem(e){return this.patch(`${this.menuItemApiUrl}/${e.id}/archive`,{})}getMenuItemMap(e){return this.get(`${this.menuItemApiUrl}/menu-item-map`,e)}addMenuItemMap(e){return this.post(`${this.menuItemApiUrl}/menu-item-map`,e)}updateMenuItemMap(e){return this.put(`${this.menuItemApiUrl}/menu-item-map`,e)}deleteMenuItemMap(e){return this.delete(`${this.menuItemApiUrl}/${e.menuId}/menu-item-map/${e.menuItemId}`)}getMenuItemAllergen(e){return this.get(`${this.menuItemApiUrl}/menu-item-allergens`,e)}addMenuItemAllergen(e){return this.post(`${this.menuItemApiUrl}/menu-item-allergens`,e)}updateMenuItemAllergen(e){return this.put(`${this.menuItemApiUrl}/menu-item-allergens`,e)}getMenuItemDietary(e){return this.get(`${this.menuItemApiUrl}/menu-item-dietaries`,e)}addMenuItemDietary(e){return this.post(`${this.menuItemApiUrl}/menu-item-dietaries`,e)}updateMenuItemDietary(e){return this.put(`${this.menuItemApiUrl}/menu-item-dietaries`,e)}getMenuItemIngredients(e){return this.get(`${this.menuItemApiUrl}/menu-item-ingredients`,e)}addMenuItemIngredients(e){return this.post(`${this.menuItemApiUrl}/menu-item-ingredients`,e)}updateMenuItemIngredients(e){return this.put(`${this.menuItemApiUrl}/menu-item-ingredients`,e)}deleteMenuItemIngredients(e){return this.delete(`${this.menuItemApiUrl}/${e.typeId}/menu-item-ingredients/${e.menuItemId}`)}menuExportById(e,t){return this.get(`${this.menuApiUrl}/export-menu`,e,{onDownloadProgress:t})}},NotificationStatusEnum=(e=>(e.Read="READ",e.Unread="UNREAD",e))(NotificationStatusEnum||{}),EndUserNotificationEventNameEnum=(e=>(e.AcceptFollowRequest="accept_follow_request",e.BlockEndUser="block_end_user",e.BlockEndUserByOrg="block_end_user_by_org",e.ChangeEmail="change_email",e.CustomerAssetReport="customer_asset_report",e.Following="following",e.InviteAdmin="invite_admin",e.InviteEndUser="invite_end_user",e.GldInviteEndUser="gld_invite_end_user",e.GldInviteExistingEndUser="gld_invite_existing_end_user",e.GldAddedToCustomerFile="gld_added_to_customer_file",e.GldCustomerIvdtCreated="gld_customer_ivdt_created",e.GldReceivedCustomerFileRequest="gld_received_customer_file_request",e.GldCancelledCustomerFileRequest="gld_cancelled_customer_file_request",e.GldShareCustomerFileRequestHistory="gld_share_customer_file_request_history",e.RecurringEmailReport="recurring_email_report",e.ResetPassword="reset_password",e.SendFollowRequest="send_follow_request",e.ShareAsset="share_asset",e.ShareEndUserDeepLink="share_end_user_deep_link",e.ShareOrganizationDeepLink="share_organization_deep_link",e.ShareIvdt="share_ivdt",e.UnblockEndUser="unblock_end_user",e.UnblockEndUserByOrg="unblock_end_user_by_org",e.RemoveEndUser="remove_end_user",e.VdtMinted="vdt_minted",e.VerifyEmail="verify_email",e.VerifyPhone="verify_phone",e.MarketplaceEmail="marketplace_email",e.ContactUs="contact_us",e.SuspendOrder="suspend_order",e.UnsuspendOrder="unsuspend_order",e.BuyerBuyNow="buyer_buy_now",e.SellerBuyerPaid="seller_buyer_paid",e.BuyerOrderAccepted="buyer_order_accepted",e.BuyerOrderShipped="buyer_order_shipped",e.BuyerOrderDelivered="buyer_order_delivered",e.BuyerVDTTransferred="buyer_vdt_transferred",e.SellerOrderCancelled="seller_order_cancelled",e.BuyerPaymentRefunded="buyer_payment_refunded",e.SellerItemDelivered="seller_item_delivered",e.SellerFundsTransferred="seller_funds_transferred",e.SellerVDTTransferred="seller_vdt_transferred",e.BuyerItemReceived="buyer_item_received",e.SellerOrderAccepted="seller_order_accepted",e.SellerOrderShipped="seller_order_shipped",e.BuyerOrderCancelled="buyer_order_cancelled",e.BuyerReturnDelivered="buyer_return_delivered",e.SellerReturnDelivered="seller_return_delivered",e.SellerOrderDelivered="seller_order_delivered",e.SellerItemListed="seller_item_listed",e.SellerFirstBid="seller_first_bid",e.SellerAllBiddersRejected="seller_all_bidders_rejected",e.SellerAuctionEnd="seller_auction_end",e.SellerDelistAsset="seller_delist_asset",e.SellerNewHighestBid="seller_new_highestBid",e.BuyerNoLongerHighestBid="buyer_no_longer_highest_bid",e.BuyerBidAccept="buyer_bid_accept",e.BuyerTopFiveBidders="buyer_top_five_bidders",e.BuyerAllOtherBidders="buyer_all_other_bidders",e.BuyerBidRejected="buyer_bid_rejected",e))(EndUserNotificationEventNameEnum||{}),qs=__toESM(require("qs")),NotificationService=class extends BaseService{constructor(){super(...arguments),this.notifApiUrl=`${this.apiUrl}/notifications/v1/notifications`}searchNotifications(e){return this.get(`${this.apiUrl}/notifications/v1/notifications`,e)}listNotifications(e){return this.get(`${this.apiUrl}/notifications/v1/notifications/list`,e)}searchAdminNotifications(e){return this.get(`${this.apiUrl}/notifications/v1/admin-notifications`,e)}listAdminNotifications(e){return this.get(`${this.apiUrl}/notifications/v1/admin-notifications/list`,e)}getNotificationById(e){return this.get(`${this.apiUrl}/notifications/v1/notifications/${e}`)}deleteNotifications(e){return this.delete(`${this.apiUrl}/notifications/v1/notifications`,{ids:e},{paramsSerializer:e=>qs.stringify(e)})}updateNotificationStatus(e,t){const i={status:t};return this.patch(`${this.apiUrl}/notifications/v1/notifications/${e}/status`,i)}registerPushNotificationToken(e){return this.post(`${this.apiUrl}/notifications/v1/push/register`,e)}testSinglePush(e){return this.post(`${this.apiUrl}/notifications/v1/push/test-single-push`,e)}testMultiPush(e){return this.post(`${this.apiUrl}/notifications/v1/push/test-multi-push`,e)}searchEndUserEvents(e){return this.get(`${this.notifApiUrl}/end-user-events`,e)}listEndUserEvents(e){return this.get(`${this.notifApiUrl}/end-user-events/list`,e)}updateEndUserEvents(e,t){return this.put(`${this.notifApiUrl}/end-user-events/${e}`,t)}updateAdminNotificationStatus(e,t){const i={status:t};return this.patch(`${this.apiUrl}/notifications/v1/admin-notifications/${e}/status`,i)}clearAdminNotification(){return this.post(`${this.apiUrl}/notifications/v1/admin-notifications/clear`,{})}},OrganizationService=class extends BaseService{getOrganizations(){return __async(this,null,(function*(){return this.get(`${this.apiUrl}/common-admin/v1/organizations`,{},{timeout:5e3})}))}getOrganizationList(e){return __async(this,null,(function*(){return this.get(`${this.apiUrl}/common-admin/v1/organizations/list`,e)}))}getOrganization(e){return __async(this,null,(function*(){return this.get(`${this.apiUrl}/common-admin/v1/organizations/${e}`,{})}))}searchOrganizationAddresses(e){return __async(this,null,(function*(){return this.get(`${this.apiUrl}/common-admin/v1/organization-profiles/addresses`,e)}))}getOrganizationMainAddress(e){return __async(this,null,(function*(){return this.get(`${this.apiUrl}/common-admin/v1/organization-profiles/${e}/addresses/main`,{})}))}getWallet(e){return __async(this,null,(function*(){return this.get(`${this.apiUrl}/common-admin/v1/organizations/${e}/wallet`,{},{timeout:5e3})}))}initVdt(e,t){return __async(this,null,(function*(){return this.post(`${this.apiUrl}/common-admin/v1/organizations/${e}/initiate-vdt`,t,{headers:{"x-organization-id":e}})}))}canSetupOrg(e){return __async(this,null,(function*(){return this.get(`${this.apiUrl}/common-admin/v1/organizations/${e}/can-setup`,{})}))}getOrganizationVdt(e){return __async(this,null,(function*(){return this.get(`${this.apiUrl}/web3/v1/nft/organization-vdt/${e}`,{})}))}update(e,t){return __async(this,null,(function*(){return this.put(`${this.apiUrl}/common-admin/v1/organizations/${e}`,t,{headers:{"x-organization-id":e}})}))}addContact(e,t){return __async(this,null,(function*(){return this.post(`${this.apiUrl}/common-admin/v1/organizations/${e}/contacts`,t,{headers:{"x-organization-id":e}})}))}addAddress(e){return __async(this,null,(function*(){return this.post(`${this.apiUrl}/common-admin/v1/organization-profiles/addresses`,e,{headers:{"x-organization-id":null==e?void 0:e.orgId}})}))}shareDeepLink(e,t){return __async(this,null,(function*(){return this.post(`${this.apiUrl}/common-admin/v1/organizations/${e}/share-deep-link`,t)}))}},OrganizationLocationService=class extends BaseService{getLocationList(e){return __async(this,null,(function*(){return this.get(`${this.apiUrl}/common-admin/v1/organization-locations/list`,e)}))}addLocation(e,t){return __async(this,null,(function*(){return this.post(`${this.apiUrl}/common-admin/v1/organization-locations/${e}`,t)}))}getLocation(e){return __async(this,null,(function*(){return this.get("/common-admin/v1/organization-locations/"+e.id,e)}))}},ReportHistoryStatusEnum=(e=>(e.REQUESTED="REQUESTED",e.IN_PROGRESS="IN_PROGRESS",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e))(ReportHistoryStatusEnum||{}),ReportHistoryTypeEnum=(e=>(e.SELLER_LISTING="SELLER_LISTING",e.SELLER_ORDERS="SELLER_ORDERS",e.BUYER_ORDERS="BUYER_ORDERS",e))(ReportHistoryTypeEnum||{}),ReportsService=class extends BaseService{constructor(e){super(e),this.reportsApiUrl=`${this.apiUrl}/reports/v1`}searchHistories(e){return this.get(`${this.reportsApiUrl}/histories/search`,e)}},UserTypeEnum=(e=>(e.EndUser="end-user",e.Admin="admin",e))(UserTypeEnum||{}),ProfileTypeEnum=(e=>(e.Buyer="buyer",e.Seller="seller",e.Creator="creator",e))(ProfileTypeEnum||{}),UserRoleEnum=(e=>(e.SuperUser="super_user",e.AdminUser="admin_user",e.SystemUser="system_user",e.BusinessUser="business_user",e.MarketingUser="marketing_user",e.CustomerSupportUser="cust_support_user",e.TechSupportUser="tech_support_user",e.ProductUser="product_user",e.Client="client",e.Official="official",e.FirstOrgUser="first_org_user",e.Member="member",e))(UserRoleEnum||{}),UserRoleIdEnum=(e=>(e[e.Client=1]="Client",e[e.Official=2]="Official",e[e.FirstOrgUser=3]="FirstOrgUser",e[e.Member=4]="Member",e[e.Inspector=5]="Inspector",e[e.Buyer=6]="Buyer",e[e.Seller=6]="Seller",e))(UserRoleIdEnum||{}),VerifyCredentialTypeEnum=(e=>(e.Pin="PIN",e.Otp="OTP",e.Face="FACE",e.Fyc="FYC",e))(VerifyCredentialTypeEnum||{}),SocialMediaSiteTypeEnum=(e=>(e.Facebook="Facebook",e.Twitter="Twitter",e.Instagram="Instagram",e.LinkedIn="LinkedIn",e.Youtube="Youtube",e.Github="Github",e.Reddit="Reddit",e.Pinterest="Pinterest",e.Tumbler="Tumbler",e))(SocialMediaSiteTypeEnum||{}),PaymentTypeEnum=(e=>(e.BankAccount="BankAccount",e.NetBanking="NetBanking",e.Card="Card",e.Paypal="Paypal",e))(PaymentTypeEnum||{}),AddressTypeEnum=(e=>(e.Home="Home",e.Office="Office",e.Warehouse="Warehouse",e.Company="Company",e.Factory="Factory",e.Others="Others",e))(AddressTypeEnum||{}),DocumentStatusEnum=(e=>(e.Pending="Pending",e.Verified="Verified",e.Rejected="Rejected",e))(DocumentStatusEnum||{}),SellerTypeEnum=(e=>(e.Individual="Individual",e.Company="Company",e))(SellerTypeEnum||{}),ConsentActionTypesEnum=(e=>(e.Privacy="privacy",e.Age="age",e))(ConsentActionTypesEnum||{}),BeingLevelEnum=(e=>(e[e.GovWitness=1]="GovWitness",e[e.GovRealId=2]="GovRealId",e[e.SecGovId=3]="SecGovId",e[e.WitnessConfirm=4]="WitnessConfirm",e[e.MultiEvents=5]="MultiEvents",e[e.Human=6]="Human",e))(BeingLevelEnum||{}),EGovIdType=(e=>(e.Unknown="Unknown",e.Passport="Passport",e.Visa="Visa",e.DriverLicense="Drivers License",e.IdCard="Identification Card",e.Permit="Permit",e.Currency="Currency",e.ResidenceDoc="Residence Document",e.TravelDoc="Travel Document",e.BirthCert="Birth Certificate",e.VehicleReg="Vehicle Registration",e.Other="Other",e.WeaponLicense="Weapon License",e.TribalId="Tribal Identification",e.VoterId="Voter Identification",e.Military="Military",e.TaxId="Tax Identification",e.FederalId="Federal ID",e.MedicalCard="Medical Card",e))(EGovIdType||{}),EFycCheckStatus=(e=>(e.Ok="OK",e.Fail="FAIL",e.Unknown="UNKNOWN",e))(EFycCheckStatus||{}),EAddressType=(e=>(e.Billing="Billing",e.Home="Home",e.Office="Office",e.Warehouse="Warehouse",e.Company="Company",e.Factory="Factory",e.Others="Others",e))(EAddressType||{}),EBeingLevel=(e=>(e[e.GovWitness=1]="GovWitness",e[e.GovRealId=2]="GovRealId",e[e.SecGovId=3]="SecGovId",e[e.WitnessConfirm=4]="WitnessConfirm",e[e.MultiEvents=5]="MultiEvents",e[e.Human=6]="Human",e))(EBeingLevel||{}),AddressService=class extends BaseService{constructor(e){super(e),this.addressApiUrl=`${this.apiUrl}/users/v1/${e.userType}/addresses`}searchAddresses(e){return this.get(this.addressApiUrl,e)}listAddresses(e){return this.get(`${this.addressApiUrl}/list`,e)}addAddress(e){return this.post(`${this.addressApiUrl}`,e)}getMainAddress(){return this.get(`${this.addressApiUrl}/main`)}getAddressById(e){return this.get(`${this.addressApiUrl}/${e}`)}editAddress(e,t){return this.put(`${this.addressApiUrl}/${e}`,t)}removeAddress(e){return this.delete(`${this.addressApiUrl}/${e}`)}},PaymentDetailsService=class extends BaseService{constructor(e){super(e),this.profileApiUrl=e.profileApiUrl}listPaymentDetails(e,t){return this.get(`${this.profileApiUrl}/${e}/payment-details`,t)}addPaymentDetails(e,t){return this.post(`${this.profileApiUrl}/${e}/payment-details`,t)}getDefaultPaymentDetails(e){return this.get(`${this.profileApiUrl}/${e}/payment-details/default`)}getPaymentDetailsById(e,t){return this.get(`${this.profileApiUrl}/${e}/payment-details/${t}`)}editPaymentDetails(e,t,i){return this.put(`${this.profileApiUrl}/${e}/payment-details/${t}`,i)}removePaymentDetails(e,t){return this.delete(`${this.profileApiUrl}/${e}/payment-details/${t}`)}},ProfileService=class extends BaseService{constructor(e){super(e),this.profileApiUrl=`${this.apiUrl}/users/v1/end-user/${e.profileType}`}listProfiles(e){return this.get(`${this.profileApiUrl}/list`,e)}getDefaultProfile(){return this.get(`${this.profileApiUrl}/default`)}getProfileById(e){return this.get(`${this.profileApiUrl}/${e}`)}editProfile(e,t){return this.put(`${this.profileApiUrl}/${e}`,t)}removeProfile(e){return this.delete(`${this.profileApiUrl}/${e}`)}addProfile(e){return this.post(`${this.profileApiUrl}`,e)}},ShippingAddressService=class extends BaseService{constructor(e){super(e),this.profileApiUrl=e.profileApiUrl}listShippingAddresses(e,t){return this.get(`${this.profileApiUrl}/${e}/shipping-addresses`,t)}addShippingAddress(e,t){return this.post(`${this.profileApiUrl}/${e}/shipping-addresses`,t)}getDefaultShippingAddress(e){return this.get(`${this.profileApiUrl}/${e}/shipping-addresses/default`)}getShippingAddressById(e,t){return this.get(`${this.profileApiUrl}/${e}/shipping-addresses/${t}`)}editShippingAddress(e,t,i){return this.put(`${this.profileApiUrl}/${e}/shipping-addresses/${t}`,i)}removeShippingAddress(e,t){return this.delete(`${this.profileApiUrl}/${e}/shipping-addresses/${t}`)}},BuyerProfileService=class extends ProfileService{constructor(e){super(__spreadProps(__spreadValues({},e),{profileType:"buyer"})),this.paymentDetails=new PaymentDetailsService(__spreadProps(__spreadValues({},e),{profileApiUrl:this.profileApiUrl})),this.shippingAddress=new ShippingAddressService(__spreadProps(__spreadValues({},e),{profileApiUrl:this.profileApiUrl}))}editProfile(e,t){return this.put(`${this.profileApiUrl}/${e}`,t)}addProfile(e){return this.post(this.profileApiUrl,e)}getBuyerProfile(){return this.get(`${this.apiUrl}/users/v1/end-user/buyer/default`,{},{timeout:5e3})}getBuyerProfilebyId(e){return this.get(`${this.apiUrl}/users/v1/end-user/buyer/${e}`,{},{timeout:5e3})}getBuyerAddresses(e){return this.get(`${this.apiUrl}/users/v1/end-user/buyer/${e}/shipping-addresses`,{},{timeout:5e3})}getBuyerPaymentDetails(e){return this.get(`${this.apiUrl}/users/v1/end-user/buyer/${e}/payment-details`,{},{timeout:5e3})}createBuyerProfile(e){return this.post(`${this.apiUrl}/users/v1/end-user/buyer`,e,{timeout:5e3})}updateBuyerProfile(e){return this.patch(`${this.apiUrl}/users/v1/end-user/buyer`,e)}addBuyerAddress(e){return this.post(`${this.apiUrl}/users/v1/end-user/buyer/${e.profileId}/shipping-addresses`,e,{timeout:5e3})}addBuyerPaymentDetails(e){return this.post(`${this.apiUrl}/users/v1/end-user/buyer/${e.profileId}/payment-details`,e,{timeout:5e3})}updateBuyerAddress(e){return this.put(`${this.apiUrl}/users/v1/end-user/buyer/${e.profileId}/shipping-addresses/${e.addressId}`,e,{timeout:5e3})}deleteBuyerAddress(e){return this.delete(`${this.apiUrl}/users/v1/end-user/buyer/${e.profileId}/shipping-addresses/${e.addressId}`)}updateBuyerPaymentDetails(e){return this.put(`${this.apiUrl}/users/v1/end-user/buyer/${e.profileId}/payment-details/${e.id}`,e,{timeout:5e3})}deleteBuyerPaymentDetails(e){return this.delete(`${this.apiUrl}/users/v1/end-user/buyer/${e.profileId}/payment-details/${e.id}`)}},CreatorProfileService=class extends ProfileService{constructor(e){super(__spreadProps(__spreadValues({},e),{profileType:"creator"}))}editProfile(e,t){return this.put(`${this.profileApiUrl}/${e}`,t)}addProfile(e){return this.post(this.profileApiUrl,e)}},DocumentTypesService=class extends BaseService{constructor(e){super(e),this.dtApiUrl=`${this.apiUrl}/users/v1/document-types`}searchDocumentTypes(e){return this.get(this.dtApiUrl,e)}listDocumentTypes(e){return this.get(`${this.dtApiUrl}/list`,e)}},DocumentsService=class extends BaseService{constructor(e){super(e),this.profileApiUrl=e.profileApiUrl}listDocuments(e,t){return this.get(`${this.profileApiUrl}/${e}/documents`,t)}addDocument(e,t){return this.post(`${this.profileApiUrl}/${e}/documents`,t)}getDocumentById(e,t){return this.get(`${this.profileApiUrl}/${e}/documents/${t}`)}editDocument(e,t,i){return this.put(`${this.profileApiUrl}/${e}/documents/${t}`,i)}removeDocument(e,t){return this.delete(`${this.profileApiUrl}/${e}/documents/${t}`)}},FeedbackService=class extends BaseService{constructor(e){super(e),this.feedbackApiUrl=`${this.apiUrl}/users/v1/end-user/feedbacks`}addFeedback(e){return this.post(this.feedbackApiUrl,e)}},FeedbackEnum=(e=>(e.EXCELLENT="EXCELLENT",e.GOOD="GOOD",e.POOR="POOR",e.VERY_POOR="VERY POOR",e))(FeedbackEnum||{}),RoleService=class extends BaseService{constructor(e){super(e),this.rolesApiUrl=`${this.apiUrl}/users/v1/${e.userType}/roles`}searchRoles(e){return this.get(this.rolesApiUrl,e)}},SellerProfileService=class extends ProfileService{constructor(e){super(__spreadProps(__spreadValues({},e),{profileType:"seller"})),this.paymentDetails=new PaymentDetailsService(__spreadProps(__spreadValues({},e),{profileApiUrl:this.profileApiUrl})),this.shippingAddress=new ShippingAddressService(__spreadProps(__spreadValues({},e),{profileApiUrl:this.profileApiUrl})),this.documents=new DocumentsService(__spreadProps(__spreadValues({},e),{profileApiUrl:this.profileApiUrl}))}getSellerProfileByUserId(e){return this.get(`${this.apiUrl}/users/v1/end-user/seller/list`,{userId:e},{timeout:5e3})}getSellerDocuments(e){return this.get(`${this.apiUrl}/users/v1/end-user/seller/${e}/documents/`)}addSellerDocument(e){return this.post(`${this.apiUrl}/users/v1/end-user/seller/${e.profileId}/documents`,e)}updateSellerDocument(e){return this.put(`${this.apiUrl}/users/v1/end-user/seller/${e.profileId}/documents/${e.docId}`,e)}getSellerAddress(e){return this.get(`${this.apiUrl}/users/v1/end-user/seller/${e}/shipping-addresses`)}getSellerDefaultPaymentDetails(e){return __async(this,null,(function*(){return this.get(`${this.apiUrl}/users/v1/end-user/seller/${e}/payment-details/default`,{},{timeout:5e3})}))}editProfile(e,t){return this.put(`${this.profileApiUrl}/${e}`,t)}addProfile(e){return this.post(this.profileApiUrl,e)}deleteSellerAddress(e,t){return this.delete(`${this.apiUrl}/users/v1/end-user/seller/${e}/shipping-addresses/${t}`)}addSellerAddress(e){return this.post(`${this.apiUrl}/users/v1/end-user/seller/${e.profileId}/shipping-addresses`,e)}editSellerAddress(e){return this.put(`${this.apiUrl}/users/v1/end-user/seller/${e.profileId}/shipping-addresses/${e.addressId}`,e)}},UserService=class extends BaseService{constructor(e){super(e),this.userType=e.userType,this.usersApiUrl=`${this.apiUrl}/users/v1/${e.userType}/users`,this.address=new AddressService(e)}getEndUser(e){return this.get(`${this.apiUrl}/users/v1/end-user/users/${e}`,{})}searchUsers(e){return this.get(this.usersApiUrl,e)}listUsers(e){return this.get(`${this.usersApiUrl}/list`,e)}getUser(e){return this.get(`${this.usersApiUrl}/${e}`)}editUser(e,t){return this.put(`${this.usersApiUrl}/${e}`,t)}removeUser(e){return this.delete(`${this.usersApiUrl}/${e}`)}getUserRoles(e){return this.get(`${this.usersApiUrl}/${e}/roles`)}changeEmail(e,t){return this.patch(`${this.usersApiUrl}/${e}/change-email`,t)}requestEmailVerification(e){return this.patch(`${this.usersApiUrl}/${e}/verify-email`,{})}verifyEmail(e,t){const i=createQueryParams({ticket:t.ticket});return this.get(`${this.usersApiUrl}/${e}/verify-email?${i}`)}changePhone(e,t){return this.patch(`${this.usersApiUrl}/${e}/change-phone`,t)}requestPhoneVerification(e){return this.patch(`${this.usersApiUrl}/${e}/verify-phone`,{})}verifyPhone(e,t){return this.post(`${this.usersApiUrl}/${e}/verify-phone`,t)}assignRoles(e,t){return this.patch(`${this.usersApiUrl}/${e}/assign-roles`,t)}removeRoles(e,t){return this.patch(`${this.usersApiUrl}/${e}/remove-roles`,t)}requestResetPassword(e){return this.patch(`${this.usersApiUrl}/${e}/request-password`,{})}blockUser(e){return this.patch(`${this.usersApiUrl}/${e}/block`,{})}unblockUser(e){return this.patch(`${this.usersApiUrl}/${e}/unblock`,{})}verifyCredentials(e){return this.post(`${this.usersApiUrl}/verify-credentials`,e)}verifyCredentialsWitness(e){return this.post(`${this.usersApiUrl}/verify-credentials-witness`,e)}getBeingId(e){return this.get(`${this.usersApiUrl}/${e}/being-id`)}setBeingId(e,t){return this.patch(`${this.usersApiUrl}/${e}/being-id`,t)}recalculateBeingId(e,t){return this.patch(`${this.usersApiUrl}/${e}/being-id/calculate`,t)}completeFycOnboarding(e,t){return this.patch(`${this.usersApiUrl}/${e}/complete-onboarding`,t)}getPreviousSessionSelfie(e){return this.get(`${this.usersApiUrl}/${e}/prev-session-selfie`)}searchOrganizations(e,t={}){return this.get(`${this.apiUrl}/users/v1/${this.userType}/${e}/organizations`,t)}getCurrentOrganization(e){return this.get(`${this.apiUrl}/users/v1/${this.userType}/${e}/organizations/current`)}createConsent(e){return this.post(`${this.usersApiUrl}/consent-action`,e)}setPrivacy(e,t){return this.patch(`${this.usersApiUrl}/${e}/public/${t}`,{})}getInviteById(e){return this.get(`${this.apiUrl}/users/v1/${this.userType}/invites/${e}`,{})}listInvites(e){return this.get(`${this.apiUrl}/users/v1/${this.userType}/invites/list`,e)}exportList(e){return this.get(`${this.apiUrl}/users/v1/${this.userType}/users/export`,e,{responseType:"blob"})}listFycDocuments(e){return this.get(`${this.apiUrl}/users/v1/${this.userType}/users/list-fyc-documents`,e)}searchDocuments(e){return this.get(`${this.apiUrl}/users/v1/documents/list`,e)}listDocuments(e){return this.get(`${this.apiUrl}/users/v1/documents/list`,e)}shareDeepLink(e,t){return this.post(`${this.apiUrl}/users/v1/${this.userType}/users/${e}/share-deep-link`,t)}ivdtRequestShareableInfo(e){return this.post(`${this.apiUrl}/users/v1/${this.userType}/users/request-ivdt-shareable`,e)}ivdtShareableInfo(e){return this.get(`${this.apiUrl}/users/v1/${this.userType}/users/ivdt-shareable-info`,e)}sendVerificationCode(e){return this.post(`${this.apiUrl}/users/v1/${this.userType}/verifications/send-code`,e)}verifyCode(e){return this.post(`${this.apiUrl}/users/v1/${this.userType}/verifications/verify-code`,e)}},InviteTypeEnum=(e=>(e.Internal="INTERNAL",e.External="EXTERNAL",e))(InviteTypeEnum||{}),Web3Service=class extends BaseService{constructor(e){super(e),this.web3ApiUrl=`${this.apiUrl}/web3/v1/nft`}mint(e,t){const i="SERVICES"===e?"service":"asset";return this.post(`${this.web3ApiUrl}/mint-${i}`,t)}getWitnessVdt(e){return this.get(`${this.web3ApiUrl}/witness-vdt/${e}`)}getDeviceVdt(e){return this.get(`${this.web3ApiUrl}/device-vdt/${e}`)}getUserVdt(e){return this.get(`${this.web3ApiUrl}/user-vdt/${e}`,{})}getUserVdtPublic(e){return this.get(`${this.web3ApiUrl}/${e}/user-vdt-public`,{})}initUserVdt(e){return this.post(`${this.web3ApiUrl}/init-user-vdt`,e)}initUserListVdt(){return this.post(`${this.web3ApiUrl}/init-user-list-vdt`,{})}initUserVdtV2(e){return this.post(`${this.web3ApiUrl}/init-user-vdt-v2`,e)}getOrganizationVdtPublic(e){return this.get(`${this.web3ApiUrl}/${e}/organization-vdt-public`,{})}getGasEstimation(e){return this.get(`${this.web3ApiUrl}/gas-estimation`,{assetId:e})}publishCustomerFile(e,t){return this.post(`${this.web3ApiUrl}/customer-file/publish`,{id:e,comment:t},{timeout:6e4})}};
//# sourceMappingURL=/sm/c926a063efb1dcceb682c33ceb3c8ebcadb5d6789731dfff4dc91dc91486effd.map