pfr-tk
Version:
Perkforce Tool Kit, specifically developed for perkforce in house development and testing.
18 lines • 56.2 kB
JavaScript
'use strict';var zaionsToolKit=require('zaions-tool-kit'),_=require('moment'),mongodb=require('mongodb');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ___default=/*#__PURE__*/_interopDefault(_);var Jo=Object.defineProperty,es=Object.defineProperties;var ts=Object.getOwnPropertyDescriptors;var we=Object.getOwnPropertySymbols;var os=Object.prototype.hasOwnProperty,ss=Object.prototype.propertyIsEnumerable;var Ve=(e,s,o)=>s in e?Jo(e,s,{enumerable:true,configurable:true,writable:true,value:o}):e[s]=o,h=(e,s)=>{for(var o in s||(s={}))os.call(s,o)&&Ve(e,o,s[o]);if(we)for(var o of we(s))ss.call(s,o)&&Ve(e,o,s[o]);return e},M=(e,s)=>es(e,ts(s));var P=(a=>(a.employer="EMPLOYER",a.employee="EMPLOYEE",a.merchant="MERCHANT",a.student_body="STUDENT_BODY",a.admin="ADMIN",a))(P||{}),k=(o=>(o.PENDING="PENDING",o.ACCEPTED="ACCEPTED",o))(k||{}),G=(t=>(t.LIVE="LIVE",t.SCHEDULED="SCHEDULED",t.ENDED="ENDED",t))(G||{}),D=(E=>(E.DRAFT="DRAFT",E.APPROVED="APPROVED",E.LIVE="LIVE",E.SCHEDULED="SCHEDULED",E.ENDED="ENDED",E.ENDINGSOON="ENDINGSOON",E.PENDINGAPPROVAL="PENDINGAPPROVAL",E.DISAPPROVED="DISAPPROVED",E))(D||{}),v=(i=>(i.ENDED="ENDED",i.ENDINGSOON="ENDINGSOON",i.SCHEDULED="SCHEDULED",i.LIVE="LIVE",i))(v||{}),C=(t=>(t.NO_LOGO="NO_LOGO",t.USE_PERK_LOGO="USE_PERK_LOGO",t.USE_PROFILE_LOGO="USE_PROFILE_LOGO",t))(C||{}),b=(t=>(t.PENDING="PENDING",t.APPROVED="APPROVED",t.REJECTED="REJECTED",t))(b||{}),x=(t=>(t.VERIFIED="verified",t.UNVERIFIED="unverified",t.PENDING="pending",t))(x||{}),F=(o=>(o.PURCHASED="PURCHASED",o.FREE="FREE",o))(F||{}),B=(n=>(n.OUT_OF_STOCK="out_of_stock",n.PER_USER_LIMIT_REACHED="per_user_limit_reached",n.DRAFT="draft",n.SCHEDULED="scheduled",n.EXPIRED="expired",n.DELETED="deleted",n))(B||{}),w=(o=>(o.SUPER_USERS="super_users",o.ALL_USERS="all_users",o))(w||{}),V=(t=>(t.ADD="add",t.EDIT="edit",t.LIST="list",t))(V||{}),Y=(t=>(t.TEXT="text",t.FILE="file",t.URL="url",t))(Y||{}),K=(t=>(t.MANUAL="MANUAL",t.EMAIL_FORMAT="EMAIL_FORMAT",t.NEW_SIGNUPS_EMPLOYEES="NEW_SIGNUPS_EMPLOYEES",t))(K||{}),H=(t=>(t.ANDROID="android",t.IOS="ios",t.WEB="web",t))(H||{}),q=(a=>(a.string="string",a.email="email",a.password="password",a.positiveInt="positiveInt",a.url="url",a))(q||{}),$=(o=>(o.mobileBrowser="browser",o.mobileApp="app",o))($||{}),W=(o=>(o.INTERNAL="internal",o.EXTERNAL="external",o))(W||{}),X=(t=>(t.MICROSOFT_TEAMS="microsoft_teams",t.SLACK="slack",t.STRIPE="stripe",t))(X||{}),N=(t=>(t.ENABLED="enabled",t.DISABLED="disabled",t.NOT_CONNECTED="not_connected",t))(N||{}),Q=(t=>(t.addEdit="add_edit",t.pubUnPub="pub_unpub",t.sendForApproval="send_for_approval",t))(Q||{}),f=(o=>(o.ASCEND="ascend",o.DESCEND="descend",o))(f||{}),z=(i=>(i.point="Point",i.lineString="LineString",i.polygon="Polygon",i.multiPoint="MultiPoint",i))(z||{}),j=(a=>(a.primary="primary",a.dashed="dashed",a.default="default",a.link="link",a.text="text",a))(j||{}),Z=(t=>(t.granted="granted",t.denied="denied",t.default="default",t))(Z||{}),J=(t=>(t.PENDING="PENDING",t.APPROVED="APPROVED",t.DISAPPROVED="DISAPPROVED",t))(J||{}),ee=(l=>(l.ALL="ALL",l.MADE_BY_ME="MADE_BY_ME",l.OWNER="OWNER",l.MERCHANT="MERCHANT",l.EMPLOYER="EMPLOYER",l.SUPER_USER="SUPER_USER",l.STANDARD_USER="STANDARD_USER",l.STUDENT_BODY="STUDENT_BODY",l.ADMIN="ADMIN",l))(ee||{}),te=(o=>(o.AUTOMATIC="AUTOMATIC",o.MANUAL="MANUAL",o))(te||{}),oe=(n=>(n.NOT_CLAIMED="NOT_CLAIMED",n.REQUESTED="REQUESTED",n.GRANTED="GRANTED",n.REJECTED="REJECTED",n.EXPIRED="EXPIRED",n.REFUNDED="REFUNDED",n))(oe||{}),se=(t=>(t.small="small",t.middle="middle",t.large="large",t))(se||{}),re=(t=>(t.flexStart="flex-start",t.center="center",t.flexEnd="flex-end",t))(re||{}),ae=(n=>(n.flexStart="flex-start",n.center="center",n.flexEnd="flex-end",n.spaceBetween="space-between",n.spaceAround="space-around",n.spaceEvenly="space-evenly",n))(ae||{}),ne=(o=>(o.svg="svg",o.other="other",o))(ne||{}),ie=(o=>(o.category="category",o.subcategory="subcategory",o))(ie||{}),Ee=(o=>(o.file="file",o.csv="csv",o))(Ee||{}),le=(t=>(t.FILE="file",t.URL="url",t.TEXT="text",t))(le||{}),de=(t=>(t.web="web",t.android="android",t.ios="ios",t))(de||{}),ce=(t=>(t.active="active",t.inactive="inactive",t.deprecated="deprecated",t))(ce||{}),Ie=(o=>(o.success="success",o.error="error",o))(Ie||{}),pe=(o=>(o.every="every",o.any="any",o))(pe||{}),Re=(o=>(o.frontend="frontend",o.backend="backend",o))(Re||{}),_e=(o=>(o.mobileBrowser="mobile-browser",o.mobileApp="mobile-app",o))(_e||{}),Ae=(n=>(n.NOT_CLAIMED="not claimed",n.REQUESTED="requested",n.GRANTED="granted",n.REJECTED="rejected",n.EXPIRED="expired",n.REFUNDED="refunded",n))(Ae||{}),Te=(t=>(t.ADDED="added",t.INVITED="invited",t.SIGNED_UP="signed_up",t))(Te||{}),ue=(o=>(o.PERK="perk",o.BENEFIT="benefit",o))(ue||{}),Se=(o=>(o.add="add",o.update="update",o))(Se||{}),Oe=(p=>(p.id="id",p.roleIdentifier="roleIdentifier",p.defaultRoleForEmployer="defaultRoleForEmployer",p.defaultRoleForStudentBody="defaultRoleForStudentBody",p.defaultRoleForMerchant="defaultRoleForMerchant",p.defaultRoleForMerchantEmployee="defaultRoleForMerchantEmployee",p.defaultRoleForStudentBodyEmployee="defaultRoleForStudentBodyEmployee",p.defaultRoleForStudentBodySuperUser="defaultRoleForStudentBodySuperUser",p.defaultRoleForEmployerEmployee="defaultRoleForEmployerEmployee",p.defaultRoleForEmployerSuperUser="defaultRoleForEmployerSuperUser",p.defaultRoleForAdmin="defaultRoleForAdmin",p))(Oe||{}),me=(o=>(o.completed="completed",o.failed="failed",o))(me||{}),Pe=(i=>(i.pending="pending",i.inProgress="inProgress",i.completed="completed",i.failed="failed",i))(Pe||{}),De=(t=>(t.validationFailed="validationFailed",t.roleUpdate="roleUpdate",t.processingError="processingError",t))(De||{}),Ce=(i=>(i.pending="pending",i.processing="processing",i.completed="completed",i.failed="failed",i))(Ce||{}),Ne=(t=>(t.active="active",t.inactive="inactive",t.deprecated="deprecated",t))(Ne||{});var fe=(a=>(a.userManagement="userManagement",a.roleManagement="roleManagement",a.perkManagement="perkManagement",a.perkApprovalManagement="perkApprovalManagement",a.permissionManagement="permissionManagement",a))(fe||{}),Le=(r=>(r.listPerks="listPerks",r.viewPerk="viewPerk",r.viewNonPublishedPerks="viewNonPublishedPerks",r.viewAnyPerk="viewAnyPerk",r.createPerk="createPerk",r.updatePerk="updatePerk",r.updateOrgUserPerk="updateOrgUserPerk",r.updateAnyPerk="updateAnyPerk",r.deletePerk="deletePerk",r.deleteOrgUserPerk="deleteOrgUserPerk",r.deleteAnyPerk="deleteAnyPerk",r.restorePerk="restorePerk",r.forceDeletePerk="forceDeletePerk",r.listTrashedPerks="listTrashedPerks",r.viewTrashedPerk="viewTrashedPerk",r.canAddDescriptionToPerk="canAddDescriptionToPerk",r.canAddImageToPerk="canAddImageToPerk",r.canAddLogoToPerk="canAddLogoToPerk",r.canAddCategoryToPerk="canAddCategoryToPerk",r.canAddGroupsToPerk="canAddGroupsToPerk",r.canAddContactToPerk="canAddContactToPerk",r.canAddDisplayScheduleToPerk="canAddDisplayScheduleToPerk",r.canAddDiscountToPerk="canAddDiscountToPerk",r.canAddPurchasableToPerk="canAddPurchasableToPerk",r.canAddLimitsAndConstraintsToPerk="canAddLimitsAndConstraintsToPerk",r.canAddCodesToPerk="canAddCodesToPerk",r.canAddInterestToPerk="canAddInterestToPerk",r.canAddLocationsToPerk="canAddLocationsToPerk",r.canPublishPerk="canPublishPerk",r.listPerkApprovalRequests="listPerkApprovalRequests",r.listAllPerkApprovalRequests="listAllPerkApprovalRequests",r.viewPerkApprovalRequest="viewPerkApprovalRequest",r.viewAnyPerkApprovalRequest="viewAnyPerkApprovalRequest",r.createPerkApprovalRequest="createPerkApprovalRequests",r.updatePerkApprovalRequest="updatePerkApprovalRequest",r.deletePerkApprovalRequest="deletePerkApprovalRequest",r.restorePerkApprovalRequest="restorePerkApprovalRequest",r.forceDeletePerkApprovalRequest="forceDeletePerkApprovalRequest",r.listTrashedPerkApprovalRequests="listTrashedPerkApprovalRequests",r.viewTrashedPerkApprovalRequest="viewTrashedPerkApprovalRequest",r.rejectPerkApprovalRequest="rejectPerkApprovalRequest",r.rejectAnyPerkApprovalRequest="rejectAnyPerkApprovalRequest",r.approvePerkApprovalRequest="approvePerkApprovalRequest",r.approveAnyPerkApprovalRequest="approveAnyPerkApprovalRequest",r.listRoles="listRoles",r.viewRole="viewRole",r.createRole="createRole",r.updateRole="updateRole",r.deleteRole="deleteRole",r.restoreRole="restoreRole",r.forceDeleteRole="forceDeleteRole",r.listTrashedRole="listTrashedRole",r.viewTrashedRole="viewTrashedRole",r.canAssignRoleToUser="canAssignRoleToUser",r.canRemoveRoleFromUser="canRemoveRoleFromUser",r.canRunRoleValidatorManager="canRunRoleValidatorManager",r.canRunUserRoleBackgroundMigration="canRunUserRoleBackgroundMigration",r.canViewUserRoleBackgroundMigration="canViewUserRoleBackgroundMigration",r.assignPermissionsToRole="assignPermissionsToRole",r.removePermissionsFromRole="removePermissionsFromRole",r.listPermissions="listPermissions",r.viewPermission="viewPermission",r.createPermission="createPermission",r.updatePermission="updatePermission",r.deletePermission="deletePermission",r.restorePermission="restorePermission",r.forceDeletePermission="forceDeletePermission",r.listTrashedPermission="listTrashedPermission",r.viewTrashedPermission="viewTrashedPermission",r.deprecatePermission="deprecatePermission",r.initializePermissions="initializePermissions",r))(Le||{});var ge=(o=>(o.tokens="tokens",o.topics="topics",o))(ge||{}),Ue=(I=>(I.allUsers="allUsers",I.allAdmins="allAdmins",I.allEmployers="allEmployers",I.allMerchants="allMerchants",I.allStudentBodies="allStudentBodies",I.allStandardUsers="allStandardUsers",I.allSuperUsers="allSuperUsers",I.webAppUsers="webAppUsers",I.androidAppUsers="androidAppUsers",I.iosAppUsers="iosAppUsers",I))(Ue||{}),ye=(o=>(o.specificUsers="specificUsers",o.fcmTopics="fcmTopics",o))(ye||{});var S={testArea:{max:1e4},remarks:{max:500}};var L={GOOGLE_MAPS_API_KEY:"{{googleMapsApiKey}}"},Ye={NOT_AVAILABLE:"-",DEFAULT_OFFSET:0,DEFAULT_LIMIT:10,DEFAULT_PERKS_CATEGORY:"perks"},Ke={DEFAULT_ZOOM:12,OFFICE_COORDINATES:{LAT:51.931934000000005,LNG:-8.123001}},T={PHONE_ATTEMPTS_LIMIT:3,SMS_CODE_EXPIRY_SECONDS:600,PHONE_ATTEMPTS_TIME_LIMIT_IN_MINUTES:60,CODE_RETRIES_LIMIT:5},He={DEFAULT:"DD-MMM-YYYY"},u={SIZE_LIMIT_MB:4,ALLOWED_IMAGE_TYPES:"image/png, image/jpeg, image/gif"},qe=[{value:"bar",label:"Bar"},{value:"line",label:"Line"},{value:"doughnut",label:"Doughnut"},{value:"pie",label:"Pie"},{value:"polar",label:"Polar"}],$e={MAINTAIN_ASPECT_RATIO:false,SCALES:{y:{beginAtZero:true,precision:0}},PLUGINS:{LEGEND:{DISPLAY:true,LABELS:{BOX_WIDTH:0,FONT:{SIZE:18}}}}},We={BACKGROUND_COLOR:["rgba(255, 99, 132, 0.2)","rgba(54, 162, 235, 0.2)","rgba(255, 206, 86, 0.2)","rgba(75, 192, 192, 0.2)","rgba(153, 102, 255, 0.2)","rgba(255, 159, 64, 0.2)"],BORDER_COLOR:["rgba(255, 99, 132, 1)","rgba(54, 162, 235, 1)","rgba(255, 206, 86, 1)","rgba(75, 192, 192, 1)","rgba(153, 102, 255, 1)","rgba(255, 159, 64, 1)"],BORDER_WIDTH:1,BAR_THICKNESS:30},Xe="https://accounts.google.com/o/oauth2/auth/oauthchooseaccount?access_type=online&response_type=token&scope=email%20profile&flowName=GeneralOAuthFlow",Qe="https://www.linkedin.com/oauth/v2/authorization?response_type=code&scope=r_liteprofile%20r_emailaddress",ze={GOOGLE_AUTH_SIGNIN_CALLBACK:"/social-auth/googlesignin/callback",GOOGLE_AUTH_SIGNUP_CALLBACK:"/social-auth/googlesignup/callback",FACEBOOK_AUTH_SIGNUP_CALLBACK:"/social-auth/facebooksignup/callback",FACEBOOK_AUTH_SIGNIN_CALLBACK:"/social-auth/facebooksignin/callback",LINKEDIN_AUTH_CALLBACK:"/social-auth/linkedin/callback",LINKEDIN_AUTH_SIGNUP_CALLBACK:"/social-auth/linkedinsignup/callback",LINKEDIN_AUTH_SIGNIN_CALLBACK:"/social-auth/linkedinsignin/callback",GOOGLE_AUTH_CALLBACK:"/social-auth/google/callback",FACEBOOK_AUTH_CALLBACK:"/social-auth/facebook/callback",AUTH_REDIRECT_HANDLER:"/auth-redirect-handler",MS_AUTH_REDIRECT:"/ms-auth",MicrosoftTeamsConfigTab:"/microsoft-teams/channel-app/config"},je="https://www.facebook.com/v12.0/dialog/oauth?response_type=token&scope=email",Ze=10,Je=30,et="pf_r32_4ui3_234",tt="pf_r32_nhg_5t",ot="vcx_sdf_Ge_rhb",st="we_lk_gpf_rre_23",rt="re_2we_lk_gpf_r3",at="wer_Vssdf_vf_r3",nt="ds09sdf_vf_r3",it="dscr38g4-234-r23-4_Vd2",Et="cus_5rge_svsb_5pf_3r",lt="o5r_5pf_3r4ui3_90",dt="r4uo5r_5pf_3i3_90",ct="r_5vnopf_3i3_90",It="pf_3i3_9das42_30",pt="rb_5pf_3_3i3_90",Rt={SLACK_OAUTH_URL:(e,s,o)=>`https://slack.com/oauth/v2/authorize?client_id=${s}&scope=chat:write,chat:write.public,channels:read&redirect_uri=${o}&state=${e}`,SLACK_AUTH_REDIRECT_URL:"/slack-bot/auth-redirect"},_t="com.perkforce.app",At={CLOSED_BY_USER:"auth/popup-closed-by-user"},Tt={STRING:"string",OBJECT:"object",ARRAY:"array",boolean:"boolean",NUMBER:"number",FUNCTION:"function"},ut=["perkforce.com","pfstag.com","pfdevqa.com","pfnew.com","pfuniverse.com"],St={MINUTES:"minutes"},Ot=2e3,mt={ANDROID:"https://play.google.com/store/apps/details?id=com.perkforce.app",IOS:"https://apps.apple.com/pk/app/perkforce/id1608229415"},Pt="WFE_vwevV_sf_F-ssdfdsf_",Dt={client:{perksDataChanged:"perksDataChanged__client"},server:{perksDataChanged:"perksDataChanged__server"}},Ct={blank:"_blank"},Nt=["click","hover","focus","contextMenu"],O={TENANT_TYPE:"common",RESPONSE_TYPE:"code",REQUESTED_SCOPES:"Channel.ReadBasic.All ChannelMessage.Send email offline_access openid profile Team.ReadBasic.All User.Read",GET_SERVER_AUTH_URL:(e,s,o)=>`https://login.microsoftonline.com/${O.TENANT_TYPE}/oauth2/v2.0/authorize?client_id=${s}&response_type=${O.RESPONSE_TYPE}&redirect_uri=${o}&response_mode=query&scope=${O.REQUESTED_SCOPES}&state=${e}`},ft=["click","hover"],Lt={supportEmail:"support@perkforce.com",webAppUrl:"https://app.perkforce.com",androidAppUrl:"https://play.google.com/store/apps/details?id=com.perkforce.app",iosAppUrl:"https://apps.apple.com/pk/app/perkforce/id1608229415"},gt={awsV3Upload:"/testing/aws-v3-upload",firebaseTestingPage:"/testing/firebase",zustandTestingPg1:"/testing/zustand-page-1",zustandTestingPg2:"/testing/zustand-page-2",googleMapTesting:"/testing/google-map-testing"},Ut="PERKFORCE_PUSH_NOTIFICATIONS",yt=["image/svg","image/svg+xml"];var ht={geoLocationApi:{url:`https://www.googleapis.com/geolocation/v1/geolocate?key=${L.GOOGLE_MAPS_API_KEY}`}};var Mt={START_DATE_REQUIRED:"Display From Date is required when perk is not always displayed.",END_DATE_GREATER:"Display Until Date should be greater than Display From Date.",USER_REQUIRED:"User is required.",INVALID_NAME:"'Perks' as a name is not allowed.",NOT_FOUND:"Page not found.",NOT_AVAILABLE:"Perk not available.",ACCEPT_TERMS:"Please accept the terms and conditions.",CREATED:"Perk created.",UPDATED:"Perk updated.",EDIT_UNPUB_IN_CAROUSEL:"Perk updated. Users will not be able to view this unpublished perk in the carousel.",STATUS_UPDATED:"Perk status updated.",DELETED:"Perk deleted.",PROVIDE_PRICE_FOR_PURCHASABLE:"Please provide a price to make this perk purchasable.",INVALID_PRICE:"Please provide valid price.",REMAINING_QUANTITY_REQUIRED:"Remaining quantity is required.",INVALID_REMAINING_QUANTITY:"Please provide valid remaining quantity.",INVALID_MAX_ALLOWED_PER_USER:"Please provide valid max allowed per user value.",INVALID_ALLOWED_PER_USER:"Please provide valid per user value.",INVALID_ALLOWED_EVERY_DAY:"Please provide valid every day(s) value.",START_DATE_SHOULD_LESS_THEN_END_DATE:"Perk display from date cannot be after the display until date.",START_DATE_OR_ALWAYS_AVAILABLE_REQUIRED:'Please provide display from date or check "Always Display" box.',REDEEM_LIMIT_EXCEEDED_PROVIDED_CODES:"Remaining quantity cannot be greater than provided redeem codes.",REDEEM_CODE_COPIED:"Code copied to clipboard.",REDEEM_CODE_DUPLICATE:"Redeem Code already available.",REDEEM_CODE_DUPLICATE_IN_ALL_PERKS:"Redeem Code already available in other perk.",REDEEM_CODE_SPACE:"Redeem Code cannot contain white spaces.",REDDEM_CODES_REQUIRED:"You need to add your redeem codes, or you can select to have us automatically create redeem codes for you.",MAX_USER_REDEEM_LIMIT_EXCEEDED:"Your allowance has been reached, try again later.",LIMITS_NOT_ALLOWED:'Limits/Constraints can\u2019t be implemented without "Use Redeem Codes".',DISCOUNT_CODE_NOT_ALLOWED:"Discount code is not allowed with these controls selection made (Purchasable, Use Redeem Codes, Total Quantity Available, Max Allowed Per User/Days).",DESCRIPTION_PERMISSION_ERROR_MESSAGE:"You do not have permission to add a description to this perk. Please contact your administrator for assistance.",IMAGE_PERMISSION_ERROR_MESSAGE:"You do not have permission to add an image to this perk. Please contact your administrator for assistance.",CATEGORY_PERMISSION_ERROR_MESSAGE:"You do not have permission to assign a category to this perk. Please contact your administrator for assistance.",LOGO_PERMISSION_ERROR_MESSAGE:"You do not have permission to add a logo image to this perk. Please contact your administrator for assistance.",GROUP_PERMISSION_ERROR_MESSAGE:"You do not have permission to modify the user selector for this perk. Please contact your administrator for assistance.",CONTACT_PERMISSION_ERROR_MESSAGE:"You do not have permission to add contact information (name, website, phone number) to this perk. Please contact your administrator for assistance.",DISPLAY_SCHEDULE_PERMISSION_ERROR_MESSAGE:"You do not have permission to modify the display schedule settings. Please contact your administrator for assistance.",DISCOUNT_PERMISSION_ERROR_MESSAGE:"You are not authorized to set discounts. Please contact your administrator if you need this permission.",PURCHASABLE_PERMISSION_ERROR_MESSAGE:"You do not have the required permissions to modify the purchasable options or set a price. Contact your administrator for help.",LIMITS_CONSTRAINTS_PERMISSION_ERROR_MESSAGE:"You are not permitted to modify limits or constraints for this perk. Please reach out to your administrator for further assistance.",CODES_PERMISSION_ERROR_MESSAGE:"You do not have permission to manage redeem codes for this perk. Contact your administrator for permission.",REGISTER_INTEREST_PERMISSION_ERROR_MESSAGE:"You are not authorized to manage the 'Register Interest'. Please reach out to your administrator for assistance.",LOCATIONS_PERMISSION_ERROR_MESSAGE:"You do not have permission to add or modify locations. Contact your administrator for further help.",PERK_CREATE_LIMIT_REACHED:e=>`You are not allowed to create more than ${e} perk${e>1?"s":""} right now. Contact admin to increase your limit and try again later.`,VERIFY_PERK_REDEEM_ERROR:"Error occurred while verifying perk redeem.",INVALID_STATUS:"Cannot send a notification while the perk is in Draft mode. You'll need to Publish it first.",NOTIFICATION_ON_UNPUBLISH:"Cannot send a notification, while trying to unpublish a perk.",PERK_WEBSITE_OPEN_ERROR:"Error occurred while trying to open the perk website URL.",FOR_USERS:"Select the organisations that can avail of your perk.",FOR_USERS_PREVIEW:"Allow your perk to be previewed by Companies and Colleges, before connecting with them.",LEGEND_STUDENT_DESC:"The graduate cap represents a connected College, their <b>Students</b> will see your perk \u{1F469}\u{1F3FE}\u200D\u{1F393}\u{1F468}\u200D\u{1F393}"},kt={TRANSACTION_PROCESS:"Transaction is processing."},Gt={CAPTURED:"Perk Click captured."},vt={FOUND:"Perk redeem code found.",NOT_FOUND:"Perk redeem code not found.",CODE_CREATED:"Code created successfully.",UPDATED:"Perk redeem updated."},bt={ADDED:"Perk interest registered.",REMOVED:"Perk interest unregistered.",NOT_FOUND:"Interest not registered for this perk.",DUPLICATE:"Perk interest already registered."};var m={standardUsers:{pluralCapitalized:"Standard users",pluralPascalCase:"Standard Users",pluralLowerCase:"standard users",pluralUpperCase:"STANDARD USERS",singularCapitalized:"Standard user",singularPascalCase:"Standard User",singularLowerCase:"standard user",singularUpperCase:"STANDARD USER"},approve:{pluralCapitalized:"Approve",pluralLowerCase:"approve",pluralUpperCase:"APPROVE",singularCapitalized:"Approve",singularLowerCase:"approve",singularUpperCase:"APPROVE"},disapprove:{pluralCapitalized:"Disapprove",pluralLowerCase:"disapprove",pluralUpperCase:"DISAPPROVE",singularCapitalized:"Disapprove",singularLowerCase:"disapprove",singularUpperCase:"DISAPPROVE"}};var rs={NO_DISAPPROVE_PERMISSION:`You do not have permission to ${m.disapprove.singularLowerCase} this request.`,REQUEST_ALREADY_PROCESSED:"This request has already been processed.",NO_APPROVE_PERMISSION:`You do not have permission to ${m.approve.singularLowerCase} this request.`,NO_VIEW_PERMISSION:"You do not have permission to view the details of this request.",NOT_FOUND:"Perk approval request not found.",UPDATED:"Perk approval request updated successfully.",ALREADY_PROCESSED:"Perk approval request already processed.",NO_APPROVAL_HISTORY:"No approval history exists for this perk"},xt=rs;var as={AT_LAST_1_MEMBER:"Please select at least 1 group member.",CREATED:"Group created.",NOT_FOUND:"Group not found.",DELETED:"Group deleted.",UPDATED:"Group updated.",MEMBER_CREATED:"Group member added.",MEMBER_DELETED:"Group member deleted.",MEMBER_EXISTS:"Group member already added.",MEMBER_NOT_FOUND:"Group member not found",MEMBERS_ADDED_TO_GROUPS:"Groups updated.",DUPLICATE:"Group name already exists."},Ft=as;var ns={INVALID:"Please enter valid domain name",EMPTY_REQUEST:"Please enter request",EMPTY_EXPRESSION:"Please enter expression",CREATED:"Email domain created. Pending for approval.",UPDATED:"Email domain updated.",NOT_FOUND:"Email domain not found.",DELETED:"Email domain deleted.",EXPRESSION_ADDED:"Regular Expression created."},Bt=ns;var is={EMPTY_EXPRESSION:"Please enter valid regular expression to block emails",INVALID_EXPRESSION:"Please enter a valid regular expression.",CREATED:`A new regular expression added to
block Emails.`,NOT_FOUND:"Block Email expression not found.",DELETED:"Block Email expression deleted.",EXPRESSION_ALREADY_EXISTS:"This regular expression already exists.",REQUEST_BLOCKED:`Sorry, this request is not permitted.
For further information contact us using the Give Feedback button <svg style="position:relative;top:3px;" viewBox="64 64 896 896" focusable="false" data-icon="notification" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M880 112c-3.8 0-7.7.7-11.6 2.3L292 345.9H128c-8.8 0-16 7.4-16 16.6v299c0 9.2 7.2 16.6 16 16.6h101.7c-3.7 11.6-5.7 23.9-5.7 36.4 0 65.9 53.8 119.5 120 119.5 55.4 0 102.1-37.6 115.9-88.4l408.6 164.2c3.9 1.5 7.8 2.3 11.6 2.3 16.9 0 32-14.2 32-33.2V145.2C912 126.2 897 112 880 112zM344 762.3c-26.5 0-48-21.4-48-47.8 0-11.2 3.9-21.9 11-30.4l84.9 34.1c-2 24.6-22.7 44.1-47.9 44.1zm496 58.4L318.8 611.3l-12.9-5.2H184V417.9h121.9l12.9-5.2L840 203.3v617.4z"></path></svg> or email <a href="mailto:support@perkforce.com">support@perkforce.com</a>`},wt=is;var ls={RELOAD_DATA:"Reload Data",FILE_SIZE_LIMIT:`File size has exceeded it's max limit of ${u.SIZE_LIMIT_MB}MB`,INVALID_FILE_TYPE:`Invalid file type selected. Allowed file types are ${u.ALLOWED_IMAGE_TYPES}.`,INVALID_FILE:"Invalid file selected. Please try again.",INVALID_PHONE:"Please enter valid Phone No.",THANKS_FOR_FEEDBACK:"Thank you for the feedback.",CHAR_LIMIT_EXCEEDED:e=>`${e} limit exceeded ${S.testArea.max.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")} characters`,SPECIAL_CHARS_NOT_ALLOWED:"Special characters are not allowed.",SPECIAL_CHARS_AND_SPACES_NOT_ALLOWED:"Special characters and spaces are not allowed.",IMAGE_REQUIRED:"Image is required.",INVALID_URL:"Please enter a valid URL",AFFILIATE_LINK_WARNING:"Please ensure this is not an affiliate link. See Perkforce Terms & Conditions for more details",INVALID_REQUEST:"Invalid request.",ERROR_OCCURRED:"Error occurred, try again later",CANCELLED_BY_USER:"Request cancelled by user.",ACCEPT_CONDITION:"Please accept the condition.",REQUEST_EXPIRED:"Requested token expired, try again later.",INVALID_EMPLOYEE_PERMISSIONS:"Invalid request. Your permissions are changed. Please refresh your page.",INVALID_ICON_TYPE:(e="svg")=>`Invalid file type selected. Allowed file types are ${e==="svg"?zaionsToolKit.svgIconTypes.join(", "):u.ALLOWED_IMAGE_TYPES}.`,GIVE_FEEDBACK:"Give Feedback",COLLEGE:"College",BUSINESS:"Business",COMPANY:"Company",COMPANY_OR_COLLEGE:"Company or College",SUCCESS:"Request completed successfully.",NAME_REQUIRED:"Name is required.",ID_REQUIRED:"Id is required, can't proceed without id.",REMARKS_MAX_ERROR:`Remarks must contain at most ${S.remarks.max} character(s)`,REMARKS_REQUIRED:"Remarks is required.",INVALID:"Invalid request.",EMAIL_EXISTS:"Email address already occupied.",CARD_BANNER_NOT_FOUND:"Card or Banner not found.",PERKS_SENT:"Perks Sent.",DB_CONNECTED:"Database Connected Successfully.",UNAUTHENTICATED:"please authenticate",SPECIAL_CHARACTERS_NOT_ALLOWED:"Please provide a valid value, Special characters are not allowed.",CHARATCER_LIMIT_EXCEEDED:"Characters Limit Exceeded.",FILE_UPLOAD_SUCCESS:"File upload completed successfully.",FILE_UPLOAD_FAILED:"File upload failed.",NOT_FOUND:"Item not found.",INVALID_SLUG:"Invalid category name, name should contain at least one alphabet and should be unique.",INVALID_EMAIL:"Please provide a valid email address.",UNAUTHORIZED:"Unauthorized access. You do not have permission to perform this action. Please check your credentials or contact support if you believe this is a mistake.",UNEXPECTED_ERROR_MESSAGE:"An unexpected error occurred. Please try again.",DEPRECATION_REASON_REQUIRED:"Deprecated reason is required."},Vt=ls;var Yt={PERKFORCE_DOMAIN_UPDATE_INFO:"Perkforce domain change will take effect in next sign in.",DESCRIPTON_REQUIRED:"Description is required.",CREATED:"User Created.",NOT_FOUND:"User not found.",VANITY_URL_EXISTS:"Vanity url already occupied.",COMPANY_NAME_EXISTS:e=>`${e||"Company"} name already occupied.`,INVALID_TOKEN:"Invalid token.",CODE_EXPIRED:"Code is expired.",CODE_INVALID:"Code is invalid.",LOGGED_OUT:"User logged out.",UPDATED:"User updated.",ORDER_EMAIL_RECIPIENTS_UPDATED:"Order email recipients updated.",NOT_ONBOARDED:"User not onboarded.",PHONE_CODE:(e,s)=>`Please use this code ${e} to verify your phone number ${s}.`,INVALID_PHONE_ATTEMPT:e=>`Sorry, you can\u2019t sign up right now. You can try again in ${e}.`,PRIVACY_POLICY_RESET:"Terms, conditions and privacy policy reset done for all users.",ACTIVE_STATUS_UPDATED:"User Active Status Updated Successfully.",DELETED:"User Deleted Successfully.",CANNOT_DOWNGRADE_EMAIL_ORDER_RECIPIENT:"Can not remove superuser access, Please remove the user from order email recipient list first.",CANNOT_REMOE_LAST_EMAIL_ORDER_RECIPIENT:"Can not remove last order email recipient.",INVALID_EMPLOYER_ID:"Error Occurred, Invalid employer id, please try again later.",LOCATION_UPDATED:"Location Updated Successfully.",FAILED_TO_FETCH_PERMISSIONS:"Failed to fetch permissions, please try again.",NO_ROLE_ASSIGNED:"You currently don't have any roles assigned. Please contact the administrator for assistance."},Kt={CREATED:"User history created."},Ht={CREATED:"User created.",NOT_FOUND:"User not found.",DELETED:"User deleted.",UPDATED:"User updated.",NO_FILE_FOUND:"No file found to import users.",EMPLOYEES_IMPORT_SUCCESS:"Users imported successfully.",EMPLOYEES_IMPORT_FAILED:"Users import failed.",INVALID_FILE_TYPE:"Invalid file type, upload csv file.",MAXIMUM_IMPORT_LIMIT:e=>`Each import is restricted to a maximum of ${e} users.
Instead, separate your file into smaller files and import multiple times.`,EMPLOYEES_EMAIL_COLUMN_NOT_FOUND:"Users email column not found.",INVITE_SENT:"Invite sent."},qt={EMPLOYEES_LANDING_CAT_CHANGED:"Users landing category changed."},$t={FEEDBACK_SUCCESS:"Feedback submitted successfully.",FEEDBACK_FAILED:"Feedback submission failed."};var ds={INVALID_STRIPE_FEE:"Fee percentage cannot be less than 0 or greater than 100.",CANNOT_NEGATIVE:"Cannot be less than 1.",FEE_FOR_ORGANIZATION:e=>`Application Fee from ${e}.`,UPDATED:"Settings updated.",INVALID_PERKS_PER_PAGE:"Perks per page should not be less than 1.",INVALID_CONNECTIONS_UPTO:"Number of connections should not be less than 1.",NEW_SIGNUPS:{SUCCESS:"New signups settings updated successfully.",INVALID_EMAIL:"Invalid email, no emplopyer/merchant/student-body user found with this email."},MOBILE_APP_INFO:{SUCCESS:"Mobile app info updated successfully."}},Wt=ds;var cs={INVITE_SENT:"Connection invite sent.",CONNECTION_REQUEST_SENT:"Connection request sent.",REFER_A_BUSINESS:"Refer a Business",SENT:"Connection request sent.",NOT_FOUND:"Connection request not found",NOT_FOUND_OR_ACCEPTED:"Connection request not found or already accepted.",EXISTS:"Connection request already exists or invalid.",CONNECTION_EXISTS:"Users already connected.",DELETED:"Connection request deleted.",INVALID:"Invalid connection request.",ACCEPTED:"Connection request accepted.",CONNECTION_CREATED:"Connection created.",STATUS_CHANGED:"Status updated.",INVALID_USER:"Cannot send connection request to this user. Please reach out to Perkforce or send feedback for help.",REFERRAL_SENT:"Referral sent."},Xt=cs;var Qt={NO_ICON_PROVIDED:"No icon provided for category.",NO_ICONS_FOUND:"No Icons Found!",ICON_DIMENSION_LIMIT_EXCEED:"Image dimensions should be less than or equal to 256*256",CREATED:"Category created.",EXISTS:"Category with the same name already exists.",UPDATED:"Category updated.",DELETED:"Category deleted.",NOT_FOUND:"Category not found.",CONTAIN_SUB_CATEGORIES:"Cannot delete because there are sub categories in this category.",REORDER:"Categories reordered."},zt={CREATED:"Sub Category created.",EXISTS:"Sub Category with the same name already exists.",UPDATED:"Sub Category updated.",DELETED:"Sub Category deleted.",NOT_FOUND:"Sub Category not found.",DEFAULT:"Cannot update default Sub Category.",CONTAIN_PERKS:"Cannot delete because there are perks in this sub category.",REORDER:"Sub Categories reordered."},jt={DEFAULT:"Cannot update default Perk Category.",NOT_FOUND:"Default Perk Category not found.",CREATED:"Default Perk Category created.",DELETED:"Default Perk Category deleted",UPDATED:"Default Perk Category updated",EXISTS:"Default Perk Category with the same name already exists.",CONTAIN_PERKS:"Cannot delete because there are perks in this category.",REORDER:"Default Perk Categories reordered."};var Is={TEST_ERROR_REPORTING:"Testing frontend sentry error reporting."},Zt=Is;var ps={INVALID_REQUEST:"Cannot change, once a purchase has occured.",ADDED:"Perk Redeem Code added.",EDITED:"Perk Redeem Code edited.",DELETED:"Perk Redeem Code deleted.",PERK_ID_REQUIRED:"Perk id is required.",COMPLETED:"Redeem Codes added successfully.",FAILED:"Failed to add requested redeem Codes.",LIMIT_REACHED:e=>`Limit reached, can not add more than ${e} redeem codes at a time.`,NO_FILE_FOUND:"No file found to import data.",NO_REDEEM_CODE_AVAILABLE:"No Perk code available right now, try again later.",INVALID_REDEEM_CODE:"Invalid redeem code found, please try again later.",DUPLICATE_RECORDS_FOUND:(e,s)=>`${e} unique codes added.
Found ${s} duplicate codes, which were skiped.`,INVALID_RECORDS_FOUND:(e,s)=>`${e} unique codes added.
Found ${s} invalid codes, which were skiped.`,DUPLICATE_INVALID_RECORDS_FOUND:(e,s,o)=>`${e} unique codes added.
Found ${s} duplicate codes & ${o} invalid codes, which were skiped.`,REDEEM_CODE_DUPLICATE_IN_ALL_PERKS:"Redeem Code already available in other perk."},Jt=ps;var Rs={ALREADY_EXISTS:"Test account email already exists.",INVALID_ACTION:"Invalid test account form action passed, please try again.",ADDED:"Test account added successfully.",UPDATED:"Test account updated successfully.",DELETED:"Test account deleted successfully.",SETTING_UPDATED:"Test accounts setting updated successfully.",INVALID_EMAIL:"Please add a valid email to add new test account.",EXISTS:"Test account already exists, please try a different user.",NOT_FOUND:"Test account not found, please try again.",MUST_BE_MANAGER:"Internal tester should be a manager account."},eo=Rs;var _s={REDIRECT_FAILED:"Error occured while trying to redirect to Stripe to complete checkout request.",DISCONNECTED:`You're now disconnected from Stripe.
Reconnect anytime to access its amazing features again.`,ENABLED:`Stripe is enabled again!
All its amazing features are ready for you to enjoy.`,DISABLED:`Stripe is disabled.
You're still connected, so turning it back on is easy whenever you're ready!`},to=_s;var As={CODE_COPIED:"Code copied successfully.",AMOUNT_SELECTION:"Please select amount."},oo=As;var Ts={DUPLICATE_TITLE:"A role with the same title already exists.",CREATED:"Role created successfully.",UPDATED:"Role updated successfully.",DELETED:"Role deleted successfully.",MISSING_TITLE:"Role title is required.",NOT_FOUND:"Role not found.",ERROR_DEFAULT_ROLE_UNSET:e=>`Cannot unset the ${e} without setting another role as ${e} first`,ERROR_DEFAULT_ROLE_DELETE:e=>`Cannot delete the ${e} role without setting another role as ${e} first`,ERROR_ASSIGNED_ROLE_DELETE:"Cannot delete role because it is assigned to existing users",REPLACEMENT_ROLE_NOT_FOUND:"Replacement role not found",REPLACEMENT_ROLE_MUST_ACTIVE:"Replacement role must be active.",REPLACEMENT_INVALID_DEPRECATED_ROLE:"Invalid replacement role, provided replacement role is in deprecated state",INVALID_DEPRECATED_ROLE:"Invalid role, provided role is in deprecated state",ROLE_DELETE_REQUIRES_REPLACEMENT:"Cannot delete the role as it is assigned to users. Please provide a replacement role to proceed.",ROLE_ALREADY_ASSIGNED:"Role already assigned to user.",USER_ROLE_NOT_ASSIGNED:"Role is not assigned to the user.",USER_LAST_ROLE_REMOVAL:"You cannot remove the last role assigned to the user.",ASSIGNED:"Role successfully assigned to user.",REMOVED:"Role successfully removed from user.",ROLES_UPDATED:"Roles updated successfully",SOME_ROLES_UPDATED_FAILED:"Some roles failed to update",CANNOT_SET_DEPRECATED_AS_DEFAULT:"Cannot set a deprecated role as default for any user type",REPLACEMENT_ROLE_REQUIRED:"Replacement role id is required in case of deprecated state",PERMISSIONS_ASSIGNED:"Permissions assigned to role successfully.",PERMISSIONS_REMOVED:"Permissions removed from role successfully.",CANNOT_REMOVE_ALL_PERMISSIONS:"Cannot remove all permissions from role.",NO_NEW_PERMISSIONS:"The requested permissions are already assigned to this role"},so=Ts;var us={NOT_FOUND:"Permission not found.",CREATED:"Permission created successfully.",UPDATED:"Permission updated successfully.",UPDATED_PERMISSIONS:"Permissions updated successfully.",DELETED:"Permission deleted successfully.",REPLACEMENT_PERMISSION_NOT_FOUND:"Replacement permission not found.",REPLACEMENT_PERMISSION_ID_REQUIRED:"Replacement permission id is required.",CANNOT_DEPRECATE_PERMISSION_IN_USE:"Cannot deprecate permission that is in use without a replacement.",DEPRECATED_SUCCESSFULLY:"Permission deprecated successfully.",IN_USE:e=>`Permission is currently in use by ${e} role${e===1?"":"s"}. Please transfer to another permission by providing replacement permission id before deleting.`,TRANSFER_TARGET_NOT_FOUND:"The permission to transfer to does not exist.",TRANSFER_TARGET_INVALID:"The target permission for transfer must be active and not deprecated.",PERMISSION_ALREADY_EXISTS:"Permission with this identifier already exists.",DELETED_BY_ADMINISTRATOR:"Deleted by administrator.",INITIALIZED:"Permissions successfully initialized.",IDENTIFIER_REQUIRED:"Permission identifier is required.",ID_REQUIRED:"Permission id is required.",TITLE_REQUIRED:"Permission title is required.",TRANSFERRED_AND_DELETED:"Permission transferred and deleted successfully."},ro=us;var Ss={RESTRICT_ACCESS:"Unable to access for now. Please Try Later. Sorry for inconvenience.",CODE_RETRIES_LIMIT_REACHED:`${T.CODE_RETRIES_LIMIT} unsuccessful attempts were made to Sign-in to your account. Access to your account is restricted.`,CODE_RETRIES:e=>`Incorrect code. ${T.CODE_RETRIES_LIMIT-e} ${T.CODE_RETRIES_LIMIT-e===1?"try":"tries"} remaining.`,ACCOUNT_UNDER_REVIEW:"We are reviewing your account. We will get back to you soon.",NO_TERMS_CONDITION_STATUS:"Please accept the Terms of Service and Privacy Policy to continue."},ao=Ss;var Os={UPDATED:"Profile updated."},no=Os;var ms={NOT_FOUND:"Budget not found or you do not have access to this budget.",EXPIRED_OR_CLAIMED:"Budget expired or already claimed.",REFUND_REQUEST:"Refund Requested.",APPROVED:"Amount approved.",REJECTED:"Amount rejected.",REFUNDED:"Budget Refunded."},io=ms;var Ps={NOT_ENOUGH_BALANCE:"You dont have enough balance for this voucher."},Eo=Ps;var lo={ITEM_CREATED:"Carousel item created.",NOT_FOUND:"Carousel item not found.",ITEM_DELETED:"Carousel item deleted.",ITEM_UPDATED:"Carousel item updated.",REORDER:"Carousel items reordered."},co={ITEM_CREATED:"Carousel item created.",NOT_FOUND:"Carousel item not found.",ITEM_DELETED:"Carousel item deleted.",ITEM_UPDATED:"Carousel item updated.",LIMIT_REACHED:"Cannot create carousel item, limit reached. Please contact Perkforce for furthur information."},Io={UPDATED:"Carousel settings updated."},po={UPDATED:"Carousel settings updated."},Ro={ADDED:"Custom category icon added.",UPDATED:"Custom category icon updated.",DELETED:"Custom category icon deleted."};var _o={ITEM_CREATED:"Card item created.",NOT_FOUND:"Card item not found.",ITEM_DELETED:"Card item deleted.",ITEM_UPDATED:"Card item updated.",REORDER:"Card items reordered."},Ao={UPDATED:"Card settings updated."},To={ADDED:"Credit card added.",EXISTS:"Credit card already exists.",DELETED:"Credit card deleted."};var Ds={NOT_FOUND:"Order not found.",DELETED:"Order deleted."},uo=Ds;var So={ADDED:"Manager Email added successfully.",UPDATED:"Manager Email updated successfully.",DELETED:"Manager Email deleted successfully.",ITEM_EXISTS:"Manager Email already added in the list.",MANAGER_NOT_FOUND:"Manager not found, please make sure to enter a manager email."},Oo={INVALID_APP_OR_STATUS:"Invalid integration app or status, please try again."};var mo={ACCESS_DENIED:"Access Denied By User.",SEND_PERK_NOTIFICATION:"Click here to send a notification about this perk to your slack organisation.",NO_CHANNELS_FOUND:"No channels found, please create some public channels in your workspace or add perkforce slack app to some private channels to continue.",INVALID_CHANNEL:"Invalid channel, please try again.",INVALID_WORKSPACE_DATA:"Invalid workspace data, please try again.",SELECT_CHANNEL:"Please select channel to continue to send a notification to slack.",ERROR_OCCURRED:"Error ocurred while opening slack app to complete the integration process.",ENABLE_INTEGRATION:"Please enable slack integration to use this feature."},Po={NOTIFICATION_SENT:"Notification sent successfully.",CONNECTED:`Congrats! You're now connected to Slack.
Now each perk has a feature where you can notify your Slack channels about it. \u{1F680}`,DISCONNECTED:`You're now disconnected from Slack.
Reconnect anytime to access its amazing features again.`,ENABLED:`Slack is enabled again!
All its amazing features are ready for you to enjoy.`,DISABLED:`Slack is disabled.
You're still connected, so turning it back on is easy whenever you're ready!`};var Cs={SEND_PERK_NOTIFICATION:"Click here to send a notification about this perk to your Microsoft Teams.",NO_TEAMS_FOUND:"No teams found, please create some public teams with public channels in your Microsoft Teams account.",NO_CHANNELS_FOUND:"No public channels found in selected team, please selected another team or create some public channels and try again.",MS_CONNECTION_NOT_ALLOWED:"MS Connection is not allowed, please request admin and try again later.",ERROR_OCCURRED:"Error occurred while processing microsoft auth request.",SELECT_TEAM:"Please select team to continue to send a notification to microsoft teams.",SELECT_CHANNEL:"Please select channel to continue to send a notification to microsoft teams.",NOT_IN_MS_TEAMS:"Initialization Failed. No Parent window found.",ENABLE_INTEGRATION:"Please enable microsoft teams integration to use this feature.",ID_TOKEN_REQUIRED:"ID Token is required to complete the MS Teams SSO Auth Request.",ACCESS_TOKEN_EXPIRED:"Access Token Expired, please open perkforce app in ms teams again to refresh your access token.",TEAM_ID_IS_REQUIRED:"Team Id is required to fetch the channels for that team.",TEAM_CHANNEL_ID_IS_REQUIRED:"Team & Channel Id is required to send notification message to the channel.",MESSAGE_SENDING_FAILED:"Error occurred while sending the message to channel in MS Teams, please try again.",ADAPTIVE_CARD_FAILED:"Error Occurred while creating adaptive card to send message to MS Teams.",NOT_ALLOWED:"You are not allowed to use MS Teams feature.",INVALID_DATA:"No valid data found for requested MS Teams action, please try again.",ERROR_WHILE_SENDING_NOTIFICATION:"Error occurred while sending notification to MS Teams.",NOTIFICATION_SENT:"Notification sent successfully.",CONNECTED:`Congrats! You're now connected to Microsoft Teams.
Now each perk has a feature where you can notify your Microsoft Teams channels about it. \u{1F680}`,DISCONNECTED:`You're now disconnected from Microsoft Teams.
Reconnect anytime to access its amazing features again.`,ENABLED:`Microsoft Teams is enabled again!
All its amazing features are ready for you to enjoy.`,DISABLED:`Microsoft Teams is disabled.
You're still connected, so turning it back on is easy whenever you're ready!`},Do=Cs;var Co={SUCCESS:"Push notification sent successfully.",FAILED:"Error occurred while sending push notification to users."};var Ns={USER_TYPE_MISSING:"User type is missing",INVALID_USER_TYPE:"Invalid user type",NO_EMAIL:"No Email",ALREADY_IN_PROGRESS:"User role migration is already in progress. Please wait for the current migration to complete before initiating a new one."},No=Ns;var fs={CHECK_STATUS:"Initialization is in process for more detail run getMigrationStatus query to get the status of the migration"},fo=fs;var Lo={SETUP:fo,PERK:Mt,GIVE_PERKS:kt,GROUP:Ft,EMAIL_DOMAIN:Bt,DISCOUNT_CODE:oo,GENERAL:Vt,USER:Yt,USER_HISTORY:Kt,SETTINGS:Wt,INVITES:Xt,SLACK:Po,SLACK_BOT:mo,CATEGORY:Qt,SUB_CATEGORY:zt,SENTRY:Zt,PERK_REDEEM_CODES:Jt,TEST_ACCOUNTS:eo,STRIPE:to,BLOCK_EMAIL_EXPRESSION:wt,MS_TEAMS:Do,PERK_APPROVAL_REQUEST:xt,ROLE:so,PERMISSION:ro,AUTH:ao,PROFILE:no,BUDGET:io,EMPLOYEE:Ht,VOUCHER:Eo,CAROUSEL:lo,BRAND_CAROUSEL:co,CARD:_o,CAROUSEL_SETTINGS:Io,BRAND_CAROUSEL_SETTINGS:po,CARD_SETTINGS:Ao,PERK_CLICK:Gt,PERK_CATEGORY:jt,EMPLOYER:qt,USER_FEEDBACK:$t,VERIFY_PERK_REDEEM:vt,ORDER:uo,CREDIT_CARD:To,CUSTOM_CATEGORY_ICONS:Ro,PERK_INTEREST:bt,MOBILE_APP_FORCE_EXCLUDE:So,APPS_INTEGRATIONS:Oo,PUSH_NOTIFICATIONS:Co,MIGRATION:No};var go={PERKS_PER_PAGE:9},Uo={ROLES_PER_PAGE:9};var yo={pageStep:"p"},ho={profile:{details:"details",edit:"edit"}},d={perkEditId:":perkEditId",perkViewId:":perkViewId",perkIdIU:":perkIdIU",groupSlug:":groupSlug",brandVanityUrlOrId:":brandVanityUrlOrId",brandSubCat:":brandSubCat",brandPerkViewId:":brandPerkViewId",perkBenefitListCat:":perkBenefitListCat",perkBenefitListSubCat:":perkBenefitListSubCat"},g={APP_ROOT_URL:"/",SIGN_IN_ROUTE:"/sign-in",SIGN_UP_ROUTE:"/sign-up",ONBOARDING_ROUTE:"/onboarding",HOME:"/dashboard",PROFILE:"/profile",INVITATIONS:"/invitations",PERK_INSIGHTS:"/perk-insights",LOGOUT:"/logout",PERK_MANAGEMENT:"/perk",PERK_APPROVAL_REQUESTS:"/perk-approval-requests",SINGLE_PERK:`/perk/${d.perkViewId}`,PERK_INTERESTED_USERS:`/perk/${d.perkIdIU}/interested-users`,PERK_APPROVAL_REQUEST_HISTORY:`/perk/${d.perkIdIU}/approval-request-history`,SINGLE_GROUP:`/group/${d.groupSlug}`,EDIT_PERK:`/perk/edit/${d.perkEditId}`,CATEGORIES:"/categories",EMPLOYEES:"/employees",MERCHANTS:"/merchants",EDIT_EMPLOYEE_DASHBOARD:"/employee-dashboard",GROUPS:"/groups",IMPORT_EMPLOYEES:"/import-employees",VERIFIED_MEMBER:"/verified-member",INVALID_INVITE:"/invalid-invite",CHECKOUT_SUCCESS:"/checkout-success",CART:"/cart",PURCHASES:"/purchases",VERIFY_PERK_REDEEM:"/orders",PERKS:"/perks",EMPLOYERS:"/employers",USERS:"/users",MERCHANDIZE:`/organisation/${d.brandVanityUrlOrId}`,MERCHANDIZE_SUB:`/organisation/${d.brandVanityUrlOrId}/${d.brandSubCat}`,SINGLE_PERK_BRAND:`/organisation/${d.brandVanityUrlOrId}/perk/${d.brandPerkViewId}`,NEARBY_LOCATION:"/nearby-location",NEARBY_LOCATION_CAT:`/nearby-location/${d.perkBenefitListCat}`,NEARBY_LOCATION_SUB_CAT:`/nearby-location/${d.perkBenefitListCat}/${d.perkBenefitListSubCat}`,PERK_MANAGEMENT_CAT:`/${d.perkBenefitListCat}`,PERK_MANAGEMENT_SUBCAT:`/${d.perkBenefitListCat}/${d.perkBenefitListSubCat}`,REFERRALS:"/referrals",SETTINGS:"/settings",EMAIL_DOMAINS:"/email-domains",BLOCK_EMAIL_EXPRESSIONS:"/block-email-expressions",USER_HISTORY:"/user-history",PERK_CATEGORIES:"/perk-categories",BENEFIT_CATEGORIES:"/benefit-categories",LANDIND_PAGE:e=>{var s,o,t,i;return e!=null&&e.employerId&&(o=(s=e==null?undefined:e.employerId)==null?undefined:s.employeesLandingCategory)!=null&&o.categorySlug?`/${(i=(t=e==null?undefined:e.employerId)==null?undefined:t.employeesLandingCategory)==null?undefined:i.categorySlug}`:g.PERKS},EMAIL_SIGNIN_VERIFY:"/callback/verification",PAGE_NOT_FOUND:"/page-not-found",WILD_CARD:"*",APP_ROOT_SIGN_UP_MODAL:"/?type=signup",INTEGRATIONS_LIST_PAGE:"/integrations",PUSH_NOTIFICATIONS_PAGE:"/push-notifications",PUSH_NOTIFICATION_GROUPS:"/push-notification-groups",SINGLE_PUSH_NOTIFICATION_GROUP:"/push-notification-groups/:groupSlug"};var Mo=({permission:e,userPermissions:s})=>zaionsToolKit.hasPermission({permission:e,userPermissions:s}),ko=({userPermissions:e,requiredPermissions:s=[],checkModeForRequiredPermissions:o=zaionsToolKit.PermissionCheckModeEnum.every})=>zaionsToolKit.validateRequiredPermissions({userPermissions:e,checkModeForRequiredPermissions:o,requiredPermissions:s}),Go=({userPermissions:e,excludedPermissions:s=[],checkModeForExcludedPermissions:o=zaionsToolKit.PermissionCheckModeEnum.every})=>zaionsToolKit.validateExcludedPermissions({userPermissions:e,checkModeForExcludedPermissions:o,excludedPermissions:s}),vo=({userPermissions:e,requiredPermissions:s=[],excludedPermissions:o=[],checkModeForRequiredPermissions:t=zaionsToolKit.PermissionCheckModeEnum.every,checkModeForExcludedPermissions:i=zaionsToolKit.PermissionCheckModeEnum.every})=>zaionsToolKit.validateUserPermissions({userPermissions:e,checkModeForExcludedPermissions:i,checkModeForRequiredPermissions:t,excludedPermissions:o,requiredPermissions:s});var xo=e=>{var s,o,t;return zaionsToolKit.getObjectKey(e,"type","")==="MERCHANT"?"Business":zaionsToolKit.getObjectKey(e,"type","")==="STUDENT_BODY"?"College":zaionsToolKit.getObjectKey(e,"type","")==="EMPLOYER"?"Company":zaionsToolKit.getObjectKey(e,"type","")==="EMPLOYEE"&&zaionsToolKit.isObject(zaionsToolKit.getObjectKey(e,"employerId",false),true)?((s=e==null?undefined:e.employerId)==null?undefined:s.type)==="EMPLOYER"||((o=e==null?undefined:e.employerId)==null?undefined:o.type)==="MERCHANT"||((t=e==null?undefined:e.employerId)==null?undefined:t.type)==="STUDENT_BODY"&&(e!=null&&e.isSuperUser)?"Member of staff":"Student":"Company"},Me=(e,s)=>{let o=[];return zaionsToolKit.isArray(e)&&(e==null||e.forEach(t=>{var a,n;let i=zaionsToolKit.calcCrow((a=s==null?undefined:s.lat)!=null?a:0,(n=s==null?undefined:s.lng)!=null?n:0,t!=null&&t.lat?t==null?undefined:t.lat:0,t!=null&&t.lng?t==null?undefined:t.lng:0);o.push(i);})),o.sort((t,i)=>t-i),zaionsToolKit.isArray(o)&&o[0]},Fo=async({curr:e,locBusiness:s,nearby:o,region:t,sort:i})=>{var n,c;let a=[];if(s)for(let E of s)if(E.profile&&((c=(n=E==null?undefined:E.profile)==null?undefined:n.locations)==null?undefined:c.length)===0||!E.profile){let l=o&&i&&i.distance===-1?0:o?1e8:null;a.push(M(h({},E),{distance:Number(l),region:t}));}else {let l=Me(E.profile&&E.profile.locations,e),I=M(h({},E),{distance:l,region:t});a.push(I);}return (o||i&&i.distance===1)&&a.sort((E,l)=>Number(E==null?undefined:E.distance)-Number(l==null?undefined:l.distance)),o&&i&&i.distance===-1&&a.sort((E,l)=>Number(l==null?undefined:l.distance)-Number(E==null?undefined:E.distance)),a},ke=e=>{var s;return zaionsToolKit.isObject(e==null?undefined:e.employerId)&&((s=e==null?undefined:e.employerId)==null?undefined:s.type)==="MERCHANT"},Bo=(e,s)=>{let o=zaionsToolKit.getObjectKey(e,"email");return zaionsToolKit.isArray(s,true)&&o?s.includes(o):false},Ge=e=>{var o;return !(e!=null&&e.alwaysDisplay)&&___default.default((o=e==null?undefined:e.displayFromDate)==null?undefined:o.toString()).isAfter(___default.default())},wo=e=>{if(!e)return false;let s=___default.default().startOf("day"),o=e.displayFromDate?___default.default(e.displayFromDate.toString()):null;return !!(!e.alwaysDisplay&&o&&o.isAfter(s))},ve=e=>{var t;if(e!=null&&e.alwaysDisplay||!(e!=null&&e.displayUntilDate))return false;let s=___default.default(___default.default()).add(14,"days");return !(e!=null&&e.alwaysDisplay)&&___default.default((t=e==null?undefined:e.displayUntilDate)==null?undefined:t.toString()).isBefore(s)},be=e=>{var o;return e!=null&&e.alwaysDisplay||!(e!=null&&e.displayUntilDate)?false:!(e!=null&&e.alwaysDisplay)&&___default.default((o=e==null?undefined:e.displayUntilDate)==null?undefined:o.toString()).isBefore(___default.default())},Vo=e=>{let s="LIVE";return (e==null?undefined:e.status)==="DRAFT"?s="DRAFT":(e==null?undefined:e.status)==="PENDINGAPPROVAL"?s="PENDINGAPPROVAL":(e==null?undefined:e.status)==="DISAPPROVED"?s="DISAPPROVED":be(e)?s="ENDED":Ge(e)?s="SCHEDULED":ve(e)&&(s="ENDINGSOON"),s},Yo=e=>{var xe,Fe,Be;let o=zaionsToolKit.getObjectKey(e,"type")==="EMPLOYEE",t=o&&zaionsToolKit.getObjectKey(e,"isSuperUser"),i=o&&!t,a=(xe=e==null?undefined:e.allowMSTeamsConnection)!=null?xe:false,n=e==null?undefined:e.allowSlackConnection,c=e==null?undefined:e.allowStripeConnection;if(t||i){let A=e==null?undefined:e.employerId;a=A==null?undefined:A.allowMSTeamsConnection,n=A==null?undefined:A.allowSlackConnection,c=A==null?undefined:A.allowStripeConnection;}let E=(e==null?undefined:e.msTeamsConDetails)!=null,l=((Be=(Fe=e==null?undefined:e.slackConnectionDetails)==null?undefined:Fe.app_id)!=null?Be:null)!=null,I=(e==null?undefined:e.slackIntegrationState)&&(e==null?undefined:e.slackIntegrationState)