HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-172-31-4-197 6.8.0-1036-aws #38~22.04.1-Ubuntu SMP Fri Aug 22 15:44:33 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wordpress/wp-content/plugins/bit-integrations/assets/bi.451.455.js
var Yi=Object.defineProperty,Ji=Object.defineProperties;var Di=Object.getOwnPropertyDescriptors;var wt=Object.getOwnPropertySymbols;var pr=Object.prototype.hasOwnProperty,fr=Object.prototype.propertyIsEnumerable;var ur=(e,t,n)=>t in e?Yi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,O=(e,t)=>{for(var n in t||(t={}))pr.call(t,n)&&ur(e,n,t[n]);if(wt)for(var n of wt(t))fr.call(t,n)&&ur(e,n,t[n]);return e},xe=(e,t)=>Ji(e,Di(t));var hr=(e,t)=>{var n={};for(var r in e)pr.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&wt)for(var r of wt(e))t.indexOf(r)<0&&fr.call(e,r)&&(n[r]=e[r]);return n};import{_ as m,c as ge,V as me,$ as ue,f as Kr,C as Xi}from"./bi.878.0.js";import{r as D,c as $,j as o,e as pe,t as Zi,k as Yr,g as Fi}from"./main-685.js";import{C as Jr,a as wi,P as ye}from"./bi.327.9.js";const Dl=(e,t,n,r)=>{(t==null?void 0:t.triggered_entity)==="TutorLms"?ts(e,t,n,r):(t==null?void 0:t.triggered_entity)==="WC"?cs(e,t,n,r):(t==null?void 0:t.triggered_entity)==="LearnDash"?vs(e,t,n,r):(t==null?void 0:t.triggered_entity)==="GamiPress"?ys(e,t,n,r):(t==null?void 0:t.triggered_entity)==="WPCourseware"?Cs(e,t,n,r):(t==null?void 0:t.triggered_entity)==="FluentCrm"?es(e,t,n,r):(t==null?void 0:t.triggered_entity)==="Post"?xs(Number(e),t,n,r):(t==null?void 0:t.triggered_entity)==="JetEngine"?Ss(Number(e),t,n,r):(t==null?void 0:t.triggered_entity)==="Groundhogg"?ds(e,t,n,r):(t==null?void 0:t.triggered_entity)==="RestrictContent"?us(e,t,n,r):(t==null?void 0:t.triggered_entity)==="BuddyBoss"?ps(e,t,n,r):(t==null?void 0:t.triggered_entity)==="Affiliate"?js(e,t,n,r):(t==null?void 0:t.triggered_entity)==="Memberpress"?_s(e,t,n,r):(t==null?void 0:t.triggered_entity)==="PaidMembershipPro"?Is(e,t,n,r):(t==null?void 0:t.triggered_entity)==="SliceWp"?Es(e,t,n,r):(t==null?void 0:t.triggered_entity)==="SureCart"?Ts(e,t,n,r):(t==null?void 0:t.triggered_entity)==="GiveWp"?Os(e,t,n,r):(t==null?void 0:t.triggered_entity)==="LifterLms"?fs(e,t,n,r):(t==null?void 0:t.triggered_entity)==="MasterStudyLms"?hs(e,t,n,r):(t==null?void 0:t.triggered_entity)==="ThriveApprentice"?ms(e,t,n,r):(t==null?void 0:t.triggered_entity)==="EDD"?bs(e,t,n,r):(t==null?void 0:t.triggered_entity)==="UltimateMember"?gs(e,t,n,r):(t==null?void 0:t.triggered_entity)==="AcademyLms"?As(e,t,n,r):(t==null?void 0:t.triggered_entity)==="FluentBooking"?ns(e,t,n,r):(t==null?void 0:t.triggered_entity)==="SureMembers"?rs(e,t,n,r):(t==null?void 0:t.triggered_entity)==="WPForo"?is(e,t,n,r):(t==null?void 0:t.triggered_entity)==="WPJobManager"?ss(e,t,n,r):(t==null?void 0:t.triggered_entity)==="EventsCalendar"?as(e,t,n,r):(t==null?void 0:t.triggered_entity)==="Voxel"?os(e,t,n,r):(t==null?void 0:t.triggered_entity)==="WCSubscriptions"?ls(e,t,n,r):r(t)},es=(e,t,n,r)=>{e==="fluentcrm-1"||e==="fluentcrm-2"?t.triggerData=xe(O({},t.triggerData),{tags:n.data.tags,selectedTag:"any"}):e==="fluentcrm-3"||e==="fluentcrm-4"?t.triggerData=xe(O({},t.triggerData),{lists:n.data.lists,selectedList:"any"}):e==="fluentcrm-5"&&(t.triggerData=xe(O({},t.triggerData),{status:n.data.status,selectedStatus:"any"})),r(t)},ts=(e,t,n,r)=>{e==="2"?t.triggerData.quizzes=n.data.quizzes:e==="3"?t.triggerData.lessons=n.data.lessons:e==="4"||e==="1"?t.triggerData.courses=n.data.courses:e==="5"&&(t.triggerData.quizzes=n.data.quizzes,t.triggerData.percentageCondition=n.data.percentageCondition),r(t)},ns=(e,t,n,r)=>{e&&(t.triggerData.events=n.data.events),r(t)},rs=(e,t,n,r)=>{e&&(t.triggerData.groups=n.data.groups),r(t)},is=(e,t,n,r)=>{e==="wpforo-1"&&(t.triggerData=xe(O({},t.triggerData),{forums:n.data.forums,selectedForum:"any"})),(e==="wpforo-2"||e==="wpforo-3"||e==="wpforo-4"||e==="wpforo-5"||e==="wpforo-6"||e==="wpforo-11")&&(t.triggerData=xe(O({},t.triggerData),{topics:n.data.topics,selectedTopic:"any"})),(e==="wpforo-7"||e==="wpforo-8"||e==="wpforo-9"||e==="wpforo-10"||e==="wpforo-12")&&(t.triggerData=xe(O({},t.triggerData),{users:n.data.users,selectedUser:"any"})),r(t)},ss=(e,t,n,r)=>{(e==="wp_job_manager-1"||e==="wp_job_manager-4"||e==="wp_job_manager-5"||e==="wp_job_manager-8")&&(t.triggerData=xe(O({},t.triggerData),{jobTypes:n.data.jobTypes,selectedJobType:"any"})),(e==="wp_job_manager-2"||e==="wp_job_manager-3"||e==="wp_job_manager-6"||e==="wp_job_manager-7"||e==="wp_job_manager-11")&&(t.triggerData=xe(O({},t.triggerData),{jobList:n.data.jobList,selectedJob:"any"})),e==="wp_job_manager-9"&&(t.triggerData=xe(O({},t.triggerData),{statusList:n.data.statusList,selectedStatus:"any"})),e==="wp_job_manager-10"&&(t.triggerData=xe(O({},t.triggerData),{jobTypes:n.data.jobTypes,selectedJobType:"any",statusList:n.data.statusList,selectedStatus:"any"})),r(t)},as=(e,t,n,r)=>{(e==="events_calendar-1"||e==="events_calendar-2"||e==="events_calendar-3"||e==="events_calendar-4")&&(t.triggerData=xe(O({},t.triggerData),{events:n.data.events,selectedEvent:"any"})),r(t)},os=(e,t,n,r)=>{(e==="voxel-7"||e==="voxel-8"||e==="voxel-9"||e==="voxel-10"||e==="voxel-11"||e==="voxel-20")&&(t.triggerData=xe(O({},t.triggerData),{postTypes:n.data.postTypes,selectedPostType:""})),r(t)},ls=(e,t,n,r)=>{["user_subscribes_to_product","user_purchases_variable_subscription"].includes(e)?t.triggerData=xe(O({},t.triggerData),{allSubscriptionProducts:n.data.allSubscriptionProducts,selectedProduct:"any"}):e==="user_subscription_status_updated"?t.triggerData=xe(O({},t.triggerData),{allSubscriptions:n.data.allSubscriptions,allSubscriptionProducts:n.data.allSubscriptionProducts,selectedSubscription:"any",selectedProduct:"any",selectedStatus:"any"}):t.triggerData=xe(O({},t.triggerData),{allSubscriptions:n.data.allSubscriptions,allSubscriptionProducts:n.data.allSubscriptionProducts,selectedSubscription:"any",selectedProduct:"any"}),r(t)},cs=(e,t,n,r)=>{(e==="10"||e==="19")&&(t.triggerData.products=n.data.products),e==="11"&&(t.triggerData.orderStatus=n.data.orderStatus),e==="17"&&(t.triggerData.allProductCategories=n.data.allProductCategories),e==="20"&&(t.triggerData.allVariableProduct=n.data.allVariableProduct,t.triggerData.allVariation=n.data.allVariation),r(t)},ds=(e,t,n,r)=>{(e==="2"||e==="3")&&(t.triggerData.allTag=n.data.allTag),r(t)},us=(e,t,n,r)=>{t.triggerData.allMembership=n.data.allMembership,r(t)},ps=(e,t,n,r)=>{e.toString()==="3"?t.triggerData.forums=n.data.forums:e.toString()==="9"||e.toString()==="10"||e.toString()==="11"||e.toString()==="12"||e.toString()==="13"?t.triggerData.groups=n.data.groups:e.toString()==="4"&&(t.triggerData.forums=n.data.forums,t.triggerData.topics=n.data.topics),r(t)},fs=(e,t,n,r)=>{e.toString()==="1"||e.toString()==="2"||e.toString()==="3"?t.triggerData.allQuiz=n.data.allQuiz:e.toString()==="4"?t.triggerData.allLesson=n.data.allLesson:e.toString()==="5"||e.toString()==="6"||e.toString()==="7"?t.triggerData.allCourse=n.data.allCourse:e.toString()==="8"&&(t.triggerData.allMembership=n.data.allMembership),r(t)},hs=(e,t,n,r)=>{e.toString()==="2"&&(t.triggerData.allLesson=n.data.allLesson),["1","3","4","5"].includes(e.toString())&&(t.triggerData.allCourse=n.data.allCourse),e.toString()==="6"&&(t.triggerData.allDistribution=n.data.allDistribution),(e.toString()==="4"||e.toString()==="5")&&(t.triggerData.allQuiz=n.data.allQuiz),r(t)},ms=(e,t,n,r)=>{["1"].includes(e.toString())?t.triggerData.allCourse=n.data.allCourse:e.toString()==="2"?t.triggerData.allLesson=n.data.allLesson:e.toString()==="3"&&(t.triggerData.allModule=n.data.allModule),r(t)},bs=(e,t,n,r)=>{e.toString()==="1"?t.triggerData.allProduct=n.data.allProduct:e.toString()==="2"&&(t.triggerData.allDiscountCode=n.data.allDiscountCode),r(t)},gs=(e,t,n,r)=>{e.toString()==="roleSpecificChange"&&(t.triggerData.allRole=n.data.allRole),r(t)},vs=(e,t,n,r)=>{e==="1"||e==="2"||e==="3"?t.triggerData.courses=n.data.courses:e==="4"||e==="11"?(t.triggerData.courses=n.data.courses,t.triggerData.lessons=n.data.lessons):e==="5"?(t.triggerData.courses=n.data.courses,t.triggerData.lessons=n.data.lessons,t.triggerData.topics=n.data.topics):e==="6"||e==="7"||e==="8"?t.triggerData.quizes=n.data.quizes:(e==="9"||e==="10")&&(t.triggerData.groups=n.data.groups),r(t)},ys=(e,t,n,r)=>{e==="1"&&(t.triggerData.rankTypes=n.data.rankTypes),(e==="2"||e==="3"||e==="5")&&(t.triggerData.achievementTypes=n.data.achievementTypes),r(t)},xs=(e,t,n,r)=>{[1,2,3,6].includes(e)?t.triggerData=xe(O({},t.triggerData),{types:n.data.types,selectedPostType:"any"}):[4,5,7,8,9].includes(e)&&(t.triggerData=xe(O({},t.triggerData),{posts:n.data.posts,selectedPostId:"any-post"})),r(t)},Ss=(e,t,n,r)=>{[1,2].includes(e)&&(t.triggerData=xe(O({},t.triggerData),{types:n.data.types,selectedPostType:"any-post-type"})),r(t)},js=(e,t,n,r)=>{(e==="4"||e==="5"||e==="3")&&(t.triggerData.allType=n.data.allType),r(t)},_s=(e,t,n,r)=>{e==="1"?t.triggerData.oneTimeMembership=n.data.oneTimeMembership:e==="2"||e==="5"?t.triggerData.recurringMembership=n.data.recurringMembership:(e==="3"||e==="4")&&(t.triggerData.allMemberships=n.data.allMemberships),r(t)},Is=(e,t,n,r)=>{t.triggerData.AllMembershipLevels=n.data.AllMembershipLevels,r(t)},Es=(e,t,n,r)=>{e==="2"&&(t.triggerData.AllCommissionType=n.data.AllCommissionType),r(t)},Ts=(e,t,n,r)=>{(e==="1"||e==="2"||e==="3")&&(t.triggerData.allProduct=n.data.allProduct),r(t)},Os=(e,t,n,r)=>{e==="1"&&(t.triggerData.allDonationForms=n.data.allDonationForms),e==="2"&&(t.triggerData.allRecurringForms=n.data.allRecurringForms),r(t)},Cs=(e,t,n,r)=>{e==="userEnrolledCourse"||e==="courseCompleted"?t.triggerData=xe(O({},t.triggerData),{courses:n.data.courses,selectedCourse:"any"}):e==="moduleCompleted"?t.triggerData=xe(O({},t.triggerData),{modules:n.data.modules,selectedModule:"any"}):e==="unitCompleted"&&(t.triggerData=xe(O({},t.triggerData),{units:n.data.units,selectedUnit:"any"})),r(t)},Xl=(e,t,n)=>{const r=t.formID?t.formID:n;return r==="fluentcrm-1"||r==="fluentcrm-2"?(e.selectedTag=t==null?void 0:t.selectedTag,e.tags=t.tags):r==="fluentcrm-3"||r==="fluentcrm-4"?(e.selectedList=t==null?void 0:t.selectedList,e.lists=t.lists):r==="fluentcrm-5"&&(e.selectedStatus=t==null?void 0:t.selectedStatus,e.status=t.status),e},Zl=(e,t,n)=>((t.formID?t.formID:n)&&(e.selectedEvent=t.selectedEvent,e.events=t.events),e),Fl=(e,t,n)=>((t.formID?t.formID:n)&&(e.selectedGroup=t.selectedGroup,e.groups=t.groups),e),wl=(e,t,n)=>{const r=t.formID?t.formID:n;return r==="wpforo-1"&&(e.selectedForum=t.selectedForum,e.forums=t.forums),(r==="wpforo-2"||r==="wpforo-3"||r==="wpforo-4"||r==="wpforo-5"||r==="wpforo-6"||r==="wpforo-11")&&(e.selectedTopic=t.selectedTopic,e.topics=t.topics),(r==="wpforo-7"||r==="wpforo-8"||r==="wpforo-9"||r==="wpforo-10"||r==="wpforo-12")&&(e.selectedUser=t.selectedUser,e.users=t.users),e},ec=(e,t,n)=>{const r=t.formID?t.formID:n;return(r==="wp_job_manager-1"||r==="wp_job_manager-4"||r==="wp_job_manager-5"||r==="wp_job_manager-10")&&(e.selectedJobType=t.selectedJobType,e.jobTypes=t.jobTypes),(r==="wp_job_manager-2"||r==="wp_job_manager-3"||r==="wp_job_manager-6"||r==="wp_job_manager-7"||r==="wp_job_manager-11")&&(e.selectedJob=t.selectedJob,e.jobList=t.jobList),(r==="wp_job_manager-9"||r==="wp_job_manager-10")&&(e.selectedStatus=t.selectedStatus,e.statusList=t.statusList),e},tc=(e,t,n)=>{const r=t.formID?t.formID:n;return(r==="events_calendar-1"||r==="events_calendar-2"||r==="events_calendar-3"||r==="events_calendar-4")&&(e.selectedEvent=t.selectedEvent,e.events=t.events),e},nc=(e,t,n)=>{const r=t.formID?t.formID:n;return(r==="voxel-7"||r==="voxel-8"||r==="voxel-9"||r==="voxel-10"||r==="voxel-11"||r==="voxel-20")&&(e.selectedPostType=t.selectedPostType,e.postTypes=t.postTypes),e},rc=(e,t,n)=>{const r=t.formID?t.formID:n;return e.selectedProduct=t.selectedProduct,e.allSubscriptionProducts=t.allSubscriptionProducts,e.fields=t==null?void 0:t.fields,["user_subscribes_to_product","user_purchases_variable_subscription"].includes(r)||(e.selectedSubscription=t.selectedSubscription,e.allSubscriptions=t.allSubscriptions),r==="user_subscription_status_updated"&&(e.selectedStatus=t.selectedStatus,e.allStatus=[{label:"Any Status",value:"any"},{label:"Active",value:"active"},{label:"On Hold",value:"on-hold"},{label:"Pending",value:"pending"},{label:"Cancelled",value:"cancelled"},{label:"Pending Cancel",value:"pending-cancel"}]),e},ic=(e,t,n)=>{const r=t.formID?t.formID:n;return e.fields=t==null?void 0:t.fields,r==="booking_status_changed"&&(e.selectedStatus=t.selectedStatus,e.allStatus=[{label:"Any Status",value:"any"},{label:"Unpaid",value:"unpaid"},{label:"Pending Confirmation",value:"pending-confirmation"},{label:"Confirmed",value:"confirmed"},{label:"Paid",value:"paid"},{label:"Complete",value:"complete"},{label:"In Cart",value:"in-cart"},{label:"Cancelled",value:"cancelled"}]),e},sc=(e,t)=>(t.formID==="2"?e.selectedQuiz=t.selectedQuiz:t.formID==="3"?e.selectedLesson=t.selectedLesson:t.formID==="1"||t.formID==="4"?e.selectedCourse=t.selectedCourse:t.formID==="5"&&(e.selectedQuiz=t.selectedQuiz,e.requiredPercent=t.requiredPercent,e.selectedCondition=t.selectedCondition),e),ac=(e,t,n)=>{const r=t.formID?t.formID:n;return(r==="10"||r==="19")&&(e.selectedProduct=t.selectedProduct,e.products=t.products),r==="11"&&(e.selectedOrderStatus=t.selectedOrderStatus,e.orderStatus=t.orderStatus),(r==="12"||r==="13"||r==="14"||r==="15"||r==="16")&&(e.selectedSubscription=t.selectedSubscription,e.subscriptions=t.subscriptions),r==="15"&&(e.selectedSubscriptionStatus=t.selectedSubscriptionStatus,e.subscriptionStatus=t.subscriptionStatus),r==="17"&&(e.selectedProductCategory=t.selectedProductCategory,e.allProductCategories=t.allProductCategories),r==="20"&&(e.selectedVariableProduct=t.selectedVariableProduct,e.allVariableProduct=t.allVariableProduct,e.selectedVariation=t.selectedVariation,e.allVariation=t.allVariation),e},oc=(e,t,n)=>((n==="2"||n==="3")&&(e.selectedTag=t.selectedTag),e),lc=(e,t)=>(e.selectedMembership=t.selectedMembership,e.allMembership=t.allMembership,e),cc=(e,t)=>(t.formID==="3"?(e.selectedForum=t.selectedForum,e.forums=t.forums):t.formID==="9"||t.formID==="10"||t.formID==="11"||t.formID==="12"||t.formID==="13"?(e.selectedGroup=t.selectedGroup,e.groups=t.groups):t.formID==="4"&&(e.selectedForum=t.selectedForum,e.forums=t.forums,e.selectedTopic=t.selectedTopic,e.topics=t.topics),e),dc=(e,t,n)=>{const r=(t==null?void 0:t.formID)||n;return r==="1"?(e.selectedCourse=t.selectedCourse,e.courses=t.courses):r==="2"?(e.unenrollCourse=t.unenrollCourse,e.courses=t.courses):r==="3"?(e.completeCourse=t.completeCourse,e.courses=t.courses):r==="4"||r==="11"?(e.selectedLesson=t.selectedLesson,e.courses=t.courses,e.lessons=t.lessons):r==="5"?(e.selectedCourse=t.selectedCourse,e.selectedLesson=t.selectedLesson,e.selectedTopic=t.selectedTopic,e.courses=t.courses,e.lessons=t.lessons,e.topics=t.topics):r==="6"||r==="7"||r==="8"?(e.selectedQuiz=t.selectedQuiz,e.quizes=t.quizes):(r==="9"||r==="10")&&(e.selectedGroup=t.selectedGroup,e.groups=t.groups),e},uc=(e,t)=>(t.formID==="1"?(e.selectedRankType=t.selectedRankType,e.rankTypes=t.rankTypes,e.selectedRank=t.selectedRank,e.ranks=t.ranks):t.formID==="2"?(e.selectedAchievementType=t.selectedAchievementType,e.achievementTypes=t.achievementTypes,e.selectedAward=t.selectedAward,e.awards=t.awards):t.formID==="3"||t.formID==="5"?(e.selectedAchievementType=t.selectedAchievementType,e.achievementTypes=t.achievementTypes):t.formID==="6"&&(e.selectedPoint=t.selectedPoint),e),pc=(e,t)=>((t.formID==="4"||t.formID==="5"||t.formID==="3")&&(e.selectedType=t.selectedType,e.allType=t.allType),e),fc=(e,t)=>(t.formID==="userEnrolledCourse"||t.formID==="courseCompleted"?e.selectedCourse=t==null?void 0:t.selectedCourse:t.formID==="moduleCompleted"?e.selectedModule=t==null?void 0:t.selectedModule:t.formID==="unitCompleted"&&(e.selectedUnit=t==null?void 0:t.selectedUnit),e),hc=(e,t)=>{const n=Number(t.formID);return n===1||n===2||n===3||n===6?(e.selectedPostType=t.selectedPostType,e.types=t.types):[4,5,7,8,9].includes(n)&&(e.selectedPostId=t.selectedPostId,e.posts=t.posts),e},mc=(e,t)=>{const n=Number(t.formID);return(n===1||n===2)&&(e.selectedPostType=t.selectedPostType,e.types=t.types,e.selectedMetaKey=t.selectedMetaKey,e.selectedMetaValue=t.selectedMetaValue),e},bc=(e,t)=>{const n=Number(t.formID);return n===1?(e.selectedOneTimeMembership=t.selectedOneTimeMembership,e.oneTimeSubscriptions=t.oneTimeSubscriptions):n===2?(e.selectedRecurringMembership=t.selectedRecurringMembership,e.recurringSubscriptions=t.recurringSubscriptions):n===3||n===4?(e.selectedCancelMembership=t.selectedCancelMembership,e.allMemberships=t.allMemberships):n===5&&(e.selectedRecurringMembership=t.selectedRecurringMembership,e.recurringSubscriptions=t.recurringSubscriptions),e},gc=(e,t)=>(e.selectedMembershipLevel=t.selectedMembershipLevel,e.AllMembershipLevels=t.AllMembershipLevels,e),vc=(e,t)=>(Number(t.formID)===2&&(e.selectedCommissionType=t.selectedCommissionType,e.AllCommissionType=t.AllCommissionType),e),yc=(e,t)=>(e.selectedProduct=t.selectedProduct,e.allProduct=t.allProduct,e),xc=(e,t)=>{const n=Number(t.formID);return n===1&&(e.selectedDonationForm=t.selectedDonationForm,e.allDonationForms=t.allDonationForms),n===2&&(e.selectedRecurringDonationForm=t.selectedRecurringDonationForm,e.allRecurringForms=t.allRecurringForms),e},Sc=(e,t)=>{const n=Number(t.formID);return n===1||n===2||n===3?(e.selectedQuiz=t.selectedQuiz,e.allQuiz=t.allQuiz):n===4?(e.selectedLesson=t.selectedLesson,e.allLesson=t.allLesson):n===5||n===6||n===7?(e.selectedCourse=t.selectedCourse,e.allCourse=t.allCourse):n===8&&(e.selectedMembership=t.selectedMembership,e.allMembership=t.allMembership),e},jc=(e,t,n)=>{const r=Number(n);return r===2&&(e.selectedLesson=t.selectedLesson,e.allLesson=t.allLesson),(r===1||r===3||r===4||r===5)&&(e.selectedCourse=t.selectedCourse,e.allCourse=t.allCourse),(r===4||r===5)&&(e.selectedQuiz=t.selectedQuiz,e.allQuiz=t.allQuiz),r===6&&(e.selectedDistribution=t.selectedDistribution,e.allDistribution=t.allDistribution),e},_c=(e,t)=>{const n=Number(t.formID);return n===1?(e.selectedCourse=t.selectedCourse,e.allCourse=t.allCourse):n===2&&(e.selectedLesson=t.selectedLesson,e.allLesson=t.allLesson),n===3&&(e.selectedModule=t.selectedModule,e.allModule=t.allModule),e},Ic=(e,t)=>{const n=Number(t.formID);return n===1?(e.selectedProduct=t.selectedProduct,e.allProduct=t.allProduct):n===2&&(e.selectedDiscount=t.selectedDiscount,e.allDiscountCode=t.allDiscountCode),e},Ec=(e,t)=>(t.formID==="roleSpecificChange"&&(e.selectedRole=t.selectedRole,e.allRole=t.allRole),e.fields=t.fields,e),Tc=(e,t)=>(t!=null&&t.formID&&Array.isArray(t==null?void 0:t.fields)&&(e.fields=t.fields),e),As=(e,t,n,r)=>{e==="2"?t.triggerData.quizzes=n.data.quizzes:e==="3"?t.triggerData.lessons=n.data.lessons:e==="4"||e==="1"?t.triggerData.courses=n.data.courses:e==="5"&&(t.triggerData.quizzes=n.data.quizzes,t.triggerData.percentageCondition=n.data.percentageCondition),r(t)},Oc=(e,t)=>(t.primaryKey=e==null?void 0:e.primaryKey,t.fields=e==null?void 0:e.fields,t.rawData=e==null?void 0:e.rawData,t.fetch=(e==null?void 0:e.fetch)||"",t.fetch_remove=(e==null?void 0:e.fetch_remove)||"",t),Cc=(e,t)=>(t.fields=e==null?void 0:e.fields,t.rawData=e==null?void 0:e.rawData,t),Ac=(e,t)=>(t.primaryKey=e==null?void 0:e.primaryKey,t.fields=e==null?void 0:e.fields,t.tasks=(e==null?void 0:e.tasks)||"",t.fetch=(e==null?void 0:e.fetch)||"",t.fetch_remove=(e==null?void 0:e.fetch_remove)||"",t);function at(){return(at=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function mr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dr(){return $.createElement("svg",{className:"msl-close-icn"},$.createElement("line",{x1:"0",y1:"0",x2:"15",y2:"15"}),$.createElement("line",{x1:"0",y1:"15",x2:"15",y2:"0"}))}function Ps(e){var t,n=e.deleteAction;return $.createElement("div",{clickable:"true",className:"msl-chip"},typeof(t=e.value).label=="object"?(t==null?void 0:t.title)||t.value:t.label,$.createElement("div",{role:"button",clickable:"true","aria-label":"delete-value",onClick:n,onKeyPress:n,tabIndex:"0",className:"msl-btn msl-chip-delete msl-flx"},$.createElement(Dr,null)),$.createElement("span",null))}function Ms(){return $.createElement("svg",{className:"msl-arrow-icn"},$.createElement("line",{x1:"10",y1:"15",x2:"2",y2:"7"}),$.createElement("line",{x1:"18",y1:"7",x2:"10",y2:"15"}))}function br(e){var t=e.singleSelect,n=e.addValue,r=e.checkValueExist,s=e.value;if(e.largeData&&!e.menuOpen)return null;var l=[];return function i(a){for(var c,d=function(){var f=c.value,b=f[0],p=f[1];p.type==="group"?(l.push($.createElement("div",{key:p.title+b,"data-msl":!0,className:"msl-grp-title"},p.title)),p.childs.length>0?i(p.childs):l.push($.createElement("option",{className:"msl-option msl-option-disable"},p.emptyDataLabel||"No Data Found"))):l.push($.createElement("div",at({tabIndex:"0",key:p.value+p.label+b+10},!t&&{"data-msl":!0},{style:at({},p.style&&p.style),onClick:function(){!p.disabled&&n(p)},onKeyPress:function(g){g.key==="Enter"&&!p.disabled&&n(p)},title:typeof p.label=="object"?p==null?void 0:p.title:p.label,className:"msl-option "+(r(p,s)?"msl-option-active":"")+" "+(p.disabled?"msl-option-disable":"")+" "+(p.classes!==void 0?p.classes:""),value:p.value}),p.label))},u=function(f,b){var p;if(typeof Symbol=="undefined"||f[Symbol.iterator]==null){if(Array.isArray(f)||(p=function(v,_){if(v){if(typeof v=="string")return mr(v,void 0);var y=Object.prototype.toString.call(v).slice(8,-1);return y==="Object"&&v.constructor&&(y=v.constructor.name),y==="Map"||y==="Set"?Array.from(v):y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y)?mr(v,void 0):void 0}}(f))){p&&(f=p);var g=0;return function(){return g>=f.length?{done:!0}:{done:!1,value:f[g++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return(p=f[Symbol.iterator]()).next.bind(p)}(a.entries());!(c=u()).done;)d()}(e.opts),$.createElement("div",null,l)}function E(e){var t=e.options,n=e.downArrowIcon,r=e.closeIcon,s=e.clearable,l=e.downArrow,i=e.onChange,a=e.singleSelect,c=e.jsonValue,d=e.defaultValue,u=e.className,f=e.placeholder,b=e.disableChip,p=e.name,g=e.style,v=e.attr,_=e.largeData,y=e.disabled,C=e.limit,S=e.emptyDataLabel,h=e.customValue,I=e.onMenuOpen,j=e.onMenuClose,W=e.chipAlternateText,V=e.closeOnSelect,T=D.useState([]),A=T[0],z=T[1],k=D.useState(t||[]),P=k[0],M=k[1],L=D.useState(null),U=L[0],Z=L[1],w=D.useRef(null),ee=function(H){var Y=H.onClickOutside,J=D.useState(H.initialIsVisible),N=J[0],fe=J[1],Se=D.useRef(null),ce=function(oe){oe.key==="Escape"&&fe(!1)},F=function oe(Ie){Se.current&&!Se.current.contains(Ie.target)&&(document.removeEventListener("keydown",ce,!0),document.removeEventListener("click",oe,!0),fe(!1),Y())};return D.useEffect(function(){return document.addEventListener("keydown",ce,!0),document.addEventListener("click",F,!0),function(){document.removeEventListener("keydown",ce,!0),document.removeEventListener("click",F,!0)}}),{ref:Se,isComponentVisible:N,setIsComponentVisible:fe}}({initialIsVisible:!1,onClickOutside:j}),le=ee.ref,Ee=ee.isComponentVisible,G=ee.setIsComponentVisible,B="calc(100% - "+(s&&l?60:l||s?40:5)+"px)";D.useEffect(function(){M(t)},[t]),D.useEffect(function(){var H=function(Y,J){if(!Y)return[];var N=Y,fe=[],Se=[];typeof Y=="string"&&(N=Y.split(","));for(var ce=function(ve){if(typeof ve=="string")fe.push({label:ve,value:ve});else if(typeof ve=="object"){var $e={label:ve,value:ve};"label"in ve&&typeof ve.label=="string"?$e.label=ve.label:"title"in ve&&($e.label=ve.title),fe.push($e)}},F=0;F<N.length;F++)if(typeof N[F]=="string"){var oe=ne(N[F],J,!0,"value");oe.length>0?Se.push(oe[0]):h&&ce(N[F])}else if(typeof N[F]=="object"){var Ie=ne(N[F].value,J,!0,"value");Ie.length>0?Se.push(Ie[0]):h&&ce(N[F])}var je=[];return fe.length&&(je=re(fe)),M([].concat(J,je)),[].concat(Se,fe)}(d,P);a&&H.length>0&&(H=[H[0]]),z(H),V&&G(!1)},[d]);var q,Q,X=function(H){if(z(H),c)i(H);else{var Y="";Y+=H.map(function(J){return J.value}),i(Y)}},se=function(H,Y){return Y.some(function(J){return J.value===H.value})},ae=function(H){var Y=[].concat(A);a?Y=se(H,A)?[]:[H]:se(H,A)?Y=Y.filter(function(J){return J.value!==H.value}):(C===null||C>A.length)&&Y.push(H),X(Y),Z(null),w.current&&(w.current.innerHTML="")},be=function(){X([])},ne=function(H,Y,J,N){var fe=[],Se=[];return function ce(F){for(var oe=0;oe<F.length;oe++){var Ie;if(((Ie=F[oe])===null||Ie===void 0?void 0:Ie.type)==="group")ce(F[oe].childs);else if(J)J&&F[oe][N]===H&&fe.push(F[oe]);else{var je,ve;typeof F[oe].label!="object"&&F[oe].label.match(new RegExp(""+H,"gi"))||typeof F[oe].label=="object"&&(!((je=F[oe])===null||je===void 0||(ve=je.title)===null||ve===void 0)&&ve.match(new RegExp(""+H,"gi")))?fe.push(F[oe]):F[oe].value.match(new RegExp(""+H,"gi"))&&Se.push(F[oe])}typeof F[oe].label!="object"||"title"in F[oe]||console.warn("[multiselect] you must provide a title property as typeof string, if you want to render jsx in option label")}}(Y),[].concat(fe,Se)},re=function(H){var Y=[],J=P.findIndex(function(N){return(N==null?void 0:N.type)==="group"&&(N==null?void 0:N.title)==="Custom Values"});return J===-1?Y.push({title:"Custom Values",type:"group",childs:[].concat(H)}):Array.isArray(H)?H.map(function(N){return P[J].childs.push(N)}):typeof H=="object"&&P[J].childs.push(H),M([].concat(P,Y)),Y},Ae=function(H){var Y=H.target;(function(J){return!(J.hasAttribute("clickable")||J.parentNode.hasAttribute("clickable")||J.parentNode.parentNode.hasAttribute("clickable")||J.parentNode.parentNode.parentNode.hasAttribute("clickable"))})(Y)&&(function(J){if(J.hasAttribute("dropdown-handle")||J.parentNode.hasAttribute("dropdown-handle")||J.parentNode.parentNode.hasAttribute("dropdown-handle"))return!0}(Y)&&Ee?(G(!1),j()):(G(!0),I(),w.current&&w.current.focus()))},Pe=function(H){return typeof H.label=="object"?(H==null?void 0:H.title)||H.value:H.label};return $.createElement("div",at({ref:le},v,{onClick:Ae,tabIndex:"0",onKeyPress:Ae,style:at({},g),className:"msl-wrp msl-vars "+u+" "+(y?"msl-disabled":"")}),$.createElement("input",{name:p,type:"hidden",value:A==null?void 0:A.map(function(H){return H.value})}),$.createElement("div",{"data-msl":!0,className:"msl "+(Ee&&(q=le.current,Q=q.getBoundingClientRect(),window.innerHeight-(Q.top+q.clientHeight)<200?"msl-active-up":"msl-active"))+" "},$.createElement("div",{"data-msl":!0,className:"msl-input-wrp",style:{width:B}},!a&&!b&&A.map(function(H,Y){return $.createElement(Ps,{key:"msl-chip-"+(Y+11),value:H,deleteAction:function(){return function(J){var N=[].concat(A);N.splice(J,1),X(N)}(Y)}})}),!a&&b&&A.length>0&&$.createElement("span",{className:"msl-single-value","data-msl":!0},A.length===1?Pe(A[0]):A.length+" "+W),a&&A.length===1&&$.createElement("span",{className:"msl-single-value","data-msl":!0},Pe(A[0])),(!a&&!b||!(!a||A.length)||!(a||!b||A.length))&&$.createElement("div",{"data-msl":!0,"data-placeholder":f,className:"msl-input",contentEditable:!y,onKeyUp:function(H){var Y=H.target.textContent.trim().replace(/,+/g,"");if(Y){var J={label:'Create "'+Y+'"',value:Y},N=ne(Y,P);N.length?(h&&!ne(Y,P,!0,"value").length&&N.push(J),Z(N)):Z(h?[J]:[]);var fe=function(Se){var ce=Se.label,F=Se.value;return typeof ce!="object"&&ce.match(/Create "|"+/g)&&(ce=ce.replace(/Create "|"+/g,"")),{label:ce,value:F}}(J);H.key!=="Enter"&&H.key!==","||(!h||N.length||se(fe,A)?U.length>0&&ae(U[0]):(re(fe),ae(J)))}else Z(null)},ref:w})),(s||l)&&$.createElement("div",{className:"msl-actions msl-flx"},s&&A.length>0&&$.createElement("div",{role:"button",clickable:"true","aria-label":"close-menu",onClick:be,onKeyPress:be,tabIndex:"0",className:"msl-btn msl-clear-btn msl-flx"},r||$.createElement(Dr,null)),l&&$.createElement("div",{role:"button",tabIndex:"0","dropdown-handle":"true",className:"msl-btn msl-arrow-btn msl-flx",style:at({},Ee&&{transform:"rotate(180deg)"})},n||$.createElement(Ms,null)))),$.createElement("div",{className:"msl-options"},!U&&P.length?$.createElement(br,at({opts:P},{singleSelect:a,addValue:ae,checkValueExist:se,value:A,largeData:_,menuOpen:Ee})):U&&U.length?$.createElement(br,at({opts:U},{singleSelect:a,addValue:ae,checkValueExist:se,value:A,largeData:_,menuOpen:Ee})):(U&&!U.length||P&&!P.length)&&$.createElement("option",{className:"msl-option msl-option-disable"},S)))}E.defaultProps={clearable:!0,downArrow:!0,singleSelect:!1,jsonValue:!1,defaultValue:"",disableChip:!1,name:"",style:{},disabled:!1,limit:null,emptyDataLabel:"No Data Found",placeholder:"Select...",onChange:function(){},onMenuOpen:function(){},onMenuClose:function(){},options:[{label:"Empty",value:"",disabled:!0,style:{textAlign:"center"}}],customValue:!1,chipAlternateText:"Item Selected",closeOnSelect:!0};var _e={Remove:"remove",Replace:"replace",Add:"add"},Xr=Symbol.for("__MUTATIVE_PROXY_DRAFT__"),Zr=Symbol("__MUTATIVE_RAW_RETURN_SYMBOL__"),sn=Symbol.iterator,Ne={mutable:"mutable",immutable:"immutable"};function Ws(e,t){if(e){if(typeof e=="string")return gr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gr(e,t)}}function gr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tt(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=Ws(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Kn={};function ze(e){var t;return(t=e.copy)!=null?t:e.original}function gt(e){return!!te(e)}function te(e){return typeof e!="object"?null:e==null?void 0:e[Xr]}function Yn(e){var t,n=te(e);return n?(t=n.copy)!=null?t:n.original:e}function Je(e,t){if(!e||typeof e!="object")return!1;var n;return Object.getPrototypeOf(e)===Object.prototype||Array.isArray(e)||e instanceof Map||e instanceof Set||!!(t!=null&&t.mark)&&((n=t.mark(e,Ne))===Ne.immutable||typeof n=="function")}function Fr(e,t){return t===void 0&&(t=[]),Object.hasOwnProperty.call(e,"key")&&t.push(e.parent.type===3?Array.from(e.parent.setMap.keys()).indexOf(e.key):e.key),e.parent?Fr(e.parent,t):t.reverse()}function vt(e){return Array.isArray(e)?1:e instanceof Map?2:e instanceof Set?3:0}function yt(e,t){return vt(e)===2?e.get(t):e[t]}function Qt(e,t,n){vt(e)===2?e.set(t,n):e[t]=n}function jn(e,t){var n=te(e),r=n?ze(n):e;return r[t]}function tt(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Mn(e){if(e)for(;e.finalities.revoke.length>0;){var t=e.finalities.revoke.pop();t()}}function ht(e,t){return t?e:[""].concat(e).map(function(n){var r=""+n;return r.indexOf("/")===-1&&r.indexOf("~")===-1?r:r.replace(/~/g,"~0").replace(/\//g,"~1")}).join("/")}function Ls(e){var t=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(t).forEach(function(n){var r=t[n];r.writable||(r.writable=!0,r.configurable=!0),(r.get||r.set)&&(t[n]={configurable:!0,writable:!0,enumerable:r.enumerable,value:e[n]})}),Object.create(Object.getPrototypeOf(e),t)}function wr(e,t){var n;if(Array.isArray(e))return Array.prototype.concat.call(e);if(e instanceof Set)return new Set(e.values());if(e instanceof Map)return new Map(e);if(t!=null&&t.mark&&(n=t.mark(e,Ne),n!==void 0)&&n!==Ne.mutable){if(n===Ne.immutable)return Ls(e);if(typeof n=="function")return n();throw new Error("Unsupported mark result: "+n)}else if(typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype){var r={};return Object.keys(e).forEach(function(s){r[s]=e[s]}),r}else throw new Error("Please check mark() to ensure that it is a stable marker draftable function.")}function Le(e){e.copy||(e.copy=wr(e.original,e.options))}function kt(e){if(!Je(e))return Yn(e);if(Array.isArray(e))return e.map(kt);if(e instanceof Map)return new Map(Array.from(e.entries()).map(function(r){var s=r[0],l=r[1];return[s,kt(l)]}));if(e instanceof Set)return new Set(Array.from(e).map(kt));var t=Object.create(Object.getPrototypeOf(e));for(var n in e)t[n]=kt(e[n]);return t}function an(e){return gt(e)?kt(e):e}function Ze(e){var t;e.assignedMap=(t=e.assignedMap)!=null?t:new Map,e.operated||(e.operated=!0,e.parent&&Ze(e.parent))}function vr(){throw new Error("Cannot modify frozen object")}function Wt(e){return e&&typeof e=="object"&&!Object.isFrozen(e)}function It(e,t,n,r,s){if(!(Object.isFrozen(e)||gt(e))){var l=vt(e);switch(l){case 2:for(var i=Tt(e),a;!(a=i()).done;){var c=a.value,d=c[0],u=c[1];Wt(d)&&It(d),Wt(u)&&It(u)}e.set=e.clear=e.delete=vr;break;case 3:for(var f=Tt(e),b;!(b=f()).done;){var p=b.value;Wt(p)&&It(p)}e.add=e.clear=e.delete=vr;break;case 1:Object.freeze(e);for(var g=Tt(e),v;!(v=g()).done;){var _=v.value;Wt(_)&&It(_)}break;default:Object.freeze(e),Object.keys(e).forEach(function(y){var C=e[y];Wt(C)&&It(C)})}}}function on(e,t){return e instanceof Map?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function yr(e,t){if(t in e)for(var n=Reflect.getPrototypeOf(e);n;){var r=Reflect.getOwnPropertyDescriptor(n,t);if(r)return r;n=Reflect.getPrototypeOf(n)}}function Jn(e,t,n){if(n===void 0&&(n=!1),vt(e)===0){var r=n?Object.keys:Reflect.ownKeys;r(e).forEach(function(c){(!n||typeof c!="symbol")&&t(c,e[c],e)});return}if(vt(e)===1){for(var s=0,l=Tt(e),i;!(i=l()).done;){var a=i.value;t(s,a,e),s+=1}return}e.forEach(function(c,d){return t(d,c,e)})}function ei(e,t){if(!(gt(e)||!Je(e)||t.has(e)||Object.isFrozen(e))){var n=e instanceof Set,r=n?new Map:void 0;if(t.add(e),Jn(e,function(i,a){if(gt(a)){var c,d=te(a);Le(d);var u=(c=d.assignedMap)!=null&&c.size?d.copy:d.original;Qt(n?r:e,i,u)}else ei(a,t)}),r){var s=e,l=Array.from(s);s.clear(),l.forEach(function(i){s.add(r.has(i)?r.get(i):i)})}}}function ks(e,t){var n=e.type===3?e.setMap:e.copy;e.finalities.revoke.length>1&&e.assignedMap.get(t)&&n&&ei(yt(n,t),e.finalities.handledSet)}function Wn(e){e.type===3&&e.copy&&(e.copy.clear(),e.setMap.forEach(function(t){e.copy.add(Yn(t))}))}function Ln(e,t,n,r){var s=e.operated&&e.assignedMap&&e.assignedMap.size>0&&!e.finalized;if(s){if(n&&r){var l=Fr(e);t(e,l,n,r)}e.finalized=!0}}function Dn(e,t,n,r){var s=te(n);s&&(s.callbacks||(s.callbacks=[]),s.callbacks.push(function(l,i){var a=e.type===3?e.setMap:e.copy;if(tt(yt(a,t),n)){var c=s.original;s.copy&&(c=s.copy),Wn(e),Ln(e,r,l,i),Qt(a,t,c)}}),e.options.enableAutoFreeze&&s.finalities!==e.finalities&&(e.options.enableAutoFreeze=!1)),Je(n,e.options)&&e.finalities.draft.push(function(){var l=e.type===3?e.setMap:e.copy;tt(yt(l,t),n)&&ks(e,t)})}function Vs(e,t,n,r,s){var l=e.original,i=e.assignedMap,a=e.options,c=e.copy;if(c.length<l.length){var d=[c,l];l=d[0],c=d[1];var u=[r,n];n=u[0],r=u[1]}for(var f=0;f<l.length;f+=1)if(i.get(f.toString())&&c[f]!==l[f]){var b=t.concat([f]),p=ht(b,s);n.push({op:_e.Replace,path:p,value:an(c[f])}),r.push({op:_e.Replace,path:p,value:an(l[f])})}for(var g=l.length;g<c.length;g+=1){var v=t.concat([g]),_=ht(v,s);n.push({op:_e.Add,path:_,value:an(c[g])})}if(l.length<c.length){var y=a.enablePatches.arrayLengthAssignment,C=y===void 0?!0:y;if(C){var S=t.concat(["length"]),h=ht(S,s);r.push({op:_e.Replace,path:h,value:l.length})}else for(var I=c.length;l.length<I;I-=1){var j=t.concat([I-1]),W=ht(j,s);r.push({op:_e.Remove,path:W})}}}function Rs(e,t,n,r,s){var l=e.original,i=e.copy,a=e.assignedMap;a.forEach(function(c,d){var u=yt(l,d),f=an(yt(i,d)),b=c?on(l,d)?_e.Replace:_e.Add:_e.Remove;if(!(tt(u,f)&&b===_e.Replace)){var p=t.concat(d),g=ht(p,s);n.push(b===_e.Remove?{op:b,path:g}:{op:b,path:g,value:f}),r.push(b===_e.Add?{op:_e.Remove,path:g}:b===_e.Remove?{op:_e.Add,path:g,value:u}:{op:_e.Replace,path:g,value:u})}})}function zs(e,t,n,r,s){var l=e.original,i=e.copy,a=0;l.forEach(function(c){if(!i.has(c)){var d=t.concat([a]),u=ht(d,s);n.push({op:_e.Remove,path:u,value:c}),r.unshift({op:_e.Add,path:u,value:c})}a+=1}),a=0,i.forEach(function(c){if(!l.has(c)){var d=t.concat([a]),u=ht(d,s);n.push({op:_e.Add,path:u,value:c}),r.unshift({op:_e.Remove,path:u,value:c})}a+=1})}function Bt(e,t,n,r){var s=e.options.enablePatches.pathAsArray,l=s===void 0?!0:s;switch(e.type){case 0:case 2:return Rs(e,t,n,r,l);case 1:return Vs(e,t,n,r,l);case 3:return zs(e,t,n,r,l)}}var Hs=!1,cn=function(t,n,r){if(r===void 0&&(r=!1),typeof t=="object"&&t!==null&&(!Je(t,n)||r)&&!Hs)throw new Error("Strict mode: Mutable data cannot be accessed directly, please use 'unsafe(callback)' wrap.")},_n,kn=(_n={get size(){var e=ze(te(this));return e.size},has:function(t){return ze(te(this)).has(t)},set:function(t,n){var r=te(this),s=ze(r);return(!s.has(t)||!tt(s.get(t),n))&&(Le(r),Ze(r),r.assignedMap.set(t,!0),r.copy.set(t,n),Dn(r,t,n,Bt)),this},delete:function(t){if(!this.has(t))return!1;var n=te(this);return Le(n),Ze(n),n.original.has(t)?n.assignedMap.set(t,!1):n.assignedMap.delete(t),n.copy.delete(t),!0},clear:function(){var t=te(this);if(this.size){Le(t),Ze(t),t.assignedMap=new Map;for(var n=Tt(t.original),r;!(r=n()).done;){var s=r.value,l=s[0];t.assignedMap.set(l,!1)}t.copy.clear()}},forEach:function(t,n){var r=this,s=te(this);ze(s).forEach(function(l,i){t.call(n,r.get(i),i,r)})},get:function(t){var n=te(this),r=ze(n).get(t),s=(n.options.mark==null?void 0:n.options.mark(r,Ne))===Ne.mutable;if(n.options.strict&&cn(r,n.options,s),s||n.finalized||!Je(r,n.options)||r!==n.original.get(t))return r;var l=Kn.createDraft({original:r,parentDraft:n,key:t,finalities:n.finalities,options:n.options});return Le(n),n.copy.set(t,l),l},keys:function(){return ze(te(this)).keys()},values:function(){var t=this,n,r=this.keys();return n={},n[sn]=function(){return t.values()},n.next=function(){var l=r.next();if(l.done)return l;var i=t.get(l.value);return{done:!1,value:i}},n},entries:function(){var t=this,n,r=this.keys();return n={},n[sn]=function(){return t.entries()},n.next=function(){var l=r.next();if(l.done)return l;var i=t.get(l.value);return{done:!1,value:[l.value,i]}},n}},_n[sn]=function(){return this.entries()},_n),Ns=Reflect.ownKeys(kn),en,xr=function(t,n,r){var s=r.isValuesIterator;return function(){var l=n.next();if(l.done)return l;var i=l.value,a=t.setMap.get(i),c=te(a),d=(t.options.mark==null?void 0:t.options.mark(a,Ne))===Ne.mutable;if(t.options.strict&&cn(i,t.options,d),!d&&!c&&Je(i,t.options)&&!t.finalized&&t.original.has(i)){var u=Kn.createDraft({original:i,parentDraft:t,key:i,finalities:t.finalities,options:t.options});t.setMap.set(i,u),a=u}else c&&(a=c.proxy);return{done:!1,value:s?a:[a,a]}}},Vn=(en={get size(){var e=te(this);return e.setMap.size},has:function(t){var n=te(this);if(n.setMap.has(t))return!0;Le(n);var r=te(t);return!!(r&&n.setMap.has(r.original))},add:function(t){var n=te(this);return this.has(t)||(Le(n),Ze(n),n.assignedMap.set(t,!0),n.setMap.set(t,t),Dn(n,t,t,Bt)),this},delete:function(t){if(!this.has(t))return!1;var n=te(this);Le(n),Ze(n);var r=te(t);return r&&n.setMap.has(r.original)?(n.assignedMap.set(r.original,!1),n.setMap.delete(r.original)):(!r&&n.setMap.has(t)?n.assignedMap.set(t,!1):n.assignedMap.delete(t),n.setMap.delete(t))},clear:function(){if(this.size){var t=te(this);Le(t),Ze(t);for(var n=Tt(t.original),r;!(r=n()).done;){var s=r.value;t.assignedMap.set(s,!1)}t.setMap.clear()}},values:function(){var t=this,n,r=te(this);Le(r);var s=r.setMap.keys();return n={},n[Symbol.iterator]=function(){return t.values()},n.next=xr(r,s,{isValuesIterator:!0}),n},entries:function(){var t=this,n,r=te(this);Le(r);var s=r.setMap.keys();return n={},n[Symbol.iterator]=function(){return t.entries()},n.next=xr(r,s,{isValuesIterator:!1}),n},keys:function(){return this.values()}},en[sn]=function(){return this.values()},en.forEach=function(t,n){for(var r=this.values(),s=r.next();!s.done;)t.call(n,s.value,s.value,this),s=r.next()},en),Bs=Reflect.ownKeys(Vn),ti={get:function(t,n,r){if(n===Xr)return t;var s;if(t.options.mark){var l=Reflect.get(t.original,n,r);if(s=t.options.mark(l,Ne),s===Ne.mutable)return t.options.strict&&cn(l,t.options,!0),l}var i=ze(t);if(i instanceof Map&&Ns.includes(n)){if(n==="size")return Object.getOwnPropertyDescriptor(kn,"size").get.call(t.proxy);var a=kn[n];if(a)return a.bind(t.proxy)}if(i instanceof Set&&Bs.includes(n)){if(n==="size")return Object.getOwnPropertyDescriptor(Vn,"size").get.call(t.proxy);var c=Vn[n];if(c)return c.bind(t.proxy)}if(!on(i,n)){var d,u=yr(i,n);return u?"value"in u?u.value:(d=u.get)==null?void 0:d.call(t.proxy):void 0}var f=i[n];if(t.options.strict&&cn(f,t.options),t.finalized||!Je(f,t.options))return f;if(f===jn(t.original,n)){if(Le(t),t.copy[n]=Xn({original:t.original[n],parentDraft:t,key:t.type===1?Number(n):n,finalities:t.finalities,options:t.options}),typeof s=="function"){var b=te(t.copy[n]);return Le(b),Ze(b),b.copy}return t.copy[n]}return f},set:function(t,n,r){if(t.type===3||t.type===2)throw new Error("Map/Set draft does not support any property assignment.");if(t.type===1&&n!=="length"&&isNaN(Number(n)))throw new Error("Only supports setting array indices and the 'length' property.");var s=yr(ze(t),n);if(s!=null&&s.set)return s.set.call(t.proxy,r),!0;var l=jn(ze(t),n),i=te(l);if(i&&tt(i.original,r)){var a;return t.copy[n]=r,t.assignedMap=(a=t.assignedMap)!=null?a:new Map,t.assignedMap.set(n,!1),!0}return tt(r,l)&&(r!==void 0||on(t.original,n))||(Le(t),Ze(t),on(t.original,n)&&tt(r,t.original[n])?t.assignedMap.delete(n):t.assignedMap.set(n,!0),t.copy[n]=r,Dn(t,n,r,Bt)),!0},has:function(t,n){return n in ze(t)},ownKeys:function(t){return Reflect.ownKeys(ze(t))},getOwnPropertyDescriptor:function(t,n){var r=ze(t),s=Reflect.getOwnPropertyDescriptor(r,n);return s&&{writable:!0,configurable:t.type!==1||n!=="length",enumerable:s.enumerable,value:r[n]}},getPrototypeOf:function(t){return Reflect.getPrototypeOf(t.original)},setPrototypeOf:function(){throw new Error("Cannot call 'setPrototypeOf()' on drafts")},defineProperty:function(){throw new Error("Cannot call 'defineProperty()' on drafts")},deleteProperty:function(t,n){if(t.type===1)return ti.set.call(this,t,n,void 0,t.proxy);if(jn(t.original,n)!==void 0||n in t.original)Le(t),Ze(t),t.assignedMap.set(n,!1);else{var r;t.assignedMap=(r=t.assignedMap)!=null?r:new Map,t.assignedMap.delete(n)}return t.copy&&delete t.copy[n],!0}};function Xn(e){var t=e.original,n=e.parentDraft,r=e.key,s=e.finalities,l=e.options,i=vt(t),a={type:i,finalized:!1,parent:n,original:t,copy:null,proxy:null,finalities:s,options:l,setMap:i===3?new Map(t.entries()):void 0};(r||"key"in e)&&(a.key=r);var c=Proxy.revocable(i===1?Object.assign([],a):a,ti),d=c.proxy,u=c.revoke;if(s.revoke.push(u),a.proxy=d,n){var f=n;f.finalities.draft.push(function(p,g){var v,_=te(d),y=f.type===3?f.setMap:f.copy,C=yt(y,r),S=te(C);if(S){var h=S.original;S.operated&&(h=Yn(C)),Wn(S),Ln(S,Bt,p,g),Qt(y,r,h)}(v=_.callbacks)==null||v.forEach(function(I){I(p,g)})})}else{var b=te(d);b.finalities.draft.push(function(p,g){Wn(b),Ln(b,Bt,p,g)})}return d}Kn.createDraft=Xn;function $s(e,t,n,r,s){var l,i=te(e),a=(l=i==null?void 0:i.original)!=null?l:e,c=!!t.length;if(i!=null&&i.operated)for(;i.finalities.draft.length>0;){var d=i.finalities.draft.pop();d(n,r)}var u=c?t[0]:i?i.operated?i.copy:i.original:e;return i&&Mn(i),s&&It(u,u,i==null?void 0:i.options.updatedValues),[u,n&&c?[{op:_e.Replace,path:[],value:t[0]}]:n,r&&c?[{op:_e.Replace,path:[],value:a}]:r]}function Us(e,t){var n={draft:[],revoke:[],handledSet:new WeakSet},r,s;t.enablePatches&&(r=[],s=[]);var l=(t.mark==null?void 0:t.mark(e,Ne))===Ne.mutable||!Je(e,t),i=l?e:Xn({original:e,parentDraft:null,finalities:n,options:t});return[i,function(a){a===void 0&&(a=[]);var c=$s(i,a,r,s,t.enableAutoFreeze),d=c[0],u=c[1],f=c[2];return t.enablePatches?[d,u,f]:d}]}function Rn(e){var t=e.rootDraft,n=e.value;e.useRawReturn,e.isRoot,Jn(n,function(r,s,l){var i=te(s);if(i&&t&&i.finalities===t.finalities){e.isContainDraft=!0;var a=i.original;if(l instanceof Set){var c=Array.from(l);l.clear(),c.forEach(function(d){return l.add(r===d?a:d)})}else Qt(l,r,a)}else typeof s=="object"&&s!==null&&(e.value=s,e.isRoot=!1,Rn(e))})}function ni(e){var t=te(e);if(!Je(e,t==null?void 0:t.options))return e;var n=vt(e);if(t&&!t.operated)return t.original;t&&(t.finalized=!0);var r;try{r=n===2?new Map(e):n===3?Array.from(t.setMap.values()):wr(e,t==null?void 0:t.options)}finally{t&&(t.finalized=!1)}return Jn(r,function(s,l){t&&tt(yt(t.original,s),l)||Qt(r,s,ni(l))}),n===3?new Set(r):r}function Sr(e){if(!gt(e))throw new Error("current() is only used for Draft, parameter: "+e);return ni(e)}function it(e,t,n){var r,s,l,i,a,c,d;if(typeof e=="function"&&typeof t!="function")return function(V){for(var T=this,A=arguments.length,z=new Array(A>1?A-1:0),k=1;k<A;k++)z[k-1]=arguments[k];return it(V,function(P){return e.call.apply(e,[T,P].concat(z))},t)};var u=e,f=t,b=n;if(typeof t!="function"&&(b=t),b!==void 0&&Object.prototype.toString.call(b)!=="[object Object]")throw new Error("Invalid options: "+b+", 'options' should be an object.");var p=gt(u)?Sr(u):u,g=(r=b)==null?void 0:r.mark,v=(s=(l=b)==null?void 0:l.enablePatches)!=null?s:!1,_=(i=(a=b)==null?void 0:a.strict)!=null?i:!1,y=(c=(d=b)==null?void 0:d.enableAutoFreeze)!=null?c:!1,C={enableAutoFreeze:y,mark:g,strict:_,enablePatches:v};if(!Je(p,C)&&typeof p=="object"&&p!==null)throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");var S=Us(p,C),h=S[0],I=S[1];if(typeof t!="function"){if(!Je(p,C))throw new Error("Invalid base state: create() only supports plain objects, arrays, Set, Map or using mark() to mark the state as immutable.");return[h,I]}var j;try{j=f(h)}catch(V){throw Mn(te(h)),V}var W=function(T){var A=te(h);if(!gt(T)){if(T!==void 0&&!tt(T,h)&&A!=null&&A.operated)throw new Error("Either the value is returned as a new non-draft value, or only the draft is modified without returning any value.");var z=T==null?void 0:T[Zr];if(z){var k=z[0];return C.strict&&typeof T=="object"&&T!==null&&Rn({rootDraft:A,value:T,useRawReturn:!0}),I([k])}if(T!==void 0)return typeof T=="object"&&T!==null&&Rn({rootDraft:A,value:T}),I([T])}if(T===h||T===void 0)return I([]);var P=te(T);if(C===P.options){if(P.operated)throw new Error("Cannot return a modified child draft.");return I([Sr(T)])}return I([T])};return j instanceof Promise?j.then(W,function(V){throw Mn(te(h)),V}):W(j)}function Pc(e){var t;if(arguments.length===0)throw new Error("rawReturn() must be called with a value.");if(arguments.length>1)throw new Error("rawReturn() must be called with one argument.");return t={},t[Zr]=[e],t}const zn=(e,t=new WeakMap)=>{if(typeof e!="object"||e===null)return e;const n=(l,i)=>{let a=-1;const{length:c}=l;for(;++a<c;)i(l[a],a);return l},r=Array.isArray(e),s=r?[]:{};return t.get(e)?t.get(e):(t.set(e,s),r?n(e,(l,i)=>{s[i]=zn(l,t)}):n(Object.keys(e),(l,i)=>{s[l]=zn(e[l],t)}),s)},Mc=(e,t)=>e.sort((n,r)=>{var s,l,i,a;return((s=n==null?void 0:n[t])==null?void 0:s.toLowerCase())<((l=r==null?void 0:r[t])==null?void 0:l.toLowerCase())?-1:((i=n==null?void 0:n[t])==null?void 0:i.toLowerCase())>((a=r==null?void 0:r[t])==null?void 0:a.toLowerCase())?1:0}),Wc=(e,t,n)=>e.sort((r,s)=>{const l=r[t],i=s[t];return n==="ASC"?l<i?-1:l>i?1:0:i<l?-1:i>l?1:0}),qs=e=>Object.keys(e).sort().reduce((t,n)=>(t[n]=e[n],t),{}),Lc=e=>{const t=zn(e),n=qs(t),r=[];Object.keys(e).forEach(l=>{e[l].isPro||r.push(l)});const s=r.reduce((l,i)=>{const a=O({},l);return t[i]&&(a[i]=t[i],delete t[i]),a},{});return O(O({},s),n)},jr=(e,t)=>{const n=Array.isArray(t)?t:t.split(".");if(n.length===0)return e;const r=n.shift();if(Array.isArray(e)){const s=parseInt(r,10);if(isNaN(s)||s>=e.length){toast.error(m("Index out of bounds or invalid","bit-integrations"));return}return jr(e[s],n)}if(e&&typeof e=="object")return r in e||(toast.error(m("Invalid path","bit-integrations")),retrun),jr(e[r],n);toast.error(m("Invalid path","bit-integrations"))},_t=e=>e===""||e==="#",kc=(e,t)=>!_t(e)||!_t(t)?`<h5>
          ${m("More Details on","bit-integrations")} 
          ${_t(e)?"":`<a className="btcd-link" href=${e} target="_blank" rel="noreferrer">${m("Documentation","bit-integrations")}</a>`}
          ${!_t(e)&&!_t(t)?m("or","bit-integrations"):""}
          ${_t(t)?"":`<a className="btcd-link" href=${t} target="_blank" rel="noreferrer">${m("Youtube Tutorials","bit-integrations")}</a>`}
        </h5 > `:"";function Vc({size:e,className:t,clr:n="#0a8dff",style:r}){return o.jsx("div",{className:t,style:O({height:e,width:e},r),children:o.jsx("svg",{version:"1.1",style:{height:e,width:e},x:"0px",y:"0px",viewBox:"0 0 80 80",xmlSpace:"preserve",children:o.jsx("path",{fill:n,d:`M10,40c0,0,0-0.4,0-1.1c0-0.3,0-0.8,0-1.3c0-0.3,0-0.5,0-0.8c0-0.3,0.1-0.6,0.1-0.9c0.1-0.6,0.1-1.4,0.2-2.1
        c0.2-0.8,0.3-1.6,0.5-2.5c0.2-0.9,0.6-1.8,0.8-2.8c0.3-1,0.8-1.9,1.2-3c0.5-1,1.1-2,1.7-3.1c0.7-1,1.4-2.1,2.2-3.1
        c1.6-2.1,3.7-3.9,6-5.6c2.3-1.7,5-3,7.9-4.1c0.7-0.2,1.5-0.4,2.2-0.7c0.7-0.3,1.5-0.3,2.3-0.5c0.8-0.2,1.5-0.3,2.3-0.4l1.2-0.1
        l0.6-0.1l0.3,0l0.1,0l0.1,0l0,0c0.1,0-0.1,0,0.1,0c1.5,0,2.9-0.1,4.5,0.2c0.8,0.1,1.6,0.1,2.4,0.3c0.8,0.2,1.5,0.3,2.3,0.5
        c3,0.8,5.9,2,8.5,3.6c2.6,1.6,4.9,3.4,6.8,5.4c1,1,1.8,2.1,2.7,3.1c0.8,1.1,1.5,2.1,2.1,3.2c0.6,1.1,1.2,2.1,1.6,3.1
        c0.4,1,0.9,2,1.2,3c0.3,1,0.6,1.9,0.8,2.7c0.2,0.9,0.3,1.6,0.5,2.4c0.1,0.4,0.1,0.7,0.2,1c0,0.3,0.1,0.6,0.1,0.9
        c0.1,0.6,0.1,1,0.1,1.4C74,39.6,74,40,74,40c0.2,2.2-1.5,4.1-3.7,4.3s-4.1-1.5-4.3-3.7c0-0.1,0-0.2,0-0.3l0-0.4c0,0,0-0.3,0-0.9
        c0-0.3,0-0.7,0-1.1c0-0.2,0-0.5,0-0.7c0-0.2-0.1-0.5-0.1-0.8c-0.1-0.6-0.1-1.2-0.2-1.9c-0.1-0.7-0.3-1.4-0.4-2.2
        c-0.2-0.8-0.5-1.6-0.7-2.4c-0.3-0.8-0.7-1.7-1.1-2.6c-0.5-0.9-0.9-1.8-1.5-2.7c-0.6-0.9-1.2-1.8-1.9-2.7c-1.4-1.8-3.2-3.4-5.2-4.9
        c-2-1.5-4.4-2.7-6.9-3.6c-0.6-0.2-1.3-0.4-1.9-0.6c-0.7-0.2-1.3-0.3-1.9-0.4c-1.2-0.3-2.8-0.4-4.2-0.5l-2,0c-0.7,0-1.4,0.1-2.1,0.1
        c-0.7,0.1-1.4,0.1-2,0.3c-0.7,0.1-1.3,0.3-2,0.4c-2.6,0.7-5.2,1.7-7.5,3.1c-2.2,1.4-4.3,2.9-6,4.7c-0.9,0.8-1.6,1.8-2.4,2.7
        c-0.7,0.9-1.3,1.9-1.9,2.8c-0.5,1-1,1.9-1.4,2.8c-0.4,0.9-0.8,1.8-1,2.6c-0.3,0.9-0.5,1.6-0.7,2.4c-0.2,0.7-0.3,1.4-0.4,2.1
        c-0.1,0.3-0.1,0.6-0.2,0.9c0,0.3-0.1,0.6-0.1,0.8c0,0.5-0.1,0.9-0.1,1.3C10,39.6,10,40,10,40z`,children:o.jsx("animateTransform",{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 40 40",to:"360 40 40",dur:"0.6s",repeatCount:"indefinite"})})})})}function Rc(e,t,n,r,s,l="POST",i="triggered_entity_id"){const a=()=>{t&&ge({[i]:t},s,null,l)};return{stopFetching:()=>{n.abort(),r(!1),e.current=!1,a()}}}const zc=e=>{e(t=>it(t,n=>{var r,s;(r=n==null?void 0:n.triggerDetail)==null||delete r.tmp,(s=n==null?void 0:n.triggerDetail)==null||delete s.data}))},Hc=(e,t,n,r,s,l=!1)=>{s(!0),e.current=!0,t(!1),n(void 0),Gs(r,l)},Gs=(e,t=!1)=>{e(n=>it(n,r=>{const s=t?"flow_details":"triggerDetail";delete r[s].data}))},Qs=(e,t,n,r=!1)=>{const l=ge(null,"get_all_topic_by_forum",{forum_id:e},"GET").then(i=>i&&i.success?(n(create(t,a=>{r?(a.flow_details===void 0&&(a.flow_details={}),a.flow_details.topics=i.data):a.triggerData.topics=i.data})),m("Fetched Topic successfully","bit-integrations")):m("Topics fetching failed. please try again","bit-integrations"));me.promise(l,{success:i=>i,error:m("Error Occurred here","bit-integrations"),loading:m("Loading Topic...")})},Nc=(e,t)=>{const n=ge(null,"get_all_forum",null,"GET").then(r=>{if(r&&r.success){const s=O({},e);return s.flow_details.forums=r.data,t(O({},s)),m("Fetched Forums successfully","bit-integrations")}return m("Forums fetching failed. please try again","bit-integrations")});me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading Forums...")})},Bc=(e,t)=>{const n={select_option_id:e.triggered_entity_id},r=ge(null,"get_all_group",n,"GET").then(s=>{if(s&&s.success){const l=O({},e);return l.flow_details.groups=s.data,t(O({},l)),m("Fetched groups successfully","bit-integrations")}return m("groups fetching failed. please try again","bit-integrations")});me.promise(r,{success:s=>s,error:m("Error Occurred","bit-integrations"),loading:m("Loading Groups...")})},Ks=(e,t,n,r=!1)=>{const l=ge(null,"get_all_rank_by_types",{post_name:e},"GET").then(i=>{if(i&&i.success){const a=O({},t);return r?a.flow_details.ranks=i.data:a.triggerData.ranks=i.data,n(O({},a)),m("Fetched Rank successfully","bit-integrations")}return m("Rank  fetching failed. please try again","bit-integrations")});me.promise(l,{success:i=>i,error:m("Error Occurred","bit-integrations"),loading:m("Loading Rank ...")})},Ys=(e,t,n,r=!1)=>{const l=ge(null,"get_all_award_by_achievement_type",{achievement_name:e},"GET").then(i=>{if(i&&i.success){const a=O({},t);return r?a.flow_details.awards=i.data:a.triggerData.awards=i.data,n(O({},a)),m("Fetched awards successfully","bit-integrations")}return m("Award fetching failed. please try again","bit-integrations")});me.promise(l,{success:i=>i,error:m("Error Occurred","bit-integrations"),loading:m("Loading Award...")})},$c=(e,t)=>{const n=ge(null,"get_all_achievement_type",null,"GET").then(r=>{if(r&&r.success){const s=O({},e);return s.flow_details.achievementTypes=r.data,t(O({},s)),m("Fetched Achievement Types successfully","bit-integrations")}return m("Achievement Types fetching failed. please try again","bit-integrations")});me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading Achievement Types...")})},Uc=(e,t)=>{const n=ge(null,"get_all_rank_type",null,"GET").then(r=>{if(r&&r.success){const s=O({},e);return s.flow_details.rankTypes=r.data,t(O({},s)),m("Fetched Rank Types successfully","bit-integrations")}return m("Rank Types fetching failed. please try again","bit-integrations")});me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading Rank Types...")})},Js=(e,t,n,r=!1)=>{const l=ge(null,"get_all_lessons_by_course",{course_id:e},"GET").then(i=>{if(i&&i.success){const a=O({},t);return r?a.flow_details.lessons=i.data:a.triggerData.lessons=i.data,n(O({},a)),m("Fetched Lesson successfully","bit-integrations")}return m("Lessons fetching failed. please try again","bit-integrations")});me.promise(l,{success:i=>i,error:m("Error Occurred","bit-integrations"),loading:m("Loading Lesson...")})},Ds=(e,t,n,r,s=!1)=>{const i=ge(null,"get_all_topic_by_lesson",{lesson_id:e,course_id:t},"GET").then(a=>{if(a&&a.success){const c=O({},n);return s?c.flow_details.topics=a.data:c.triggerData.topics=a.data,r(O({},c)),m("Fetched Topic successfully","bit-integrations")}return m("Topics fetching failed. please try again","bit-integrations")});me.promise(i,{success:a=>a,error:m("Error Occurred","bit-integrations"),loading:m("Loading Topic...")})},qc=(e,t)=>{const n=ge(null,"get_all_courses",null,"GET").then(r=>{if(r&&r.success){const s=O({},e);return s.flow_details.courses=r.data,t(O({},s)),m("Fetched courses successfully","bit-integrations")}return m("Courses fetching failed. please try again","bit-integrations")});me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading Courses...")})},Gc=(e,t)=>{const n=ge(null,"get_all_quizes",null,"GET").then(r=>{if(r&&r.success){const s=O({},e);return s.flow_details.quizes=r.data,t(O({},s)),m("Fetched quizes successfully","bit-integrations")}return m("Quizes fetching failed. please try again","bit-integrations")});me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading Quizes...")})},Qc=(e,t)=>{const n=ge(null,"get_all_groups",null,"GET").then(r=>{if(r&&r.success){const s=O({},e);return s.flow_details.groups=r.data,t(O({},s)),m("Fetched groups successfully","bit-integrations")}return m("groups fetching failed. please try again","bit-integrations")});me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading Groups...")})},Kc=(e,t)=>{const n=ge(null,"get_all_order_status",null,"GET").then(r=>{if(r&&r.success){const s=O({},e);return s.flow_details.orderStatus=r.data,t(O({},s)),m("Fetched order status successfully","bit-integrations")}return m("Order status fetching failed. please try again","bit-integrations")});me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading order status...")})},Yc=(e,t)=>{const n=ge(null,"get_all_woocommerce_product",null,"GET").then(r=>{if(r&&r.success){const s=O({},e);return s.flow_details.products=r.data,t(O({},s)),m("Fetched all product successfully","bit-integrations")}return m("All product fetching failed. please try again","bit-integrations")});me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading all product...")})},Jc=(e,t)=>{const n=ge(null,"get_all_product_category",null,"GET").then(r=>{if(r&&r.success){const s=O({},e);return s.flow_details.allProductCategories=r.data,t(O({},s)),m("All product categories fetched successfully","bit-integrations")}return m("Product categories fetching failed. please try again","bit-integrations")});me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading categories product...")})},Xs=(e,t,n,r=!1)=>{const l=ge(null,"get_all_variation_by_product",{product_id:e},"GET").then(i=>i&&i.success?(n(it(t,a=>{r?(a.flow_details===void 0&&(a.flow_details={}),a.flow_details.allVariation=i.data):a.triggerData.allVariation=i.data})),m("Fetched all variation successfully","bit-integrations")):m("Variation fetching failed. please try again","bit-integrations"));me.promise(l,{success:i=>i,error:m("Error Occurred here","bit-integrations"),loading:m("Loading variation...")})},Zs=({flow:e,setFlowData:t,edit:n=!1})=>{var a,c,d,u;const r=n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsxs("div",{children:[(r==="fluentcrm-1"||r==="fluentcrm-2")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select tag","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedTag,options:(c=i==null?void 0:i.tags)==null?void 0:c.map(f=>({label:f.tag_title,value:f.tag_id.toString()})),onChange:f=>t(f,"selectedTag"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(r==="fluentcrm-3"||r==="fluentcrm-4")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select List","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedList,options:(d=i==null?void 0:i.lists)==null?void 0:d.map(f=>({label:f.list_title,value:f.list_id.toString()})),onChange:f=>t(f,"selectedList"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="fluentcrm-5"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select Status","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedStatus,options:(u=i==null?void 0:i.status)==null?void 0:u.map(f=>({label:f.status_title,value:f.status_id.toString()})),onChange:f=>t(f,"selectedStatus"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]})},Fs=({flow:e,setFlowData:t})=>{var r,s,l,i,a,c,d,u,f,b,p,g,v,_;const n=(r=e==null?void 0:e.triggerData)==null?void 0:r.formID;return o.jsxs("div",{children:[(n==="2"||n==="5")&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:m("Select a Quiz","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:(s=e.triggerData)==null?void 0:s.selectedQuiz,options:(i=(l=e==null?void 0:e.triggerData)==null?void 0:l.quizzes)==null?void 0:i.map(y=>({label:y.quiz_title,value:y.quiz_id.toString()})),onChange:y=>t(y,"selectedQuiz"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),n==="3"&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:m("Select a Lesson","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:(a=e.triggerData)==null?void 0:a.selectedLesson,options:(d=(c=e==null?void 0:e.triggerData)==null?void 0:c.lessons)==null?void 0:d.map(y=>({label:y.lesson_title,value:y.lesson_id.toString()})),onChange:y=>t(y,"selectedLesson"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(n==="4"||n==="1")&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:m("Select a Course","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:(u=e.triggerData)==null?void 0:u.selectedCourse,options:(b=(f=e==null?void 0:e.triggerData)==null?void 0:f.courses)==null?void 0:b.map(y=>({label:y.course_title,value:y.course_id.toString()})),onChange:y=>t(y,"selectedCourse"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),n==="5"&&e.triggerData.selectedQuiz&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:m("Select a Condition","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:(p=e.triggerData)==null?void 0:p.selectedCondition,options:(v=(g=e==null?void 0:e.triggerData)==null?void 0:g.percentageCondition)==null?void 0:v.map(y=>({label:y.condition_title,value:y.condition_id.toString()})),onChange:y=>t(y,"selectedCondition"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}}),o.jsx("h4",{children:m("Target Value","bit-integrations")}),o.jsx("input",{className:"btcd-paper-inp w-10 mt-1",onChange:y=>t(y.target.value,"requiredPercent"),name:"requiredPercent",value:(_=e==null?void 0:e.triggerData)==null?void 0:_.requiredPercent,type:"text",placeholder:m("Targeted Percentage Value(ex: 50)","bit-integrations")})]}),o.jsx("div",{})]})},ws=({flow:e,setFlowData:t})=>{var r,s,l,i,a,c,d,u,f,b;const n=(r=e==null?void 0:e.triggerData)==null?void 0:r.formID;return o.jsxs("div",{children:[(n==="userEnrolledCourse"||n==="courseCompleted")&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:m("Select a Course","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:(s=e.triggerData)==null?void 0:s.selectedCourse,options:(i=(l=e==null?void 0:e.triggerData)==null?void 0:l.courses)==null?void 0:i.map(({label:p,value:g})=>({label:p,value:g})),onChange:p=>t(p,"selectedCourse"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),n==="moduleCompleted"&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:m("Select a Module","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:(a=e.triggerData)==null?void 0:a.selectedModule,options:(d=(c=e==null?void 0:e.triggerData)==null?void 0:c.modules)==null?void 0:d.map(({label:p,value:g})=>({label:p,value:g})),onChange:p=>t(p,"selectedModule"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),n==="unitCompleted"&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:m("Select a Unit","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:(u=e.triggerData)==null?void 0:u.selectedUnit,options:(b=(f=e==null?void 0:e.triggerData)==null?void 0:f.units)==null?void 0:b.map(({label:p,value:g})=>({label:p,value:g})),onChange:p=>t(p,"selectedUnit"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),o.jsx("div",{})]})};var Ve="top",Qe="bottom",Ke="right",Re="left",Zn="auto",Kt=[Ve,Qe,Ke,Re],Ct="start",$t="end",ea="clippingParents",ri="viewport",Lt="popper",ta="reference",_r=Kt.reduce(function(e,t){return e.concat([t+"-"+Ct,t+"-"+$t])},[]),ii=[].concat(Kt,[Zn]).reduce(function(e,t){return e.concat([t,t+"-"+Ct,t+"-"+$t])},[]),na="beforeRead",ra="read",ia="afterRead",sa="beforeMain",aa="main",oa="afterMain",la="beforeWrite",ca="write",da="afterWrite",ua=[na,ra,ia,sa,aa,oa,la,ca,da];function we(e){return e?(e.nodeName||"").toLowerCase():null}function Be(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function xt(e){var t=Be(e).Element;return e instanceof t||e instanceof Element}function Ge(e){var t=Be(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Fn(e){if(typeof ShadowRoot=="undefined")return!1;var t=Be(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function pa(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},s=t.attributes[n]||{},l=t.elements[n];!Ge(l)||!we(l)||(Object.assign(l.style,r),Object.keys(s).forEach(function(i){var a=s[i];a===!1?l.removeAttribute(i):l.setAttribute(i,a===!0?"":a)}))})}function fa(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var s=t.elements[r],l=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=i.reduce(function(c,d){return c[d]="",c},{});!Ge(s)||!we(s)||(Object.assign(s.style,a),Object.keys(l).forEach(function(c){s.removeAttribute(c)}))})}}var si={name:"applyStyles",enabled:!0,phase:"write",fn:pa,effect:fa,requires:["computeStyles"]};function Fe(e){return e.split("-")[0]}var mt=Math.max,dn=Math.min,At=Math.round;function Hn(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function ai(){return!/^((?!chrome|android).)*safari/i.test(Hn())}function Pt(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),s=1,l=1;t&&Ge(e)&&(s=e.offsetWidth>0&&At(r.width)/e.offsetWidth||1,l=e.offsetHeight>0&&At(r.height)/e.offsetHeight||1);var i=xt(e)?Be(e):window,a=i.visualViewport,c=!ai()&&n,d=(r.left+(c&&a?a.offsetLeft:0))/s,u=(r.top+(c&&a?a.offsetTop:0))/l,f=r.width/s,b=r.height/l;return{width:f,height:b,top:u,right:d+f,bottom:u+b,left:d,x:d,y:u}}function wn(e){var t=Pt(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function oi(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Fn(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function rt(e){return Be(e).getComputedStyle(e)}function ha(e){return["table","td","th"].indexOf(we(e))>=0}function ut(e){return((xt(e)?e.ownerDocument:e.document)||window.document).documentElement}function bn(e){return we(e)==="html"?e:e.assignedSlot||e.parentNode||(Fn(e)?e.host:null)||ut(e)}function Ir(e){return!Ge(e)||rt(e).position==="fixed"?null:e.offsetParent}function ma(e){var t=/firefox/i.test(Hn()),n=/Trident/i.test(Hn());if(n&&Ge(e)){var r=rt(e);if(r.position==="fixed")return null}var s=bn(e);for(Fn(s)&&(s=s.host);Ge(s)&&["html","body"].indexOf(we(s))<0;){var l=rt(s);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||t&&l.willChange==="filter"||t&&l.filter&&l.filter!=="none")return s;s=s.parentNode}return null}function Yt(e){for(var t=Be(e),n=Ir(e);n&&ha(n)&&rt(n).position==="static";)n=Ir(n);return n&&(we(n)==="html"||we(n)==="body"&&rt(n).position==="static")?t:n||ma(e)||t}function er(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function zt(e,t,n){return mt(e,dn(t,n))}function ba(e,t,n){var r=zt(e,t,n);return r>n?n:r}function li(){return{top:0,right:0,bottom:0,left:0}}function ci(e){return Object.assign({},li(),e)}function di(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ga=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,ci(typeof t!="number"?t:di(t,Kt))};function va(e){var t,n=e.state,r=e.name,s=e.options,l=n.elements.arrow,i=n.modifiersData.popperOffsets,a=Fe(n.placement),c=er(a),d=[Re,Ke].indexOf(a)>=0,u=d?"height":"width";if(!(!l||!i)){var f=ga(s.padding,n),b=wn(l),p=c==="y"?Ve:Re,g=c==="y"?Qe:Ke,v=n.rects.reference[u]+n.rects.reference[c]-i[c]-n.rects.popper[u],_=i[c]-n.rects.reference[c],y=Yt(l),C=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,S=v/2-_/2,h=f[p],I=C-b[u]-f[g],j=C/2-b[u]/2+S,W=zt(h,j,I),V=c;n.modifiersData[r]=(t={},t[V]=W,t.centerOffset=W-j,t)}}function ya(e){var t=e.state,n=e.options,r=n.element,s=r===void 0?"[data-popper-arrow]":r;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||oi(t.elements.popper,s)&&(t.elements.arrow=s))}var xa={name:"arrow",enabled:!0,phase:"main",fn:va,effect:ya,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Mt(e){return e.split("-")[1]}var Sa={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ja(e,t){var n=e.x,r=e.y,s=t.devicePixelRatio||1;return{x:At(n*s)/s||0,y:At(r*s)/s||0}}function Er(e){var t,n=e.popper,r=e.popperRect,s=e.placement,l=e.variation,i=e.offsets,a=e.position,c=e.gpuAcceleration,d=e.adaptive,u=e.roundOffsets,f=e.isFixed,b=i.x,p=b===void 0?0:b,g=i.y,v=g===void 0?0:g,_=typeof u=="function"?u({x:p,y:v}):{x:p,y:v};p=_.x,v=_.y;var y=i.hasOwnProperty("x"),C=i.hasOwnProperty("y"),S=Re,h=Ve,I=window;if(d){var j=Yt(n),W="clientHeight",V="clientWidth";if(j===Be(n)&&(j=ut(n),rt(j).position!=="static"&&a==="absolute"&&(W="scrollHeight",V="scrollWidth")),j=j,s===Ve||(s===Re||s===Ke)&&l===$t){h=Qe;var T=f&&j===I&&I.visualViewport?I.visualViewport.height:j[W];v-=T-r.height,v*=c?1:-1}if(s===Re||(s===Ve||s===Qe)&&l===$t){S=Ke;var A=f&&j===I&&I.visualViewport?I.visualViewport.width:j[V];p-=A-r.width,p*=c?1:-1}}var z=Object.assign({position:a},d&&Sa),k=u===!0?ja({x:p,y:v},Be(n)):{x:p,y:v};if(p=k.x,v=k.y,c){var P;return Object.assign({},z,(P={},P[h]=C?"0":"",P[S]=y?"0":"",P.transform=(I.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",P))}return Object.assign({},z,(t={},t[h]=C?v+"px":"",t[S]=y?p+"px":"",t.transform="",t))}function _a(e){var t=e.state,n=e.options,r=n.gpuAcceleration,s=r===void 0?!0:r,l=n.adaptive,i=l===void 0?!0:l,a=n.roundOffsets,c=a===void 0?!0:a,d={placement:Fe(t.placement),variation:Mt(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Er(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Er(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Ia={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_a,data:{}},tn={passive:!0};function Ea(e){var t=e.state,n=e.instance,r=e.options,s=r.scroll,l=s===void 0?!0:s,i=r.resize,a=i===void 0?!0:i,c=Be(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return l&&d.forEach(function(u){u.addEventListener("scroll",n.update,tn)}),a&&c.addEventListener("resize",n.update,tn),function(){l&&d.forEach(function(u){u.removeEventListener("scroll",n.update,tn)}),a&&c.removeEventListener("resize",n.update,tn)}}var Ta={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ea,data:{}},Oa={left:"right",right:"left",bottom:"top",top:"bottom"};function ln(e){return e.replace(/left|right|bottom|top/g,function(t){return Oa[t]})}var Ca={start:"end",end:"start"};function Tr(e){return e.replace(/start|end/g,function(t){return Ca[t]})}function tr(e){var t=Be(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function nr(e){return Pt(ut(e)).left+tr(e).scrollLeft}function Aa(e,t){var n=Be(e),r=ut(e),s=n.visualViewport,l=r.clientWidth,i=r.clientHeight,a=0,c=0;if(s){l=s.width,i=s.height;var d=ai();(d||!d&&t==="fixed")&&(a=s.offsetLeft,c=s.offsetTop)}return{width:l,height:i,x:a+nr(e),y:c}}function Pa(e){var t,n=ut(e),r=tr(e),s=(t=e.ownerDocument)==null?void 0:t.body,l=mt(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),i=mt(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-r.scrollLeft+nr(e),c=-r.scrollTop;return rt(s||n).direction==="rtl"&&(a+=mt(n.clientWidth,s?s.clientWidth:0)-l),{width:l,height:i,x:a,y:c}}function rr(e){var t=rt(e),n=t.overflow,r=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+r)}function ui(e){return["html","body","#document"].indexOf(we(e))>=0?e.ownerDocument.body:Ge(e)&&rr(e)?e:ui(bn(e))}function Ht(e,t){var n;t===void 0&&(t=[]);var r=ui(e),s=r===((n=e.ownerDocument)==null?void 0:n.body),l=Be(r),i=s?[l].concat(l.visualViewport||[],rr(r)?r:[]):r,a=t.concat(i);return s?a:a.concat(Ht(bn(i)))}function Nn(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ma(e,t){var n=Pt(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Or(e,t,n){return t===ri?Nn(Aa(e,n)):xt(t)?Ma(t,n):Nn(Pa(ut(e)))}function Wa(e){var t=Ht(bn(e)),n=["absolute","fixed"].indexOf(rt(e).position)>=0,r=n&&Ge(e)?Yt(e):e;return xt(r)?t.filter(function(s){return xt(s)&&oi(s,r)&&we(s)!=="body"}):[]}function La(e,t,n,r){var s=t==="clippingParents"?Wa(e):[].concat(t),l=[].concat(s,[n]),i=l[0],a=l.reduce(function(c,d){var u=Or(e,d,r);return c.top=mt(u.top,c.top),c.right=dn(u.right,c.right),c.bottom=dn(u.bottom,c.bottom),c.left=mt(u.left,c.left),c},Or(e,i,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function pi(e){var t=e.reference,n=e.element,r=e.placement,s=r?Fe(r):null,l=r?Mt(r):null,i=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,c;switch(s){case Ve:c={x:i,y:t.y-n.height};break;case Qe:c={x:i,y:t.y+t.height};break;case Ke:c={x:t.x+t.width,y:a};break;case Re:c={x:t.x-n.width,y:a};break;default:c={x:t.x,y:t.y}}var d=s?er(s):null;if(d!=null){var u=d==="y"?"height":"width";switch(l){case Ct:c[d]=c[d]-(t[u]/2-n[u]/2);break;case $t:c[d]=c[d]+(t[u]/2-n[u]/2);break}}return c}function Ut(e,t){t===void 0&&(t={});var n=t,r=n.placement,s=r===void 0?e.placement:r,l=n.strategy,i=l===void 0?e.strategy:l,a=n.boundary,c=a===void 0?ea:a,d=n.rootBoundary,u=d===void 0?ri:d,f=n.elementContext,b=f===void 0?Lt:f,p=n.altBoundary,g=p===void 0?!1:p,v=n.padding,_=v===void 0?0:v,y=ci(typeof _!="number"?_:di(_,Kt)),C=b===Lt?ta:Lt,S=e.rects.popper,h=e.elements[g?C:b],I=La(xt(h)?h:h.contextElement||ut(e.elements.popper),c,u,i),j=Pt(e.elements.reference),W=pi({reference:j,element:S,strategy:"absolute",placement:s}),V=Nn(Object.assign({},S,W)),T=b===Lt?V:j,A={top:I.top-T.top+y.top,bottom:T.bottom-I.bottom+y.bottom,left:I.left-T.left+y.left,right:T.right-I.right+y.right},z=e.modifiersData.offset;if(b===Lt&&z){var k=z[s];Object.keys(A).forEach(function(P){var M=[Ke,Qe].indexOf(P)>=0?1:-1,L=[Ve,Qe].indexOf(P)>=0?"y":"x";A[P]+=k[L]*M})}return A}function ka(e,t){t===void 0&&(t={});var n=t,r=n.placement,s=n.boundary,l=n.rootBoundary,i=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?ii:c,u=Mt(r),f=u?a?_r:_r.filter(function(g){return Mt(g)===u}):Kt,b=f.filter(function(g){return d.indexOf(g)>=0});b.length===0&&(b=f);var p=b.reduce(function(g,v){return g[v]=Ut(e,{placement:v,boundary:s,rootBoundary:l,padding:i})[Fe(v)],g},{});return Object.keys(p).sort(function(g,v){return p[g]-p[v]})}function Va(e){if(Fe(e)===Zn)return[];var t=ln(e);return[Tr(e),t,Tr(t)]}function Ra(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var s=n.mainAxis,l=s===void 0?!0:s,i=n.altAxis,a=i===void 0?!0:i,c=n.fallbackPlacements,d=n.padding,u=n.boundary,f=n.rootBoundary,b=n.altBoundary,p=n.flipVariations,g=p===void 0?!0:p,v=n.allowedAutoPlacements,_=t.options.placement,y=Fe(_),C=y===_,S=c||(C||!g?[ln(_)]:Va(_)),h=[_].concat(S).reduce(function(q,Q){return q.concat(Fe(Q)===Zn?ka(t,{placement:Q,boundary:u,rootBoundary:f,padding:d,flipVariations:g,allowedAutoPlacements:v}):Q)},[]),I=t.rects.reference,j=t.rects.popper,W=new Map,V=!0,T=h[0],A=0;A<h.length;A++){var z=h[A],k=Fe(z),P=Mt(z)===Ct,M=[Ve,Qe].indexOf(k)>=0,L=M?"width":"height",U=Ut(t,{placement:z,boundary:u,rootBoundary:f,altBoundary:b,padding:d}),Z=M?P?Ke:Re:P?Qe:Ve;I[L]>j[L]&&(Z=ln(Z));var w=ln(Z),ee=[];if(l&&ee.push(U[k]<=0),a&&ee.push(U[Z]<=0,U[w]<=0),ee.every(function(q){return q})){T=z,V=!1;break}W.set(z,ee)}if(V)for(var le=g?3:1,Ee=function(Q){var X=h.find(function(se){var ae=W.get(se);if(ae)return ae.slice(0,Q).every(function(be){return be})});if(X)return T=X,"break"},G=le;G>0;G--){var B=Ee(G);if(B==="break")break}t.placement!==T&&(t.modifiersData[r]._skip=!0,t.placement=T,t.reset=!0)}}var za={name:"flip",enabled:!0,phase:"main",fn:Ra,requiresIfExists:["offset"],data:{_skip:!1}};function Cr(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ar(e){return[Ve,Ke,Qe,Re].some(function(t){return e[t]>=0})}function Ha(e){var t=e.state,n=e.name,r=t.rects.reference,s=t.rects.popper,l=t.modifiersData.preventOverflow,i=Ut(t,{elementContext:"reference"}),a=Ut(t,{altBoundary:!0}),c=Cr(i,r),d=Cr(a,s,l),u=Ar(c),f=Ar(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}var Na={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ha};function Ba(e,t,n){var r=Fe(e),s=[Re,Ve].indexOf(r)>=0?-1:1,l=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=l[0],a=l[1];return i=i||0,a=(a||0)*s,[Re,Ke].indexOf(r)>=0?{x:a,y:i}:{x:i,y:a}}function $a(e){var t=e.state,n=e.options,r=e.name,s=n.offset,l=s===void 0?[0,0]:s,i=ii.reduce(function(u,f){return u[f]=Ba(f,t.rects,l),u},{}),a=i[t.placement],c=a.x,d=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=i}var Ua={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:$a};function qa(e){var t=e.state,n=e.name;t.modifiersData[n]=pi({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Ga={name:"popperOffsets",enabled:!0,phase:"read",fn:qa,data:{}};function Qa(e){return e==="x"?"y":"x"}function Ka(e){var t=e.state,n=e.options,r=e.name,s=n.mainAxis,l=s===void 0?!0:s,i=n.altAxis,a=i===void 0?!1:i,c=n.boundary,d=n.rootBoundary,u=n.altBoundary,f=n.padding,b=n.tether,p=b===void 0?!0:b,g=n.tetherOffset,v=g===void 0?0:g,_=Ut(t,{boundary:c,rootBoundary:d,padding:f,altBoundary:u}),y=Fe(t.placement),C=Mt(t.placement),S=!C,h=er(y),I=Qa(h),j=t.modifiersData.popperOffsets,W=t.rects.reference,V=t.rects.popper,T=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,A=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),z=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(j){if(l){var P,M=h==="y"?Ve:Re,L=h==="y"?Qe:Ke,U=h==="y"?"height":"width",Z=j[h],w=Z+_[M],ee=Z-_[L],le=p?-V[U]/2:0,Ee=C===Ct?W[U]:V[U],G=C===Ct?-V[U]:-W[U],B=t.elements.arrow,q=p&&B?wn(B):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:li(),X=Q[M],se=Q[L],ae=zt(0,W[U],q[U]),be=S?W[U]/2-le-ae-X-A.mainAxis:Ee-ae-X-A.mainAxis,ne=S?-W[U]/2+le+ae+se+A.mainAxis:G+ae+se+A.mainAxis,re=t.elements.arrow&&Yt(t.elements.arrow),Ae=re?h==="y"?re.clientTop||0:re.clientLeft||0:0,Pe=(P=z==null?void 0:z[h])!=null?P:0,H=Z+be-Pe-Ae,Y=Z+ne-Pe,J=zt(p?dn(w,H):w,Z,p?mt(ee,Y):ee);j[h]=J,k[h]=J-Z}if(a){var N,fe=h==="x"?Ve:Re,Se=h==="x"?Qe:Ke,ce=j[I],F=I==="y"?"height":"width",oe=ce+_[fe],Ie=ce-_[Se],je=[Ve,Re].indexOf(y)!==-1,ve=(N=z==null?void 0:z[I])!=null?N:0,$e=je?oe:ce-W[F]-V[F]-ve+A.altAxis,ke=je?ce+W[F]+V[F]-ve-A.altAxis:Ie,st=p&&je?ba($e,ce,ke):zt(p?$e:oe,ce,p?ke:Ie);j[I]=st,k[I]=st-ce}t.modifiersData[r]=k}}var Ya={name:"preventOverflow",enabled:!0,phase:"main",fn:Ka,requiresIfExists:["offset"]};function Ja(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Da(e){return e===Be(e)||!Ge(e)?tr(e):Ja(e)}function Xa(e){var t=e.getBoundingClientRect(),n=At(t.width)/e.offsetWidth||1,r=At(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Za(e,t,n){n===void 0&&(n=!1);var r=Ge(t),s=Ge(t)&&Xa(t),l=ut(t),i=Pt(e,s,n),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((we(t)!=="body"||rr(l))&&(a=Da(t)),Ge(t)?(c=Pt(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):l&&(c.x=nr(l))),{x:i.left+a.scrollLeft-c.x,y:i.top+a.scrollTop-c.y,width:i.width,height:i.height}}function Fa(e){var t=new Map,n=new Set,r=[];e.forEach(function(l){t.set(l.name,l)});function s(l){n.add(l.name);var i=[].concat(l.requires||[],l.requiresIfExists||[]);i.forEach(function(a){if(!n.has(a)){var c=t.get(a);c&&s(c)}}),r.push(l)}return e.forEach(function(l){n.has(l.name)||s(l)}),r}function wa(e){var t=Fa(e);return ua.reduce(function(n,r){return n.concat(t.filter(function(s){return s.phase===r}))},[])}function eo(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function to(e){var t=e.reduce(function(n,r){var s=n[r.name];return n[r.name]=s?Object.assign({},s,r,{options:Object.assign({},s.options,r.options),data:Object.assign({},s.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Pr={placement:"bottom",modifiers:[],strategy:"absolute"};function Mr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function no(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,s=t.defaultOptions,l=s===void 0?Pr:s;return function(a,c,d){d===void 0&&(d=l);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Pr,l),modifiersData:{},elements:{reference:a,popper:c},attributes:{},styles:{}},f=[],b=!1,p={state:u,setOptions:function(y){var C=typeof y=="function"?y(u.options):y;v(),u.options=Object.assign({},l,u.options,C),u.scrollParents={reference:xt(a)?Ht(a):a.contextElement?Ht(a.contextElement):[],popper:Ht(c)};var S=wa(to([].concat(r,u.options.modifiers)));return u.orderedModifiers=S.filter(function(h){return h.enabled}),g(),p.update()},forceUpdate:function(){if(!b){var y=u.elements,C=y.reference,S=y.popper;if(Mr(C,S)){u.rects={reference:Za(C,Yt(S),u.options.strategy==="fixed"),popper:wn(S)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(A){return u.modifiersData[A.name]=Object.assign({},A.data)});for(var h=0;h<u.orderedModifiers.length;h++){if(u.reset===!0){u.reset=!1,h=-1;continue}var I=u.orderedModifiers[h],j=I.fn,W=I.options,V=W===void 0?{}:W,T=I.name;typeof j=="function"&&(u=j({state:u,options:V,name:T,instance:p})||u)}}}},update:eo(function(){return new Promise(function(_){p.forceUpdate(),_(u)})}),destroy:function(){v(),b=!0}};if(!Mr(a,c))return p;p.setOptions(d).then(function(_){!b&&d.onFirstUpdate&&d.onFirstUpdate(_)});function g(){u.orderedModifiers.forEach(function(_){var y=_.name,C=_.options,S=C===void 0?{}:C,h=_.effect;if(typeof h=="function"){var I=h({state:u,name:y,instance:p,options:S}),j=function(){};f.push(I||j)}})}function v(){f.forEach(function(_){return _()}),f=[]}return p}}var ro=[Ta,Ga,Ia,si,Ua,za,Ya,xa,Na],io=no({defaultModifiers:ro}),so="tippy-box",fi="tippy-content",hi="tippy-backdrop",mi="tippy-arrow",bi="tippy-svg-arrow",ft={passive:!0,capture:!0},gi=function(){return document.body};function In(e,t,n){if(Array.isArray(e)){var r=e[t];return r==null?Array.isArray(n)?n[t]:n:r}return e}function ir(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function vi(e,t){return typeof e=="function"?e.apply(void 0,t):e}function Wr(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function ao(e){return e.split(/\s+/).filter(Boolean)}function Et(e){return[].concat(e)}function Lr(e,t){e.indexOf(t)===-1&&e.push(t)}function oo(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function lo(e){return e.split("-")[0]}function un(e){return[].slice.call(e)}function kr(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Ot(){return document.createElement("div")}function gn(e){return["Element","Fragment"].some(function(t){return ir(e,t)})}function co(e){return ir(e,"NodeList")}function uo(e){return ir(e,"MouseEvent")}function po(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function fo(e){return gn(e)?[e]:co(e)?un(e):Array.isArray(e)?e:un(document.querySelectorAll(e))}function En(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function qt(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function ho(e){var t,n=Et(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function mo(e,t){var n=t.clientX,r=t.clientY;return e.every(function(s){var l=s.popperRect,i=s.popperState,a=s.props,c=a.interactiveBorder,d=lo(i.placement),u=i.modifiersData.offset;if(!u)return!0;var f=d==="bottom"?u.top.y:0,b=d==="top"?u.bottom.y:0,p=d==="right"?u.left.x:0,g=d==="left"?u.right.x:0,v=l.top-r+f>c,_=r-l.bottom-b>c,y=l.left-n+p>c,C=n-l.right-g>c;return v||_||y||C})}function Tn(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(s){e[r](s,n)})}function Vr(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var De={isTouch:!1},Rr=0;function bo(){De.isTouch||(De.isTouch=!0,window.performance&&document.addEventListener("mousemove",yi))}function yi(){var e=performance.now();e-Rr<20&&(De.isTouch=!1,document.removeEventListener("mousemove",yi)),Rr=e}function go(){var e=document.activeElement;if(po(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function vo(){document.addEventListener("touchstart",bo,ft),window.addEventListener("blur",go)}var yo=typeof window!="undefined"&&typeof document!="undefined",xo=yo?!!window.msCrypto:!1,So={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},jo={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Ye=Object.assign({appendTo:gi,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},So,jo),_o=Object.keys(Ye),Io=function(t){var n=Object.keys(t);n.forEach(function(r){Ye[r]=t[r]})};function xi(e){var t=e.plugins||[],n=t.reduce(function(r,s){var l=s.name,i=s.defaultValue;if(l){var a;r[l]=e[l]!==void 0?e[l]:(a=Ye[l])!=null?a:i}return r},{});return Object.assign({},e,n)}function Eo(e,t){var n=t?Object.keys(xi(Object.assign({},Ye,{plugins:t}))):_o,r=n.reduce(function(s,l){var i=(e.getAttribute("data-tippy-"+l)||"").trim();if(!i)return s;if(l==="content")s[l]=i;else try{s[l]=JSON.parse(i)}catch(a){s[l]=i}return s},{});return r}function zr(e,t){var n=Object.assign({},t,{content:vi(t.content,[e])},t.ignoreAttributes?{}:Eo(e,t.plugins));return n.aria=Object.assign({},Ye.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}var To=function(){return"innerHTML"};function Bn(e,t){e[To()]=t}function Hr(e){var t=Ot();return e===!0?t.className=mi:(t.className=bi,gn(e)?t.appendChild(e):Bn(t,e)),t}function Nr(e,t){gn(t.content)?(Bn(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?Bn(e,t.content):e.textContent=t.content)}function pn(e){var t=e.firstElementChild,n=un(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(fi)}),arrow:n.find(function(r){return r.classList.contains(mi)||r.classList.contains(bi)}),backdrop:n.find(function(r){return r.classList.contains(hi)})}}function Si(e){var t=Ot(),n=Ot();n.className=so,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Ot();r.className=fi,r.setAttribute("data-state","hidden"),Nr(r,e.props),t.appendChild(n),n.appendChild(r),s(e.props,e.props);function s(l,i){var a=pn(t),c=a.box,d=a.content,u=a.arrow;i.theme?c.setAttribute("data-theme",i.theme):c.removeAttribute("data-theme"),typeof i.animation=="string"?c.setAttribute("data-animation",i.animation):c.removeAttribute("data-animation"),i.inertia?c.setAttribute("data-inertia",""):c.removeAttribute("data-inertia"),c.style.maxWidth=typeof i.maxWidth=="number"?i.maxWidth+"px":i.maxWidth,i.role?c.setAttribute("role",i.role):c.removeAttribute("role"),(l.content!==i.content||l.allowHTML!==i.allowHTML)&&Nr(d,e.props),i.arrow?u?l.arrow!==i.arrow&&(c.removeChild(u),c.appendChild(Hr(i.arrow))):c.appendChild(Hr(i.arrow)):u&&c.removeChild(u)}return{popper:t,onUpdate:s}}Si.$$tippy=!0;var Oo=1,nn=[],On=[];function Co(e,t){var n=zr(e,Object.assign({},Ye,xi(kr(t)))),r,s,l,i=!1,a=!1,c=!1,d=!1,u,f,b,p=[],g=Wr(H,n.interactiveDebounce),v,_=Oo++,y=null,C=oo(n.plugins),S={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},h={id:_,reference:e,popper:Ot(),popperInstance:y,props:n,state:S,plugins:C,clearDelayTimeouts:$e,setProps:ke,setContent:st,show:Xt,hide:Te,hideWithInteractivity:qi,enable:je,disable:ve,unmount:Gi,destroy:Qi};if(!n.render)return h;var I=n.render(h),j=I.popper,W=I.onUpdate;j.setAttribute("data-tippy-root",""),j.id="tippy-"+h.id,h.popper=j,e._tippy=h,j._tippy=h;var V=C.map(function(x){return x.fn(h)}),T=e.hasAttribute("aria-expanded");return re(),le(),Z(),w("onCreate",[h]),n.showOnCreate&&oe(),j.addEventListener("mouseenter",function(){h.props.interactive&&h.state.isVisible&&h.clearDelayTimeouts()}),j.addEventListener("mouseleave",function(){h.props.interactive&&h.props.trigger.indexOf("mouseenter")>=0&&M().addEventListener("mousemove",g)}),h;function A(){var x=h.props.touch;return Array.isArray(x)?x:[x,0]}function z(){return A()[0]==="hold"}function k(){var x;return!!((x=h.props.render)!=null&&x.$$tippy)}function P(){return v||e}function M(){var x=P().parentNode;return x?ho(x):document}function L(){return pn(j)}function U(x){return h.state.isMounted&&!h.state.isVisible||De.isTouch||u&&u.type==="focus"?0:In(h.props.delay,x?0:1,Ye.delay)}function Z(x){x===void 0&&(x=!1),j.style.pointerEvents=h.props.interactive&&!x?"":"none",j.style.zIndex=""+h.props.zIndex}function w(x,R,K){if(K===void 0&&(K=!0),V.forEach(function(ie){ie[x]&&ie[x].apply(ie,R)}),K){var de;(de=h.props)[x].apply(de,R)}}function ee(){var x=h.props.aria;if(x.content){var R="aria-"+x.content,K=j.id,de=Et(h.props.triggerTarget||e);de.forEach(function(ie){var Me=ie.getAttribute(R);if(h.state.isVisible)ie.setAttribute(R,Me?Me+" "+K:K);else{var Ue=Me&&Me.replace(K,"").trim();Ue?ie.setAttribute(R,Ue):ie.removeAttribute(R)}})}}function le(){if(!(T||!h.props.aria.expanded)){var x=Et(h.props.triggerTarget||e);x.forEach(function(R){h.props.interactive?R.setAttribute("aria-expanded",h.state.isVisible&&R===P()?"true":"false"):R.removeAttribute("aria-expanded")})}}function Ee(){M().removeEventListener("mousemove",g),nn=nn.filter(function(x){return x!==g})}function G(x){if(!(De.isTouch&&(c||x.type==="mousedown"))){var R=x.composedPath&&x.composedPath()[0]||x.target;if(!(h.props.interactive&&Vr(j,R))){if(Et(h.props.triggerTarget||e).some(function(K){return Vr(K,R)})){if(De.isTouch||h.state.isVisible&&h.props.trigger.indexOf("click")>=0)return}else w("onClickOutside",[h,x]);h.props.hideOnClick===!0&&(h.clearDelayTimeouts(),h.hide(),a=!0,setTimeout(function(){a=!1}),h.state.isMounted||X())}}}function B(){c=!0}function q(){c=!1}function Q(){var x=M();x.addEventListener("mousedown",G,!0),x.addEventListener("touchend",G,ft),x.addEventListener("touchstart",q,ft),x.addEventListener("touchmove",B,ft)}function X(){var x=M();x.removeEventListener("mousedown",G,!0),x.removeEventListener("touchend",G,ft),x.removeEventListener("touchstart",q,ft),x.removeEventListener("touchmove",B,ft)}function se(x,R){be(x,function(){!h.state.isVisible&&j.parentNode&&j.parentNode.contains(j)&&R()})}function ae(x,R){be(x,R)}function be(x,R){var K=L().box;function de(ie){ie.target===K&&(Tn(K,"remove",de),R())}if(x===0)return R();Tn(K,"remove",f),Tn(K,"add",de),f=de}function ne(x,R,K){K===void 0&&(K=!1);var de=Et(h.props.triggerTarget||e);de.forEach(function(ie){ie.addEventListener(x,R,K),p.push({node:ie,eventType:x,handler:R,options:K})})}function re(){z()&&(ne("touchstart",Pe,{passive:!0}),ne("touchend",Y,{passive:!0})),ao(h.props.trigger).forEach(function(x){if(x!=="manual")switch(ne(x,Pe),x){case"mouseenter":ne("mouseleave",Y);break;case"focus":ne(xo?"focusout":"blur",J);break;case"focusin":ne("focusout",J);break}})}function Ae(){p.forEach(function(x){var R=x.node,K=x.eventType,de=x.handler,ie=x.options;R.removeEventListener(K,de,ie)}),p=[]}function Pe(x){var R,K=!1;if(!(!h.state.isEnabled||N(x)||a)){var de=((R=u)==null?void 0:R.type)==="focus";u=x,v=x.currentTarget,le(),!h.state.isVisible&&uo(x)&&nn.forEach(function(ie){return ie(x)}),x.type==="click"&&(h.props.trigger.indexOf("mouseenter")<0||i)&&h.props.hideOnClick!==!1&&h.state.isVisible?K=!0:oe(x),x.type==="click"&&(i=!K),K&&!de&&Ie(x)}}function H(x){var R=x.target,K=P().contains(R)||j.contains(R);if(!(x.type==="mousemove"&&K)){var de=F().concat(j).map(function(ie){var Me,Ue=ie._tippy,St=(Me=Ue.popperInstance)==null?void 0:Me.state;return St?{popperRect:ie.getBoundingClientRect(),popperState:St,props:n}:null}).filter(Boolean);mo(de,x)&&(Ee(),Ie(x))}}function Y(x){var R=N(x)||h.props.trigger.indexOf("click")>=0&&i;if(!R){if(h.props.interactive){h.hideWithInteractivity(x);return}Ie(x)}}function J(x){h.props.trigger.indexOf("focusin")<0&&x.target!==P()||h.props.interactive&&x.relatedTarget&&j.contains(x.relatedTarget)||Ie(x)}function N(x){return De.isTouch?z()!==x.type.indexOf("touch")>=0:!1}function fe(){Se();var x=h.props,R=x.popperOptions,K=x.placement,de=x.offset,ie=x.getReferenceClientRect,Me=x.moveTransition,Ue=k()?pn(j).arrow:null,St=ie?{getBoundingClientRect:ie,contextElement:ie.contextElement||P()}:e,dr={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Zt){var jt=Zt.state;if(k()){var Ki=L(),Sn=Ki.box;["placement","reference-hidden","escaped"].forEach(function(Ft){Ft==="placement"?Sn.setAttribute("data-placement",jt.placement):jt.attributes.popper["data-popper-"+Ft]?Sn.setAttribute("data-"+Ft,""):Sn.removeAttribute("data-"+Ft)}),jt.attributes.popper={}}}},pt=[{name:"offset",options:{offset:de}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Me}},dr];k()&&Ue&&pt.push({name:"arrow",options:{element:Ue,padding:3}}),pt.push.apply(pt,(R==null?void 0:R.modifiers)||[]),h.popperInstance=io(St,j,Object.assign({},R,{placement:K,onFirstUpdate:b,modifiers:pt}))}function Se(){h.popperInstance&&(h.popperInstance.destroy(),h.popperInstance=null)}function ce(){var x=h.props.appendTo,R,K=P();h.props.interactive&&x===gi||x==="parent"?R=K.parentNode:R=vi(x,[K]),R.contains(j)||R.appendChild(j),h.state.isMounted=!0,fe()}function F(){return un(j.querySelectorAll("[data-tippy-root]"))}function oe(x){h.clearDelayTimeouts(),x&&w("onTrigger",[h,x]),Q();var R=U(!0),K=A(),de=K[0],ie=K[1];De.isTouch&&de==="hold"&&ie&&(R=ie),R?r=setTimeout(function(){h.show()},R):h.show()}function Ie(x){if(h.clearDelayTimeouts(),w("onUntrigger",[h,x]),!h.state.isVisible){X();return}if(!(h.props.trigger.indexOf("mouseenter")>=0&&h.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(x.type)>=0&&i)){var R=U(!1);R?s=setTimeout(function(){h.state.isVisible&&h.hide()},R):l=requestAnimationFrame(function(){h.hide()})}}function je(){h.state.isEnabled=!0}function ve(){h.hide(),h.state.isEnabled=!1}function $e(){clearTimeout(r),clearTimeout(s),cancelAnimationFrame(l)}function ke(x){if(!h.state.isDestroyed){w("onBeforeUpdate",[h,x]),Ae();var R=h.props,K=zr(e,Object.assign({},R,kr(x),{ignoreAttributes:!0}));h.props=K,re(),R.interactiveDebounce!==K.interactiveDebounce&&(Ee(),g=Wr(H,K.interactiveDebounce)),R.triggerTarget&&!K.triggerTarget?Et(R.triggerTarget).forEach(function(de){de.removeAttribute("aria-expanded")}):K.triggerTarget&&e.removeAttribute("aria-expanded"),le(),Z(),W&&W(R,K),h.popperInstance&&(fe(),F().forEach(function(de){requestAnimationFrame(de._tippy.popperInstance.forceUpdate)})),w("onAfterUpdate",[h,x])}}function st(x){h.setProps({content:x})}function Xt(){var x=h.state.isVisible,R=h.state.isDestroyed,K=!h.state.isEnabled,de=De.isTouch&&!h.props.touch,ie=In(h.props.duration,0,Ye.duration);if(!(x||R||K||de)&&!P().hasAttribute("disabled")&&(w("onShow",[h],!1),h.props.onShow(h)!==!1)){if(h.state.isVisible=!0,k()&&(j.style.visibility="visible"),Z(),Q(),h.state.isMounted||(j.style.transition="none"),k()){var Me=L(),Ue=Me.box,St=Me.content;En([Ue,St],0)}b=function(){var pt;if(!(!h.state.isVisible||d)){if(d=!0,j.offsetHeight,j.style.transition=h.props.moveTransition,k()&&h.props.animation){var xn=L(),Zt=xn.box,jt=xn.content;En([Zt,jt],ie),qt([Zt,jt],"visible")}ee(),le(),Lr(On,h),(pt=h.popperInstance)==null||pt.forceUpdate(),w("onMount",[h]),h.props.animation&&k()&&ae(ie,function(){h.state.isShown=!0,w("onShown",[h])})}},ce()}}function Te(){var x=!h.state.isVisible,R=h.state.isDestroyed,K=!h.state.isEnabled,de=In(h.props.duration,1,Ye.duration);if(!(x||R||K)&&(w("onHide",[h],!1),h.props.onHide(h)!==!1)){if(h.state.isVisible=!1,h.state.isShown=!1,d=!1,i=!1,k()&&(j.style.visibility="hidden"),Ee(),X(),Z(!0),k()){var ie=L(),Me=ie.box,Ue=ie.content;h.props.animation&&(En([Me,Ue],de),qt([Me,Ue],"hidden"))}ee(),le(),h.props.animation?k()&&se(de,h.unmount):h.unmount()}}function qi(x){M().addEventListener("mousemove",g),Lr(nn,g),g(x)}function Gi(){h.state.isVisible&&h.hide(),h.state.isMounted&&(Se(),F().forEach(function(x){x._tippy.unmount()}),j.parentNode&&j.parentNode.removeChild(j),On=On.filter(function(x){return x!==h}),h.state.isMounted=!1,w("onHidden",[h]))}function Qi(){h.state.isDestroyed||(h.clearDelayTimeouts(),h.unmount(),Ae(),delete e._tippy,h.state.isDestroyed=!0,w("onDestroy",[h]))}}function Jt(e,t){t===void 0&&(t={});var n=Ye.plugins.concat(t.plugins||[]);vo();var r=Object.assign({},t,{plugins:n}),s=fo(e),l=s.reduce(function(i,a){var c=a&&Co(a,r);return c&&i.push(c),i},[]);return gn(e)?l[0]:l}Jt.defaultProps=Ye;Jt.setDefaultProps=Io;Jt.currentInput=De;Object.assign({},si,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});var Ao={name:"animateFill",defaultValue:!1,fn:function(t){var n;if(!((n=t.props.render)!=null&&n.$$tippy))return{};var r=pn(t.popper),s=r.box,l=r.content,i=t.props.animateFill?Po():null;return{onCreate:function(){i&&(s.insertBefore(i,s.firstElementChild),s.setAttribute("data-animatefill",""),s.style.overflow="hidden",t.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(i){var c=s.style.transitionDuration,d=Number(c.replace("ms",""));l.style.transitionDelay=Math.round(d/10)+"ms",i.style.transitionDuration=c,qt([i],"visible")}},onShow:function(){i&&(i.style.transitionDuration="0ms")},onHide:function(){i&&qt([i],"hidden")}}}};function Po(){var e=Ot();return e.className=hi,qt([e],"hidden"),e}Jt.setDefaultProps({render:Si});function ji(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,l;for(l=0;l<r.length;l++)s=r[l],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}var _i=typeof window!="undefined"&&typeof document!="undefined";function $n(e,t){e&&(typeof e=="function"&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function Br(){return _i&&document.createElement("div")}function Mo(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}function Ii(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(t.hasOwnProperty(n)){if(!Ii(e[n],t[n]))return!1}else return!1;return!0}else return!1}function Wo(e){var t=[];return e.forEach(function(n){t.find(function(r){return Ii(n,r)})||t.push(n)}),t}function Lo(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:Wo([].concat(((n=e.popperOptions)==null?void 0:n.modifiers)||[],((r=t.popperOptions)==null?void 0:r.modifiers)||[]))})})}var Cn=_i?D.useLayoutEffect:D.useEffect;function ko(e){var t=D.useRef();return t.current||(t.current=typeof e=="function"?e():e),t.current}function $r(e,t,n){n.split(/\s+/).forEach(function(r){r&&e.classList[t](r)})}var Vo={name:"className",defaultValue:"",fn:function(t){var n=t.popper.firstElementChild,r=function(){var a;return!!((a=t.props.render)!=null&&a.$$tippy)};function s(){t.props.className&&!r()||$r(n,"add",t.props.className)}function l(){r()&&$r(n,"remove",t.props.className)}return{onCreate:s,onBeforeUpdate:l,onAfterUpdate:s}}};function Ro(e){function t(n){var r=n.children,s=n.content,l=n.visible,i=n.singleton,a=n.render,c=n.reference,d=n.disabled,u=d===void 0?!1:d,f=n.ignoreAttributes,b=f===void 0?!0:f;n.__source,n.__self;var p=ji(n,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),g=l!==void 0,v=i!==void 0,_=D.useState(!1),y=_[0],C=_[1],S=D.useState({}),h=S[0],I=S[1],j=D.useState(),W=j[0],V=j[1],T=ko(function(){return{container:Br(),renders:1}}),A=Object.assign({ignoreAttributes:b},p,{content:T.container});g&&(A.trigger="manual",A.hideOnClick=!1),v&&(u=!0);var z=A,k=A.plugins||[];a&&(z=Object.assign({},A,{plugins:v&&i.data!=null?[].concat(k,[{fn:function(){return{onTrigger:function(U,Z){var w=i.data.children.find(function(ee){var le=ee.instance;return le.reference===Z.currentTarget});U.state.$$activeSingletonInstance=w.instance,V(w.content)}}}}]):k,render:function(){return{popper:T.container}}}));var P=[c].concat(r?[r.type]:[]);return Cn(function(){var M=c;c&&c.hasOwnProperty("current")&&(M=c.current);var L=e(M||T.ref||Br(),Object.assign({},z,{plugins:[Vo].concat(A.plugins||[])}));return T.instance=L,u&&L.disable(),l&&L.show(),v&&i.hook({instance:L,content:s,props:z,setSingletonContent:V}),C(!0),function(){L.destroy(),i==null||i.cleanup(L)}},P),Cn(function(){var M;if(T.renders===1){T.renders++;return}var L=T.instance;L.setProps(Lo(L.props,z)),(M=L.popperInstance)==null||M.forceUpdate(),u?L.disable():L.enable(),g&&(l?L.show():L.hide()),v&&i.hook({instance:L,content:s,props:z,setSingletonContent:V})}),Cn(function(){var M;if(a){var L=T.instance;L.setProps({popperOptions:Object.assign({},L.props.popperOptions,{modifiers:[].concat((((M=L.props.popperOptions)==null?void 0:M.modifiers)||[]).filter(function(U){var Z=U.name;return Z!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Z){var w,ee=Z.state,le=(w=ee.modifiersData)==null?void 0:w.hide;(h.placement!==ee.placement||h.referenceHidden!==(le==null?void 0:le.isReferenceHidden)||h.escaped!==(le==null?void 0:le.hasPopperEscaped))&&I({placement:ee.placement,referenceHidden:le==null?void 0:le.isReferenceHidden,escaped:le==null?void 0:le.hasPopperEscaped}),ee.attributes.popper={}}}])})})}},[h.placement,h.referenceHidden,h.escaped].concat(P)),$.createElement($.Fragment,null,r?D.cloneElement(r,{ref:function(L){T.ref=L,$n(r.ref,L)}}):null,y&&Zi.createPortal(a?a(Mo(h),W,T.instance):s,T.container))}return t}var zo=function(e,t){return D.forwardRef(function(r,s){var l=r.children,i=ji(r,["children"]);return $.createElement(e,Object.assign({},t,i),l?D.cloneElement(l,{ref:function(c){$n(s,c),$n(l.ref,c)}}):null)})},Ho=zo(Ro(Jt)),No=Ho;function Bo({size:e,stroke:t=2}){return o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 30 30",children:[o.jsx("ellipse",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:t,cx:"15",cy:"15",rx:"12.75",ry:"12.85"}),o.jsx("path",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:t,strokeLinecap:"round",d:"M11.3,10.73v0a3.58,3.58,0,0,1,1-2.53l.25-.25a3.56,3.56,0,0,1,5,0h0a3.56,3.56,0,0,1,0,5.05l-1.43,1.43a3.85,3.85,0,0,0-1.13,2.75v2.4"}),o.jsx("line",{fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:t,strokeLinecap:"round",x1:"15",y1:"23.12",x2:"15",y2:"23.12"})]})}function Un({className:e,children:t,width:n="auto",icnSize:r=20}){return o.jsx(No,{animateFill:!0,plugins:[Ao],duration:150,theme:"material",animation:"shift-away",interactive:!0,maxWidth:n,content:t,children:o.jsx("div",{role:"button",tabIndex:"0",className:`popper-icn cp d-in-b ig-c ${e}`,children:o.jsx(Bo,{size:r})})})}const $o=({flow:e,setFlowData:t,edit:n=!1})=>{var a,c,d;const r=Number(n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID),[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsxs("div",{children:[[1,2,3,6].includes(r)&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"":"wdt-200 d-in-b mt-3 mb-3",children:m("Post Types","bit-integrations")}),o.jsx(Un,{width:250,icnSize:17,className:"ml-2 mr-16",children:o.jsxs("div",{className:"txt-body",children:[m("Note","bit-integrations"),":"," ",m('if you have not selected any post type, it will be By default "any post type"',"bit-integrations"),o.jsx("br",{})]})}),o.jsx(E,{className:"msl-wrp-options mt-2",defaultValue:i==null?void 0:i.selectedPostType,options:(c=i==null?void 0:i.types)==null?void 0:c.map(u=>({label:u.title,value:u.id.toString()})),onChange:u=>t(u,"selectedPostType"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),[4,5,7,8,9].includes(r)&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"":"wdt-100 d-in-b mt-3 mb-3",children:m("Post Titles","bit-integrations")}),o.jsx(Un,{width:250,icnSize:17,className:"ml-2 mr-18",children:o.jsxs("div",{className:"txt-body",children:[m("Note","bit-integrations"),":"," ",m('if you have not selected any post title, it will be By default "any post"',"bit-integrations"),o.jsx("br",{})]})}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedPostId,options:(d=i==null?void 0:i.posts)==null?void 0:d.map(u=>({label:u.title,value:u.id.toString()})),onChange:u=>t(u,"selectedPostId"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]})},Uo=(e,t)=>{const n=ge({},`${e.triggered_entity.toLowerCase()}/get/tags`,null,"GET").then(r=>r&&r.success?(t(s=>it(s,l=>{l.flow_details.allTag=r.data})),m("All Groundhogg tags fetched successfully","bit-integrations")):m("Groundhogg tags fetching failed. please try again","bit-integrations"));me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading Tags...")})},qo=({flow:e,setFlowData:t,edit:n=!1})=>{var a,c;const[r,s]=pe(ue),l=n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,i=n?e.flow_details:r==null?void 0:r.triggerData;return D.useEffect(()=>{[2,3].includes(Number(l))&&Uo(e,s)},[]),o.jsxs("div",{children:[(l==="2"||l==="3")&&(i==null?void 0:i.allTag)&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Tag","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedTag,options:(c=i==null?void 0:i.allTag)==null?void 0:c.map(d=>({label:d.tag_name,value:d.tag_id.toString()})),onChange:d=>t(d,"selectedTag"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:`${n?"450px":"400px"}`}})]})}),o.jsx("div",{})]})},Go=({flow:e,setFlowData:t,edit:n=!1})=>{var c,d,u,f,b,p,g,v,_,y,C;const r=n?e.triggered_entity_id:(c=e==null?void 0:e.triggerData)==null?void 0:c.formID,[s,l]=pe(ue),i=(S,h,I=!0)=>{var W,V;const j=O({},e);if(n?j.flow_details[h]=S:j.triggerData[h]=S,h==="selectedCourse")Js(S,j,l,n);else if(h==="selectedLesson"){const T=n?(V=j==null?void 0:j.flow_details)==null?void 0:V.selectedCourse:(W=j==null?void 0:j.triggerData)==null?void 0:W.selectedCourse;I&&Ds(S,T,j,l,n)}else l(O({},j))},a=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsxs(o.Fragment,{children:[r==="1"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Course","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a.selectedCourse,options:(d=a==null?void 0:a.courses)==null?void 0:d.map(S=>({label:S.course_title,value:S.course_id.toString()})),onChange:S=>t(S,"selectedCourse"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="2"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Course","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a==null?void 0:a.unenrollCourse,options:(u=a==null?void 0:a.courses)==null?void 0:u.map(S=>({label:S.course_title,value:S.course_id.toString()})),onChange:S=>t(S,"unenrollCourse"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="3"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Course","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a==null?void 0:a.completeCourse,options:(f=a==null?void 0:a.courses)==null?void 0:f.map(S=>({label:S.course_title,value:S.course_id.toString()})),onChange:S=>t(S,"completeCourse"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(r==="4"||r==="11")&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Course","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a==null?void 0:a.selectedCourse,options:(b=a==null?void 0:a.courses)==null?void 0:b.map(S=>({label:S.course_title,value:S.course_id.toString()})),onChange:S=>i(S,"selectedCourse"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Lesson","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a==null?void 0:a.selectedLesson,options:(p=a==null?void 0:a.lessons)==null?void 0:p.map(S=>({label:S.lesson_title,value:S.lesson_id.toString()})),onChange:S=>i(S,"selectedLesson",!1),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]}),r==="5"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Course","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a==null?void 0:a.selectedCourse,options:(g=a==null?void 0:a.courses)==null?void 0:g.map(S=>({label:S.course_title,value:S.course_id.toString()})),onChange:S=>i(S,"selectedCourse"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Lesson","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a==null?void 0:a.selectedLesson,options:(v=a==null?void 0:a.lessons)==null?void 0:v.map(S=>({label:S.lesson_title,value:S.lesson_id.toString()})),onChange:S=>i(S,"selectedLesson"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Topic","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a==null?void 0:a.selectedTopic,options:(_=a==null?void 0:a.topics)==null?void 0:_.map(S=>({label:S.topic_title,value:S.topic_id.toString()})),onChange:S=>t(S,"selectedTopic"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]}),(r==="6"||r==="7"||r==="8")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Quiz","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a==null?void 0:a.selectedQuiz,options:(y=a==null?void 0:a.quizes)==null?void 0:y.map(S=>({label:S.quiz_title,value:S.quiz_id.toString()})),onChange:S=>t(S,"selectedQuiz"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(r==="9"||r==="10")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Group","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a==null?void 0:a.selectedGroup,options:(C=a==null?void 0:a.groups)==null?void 0:C.map(S=>({label:S.group_title,value:S.group_id.toString()})),onChange:S=>t(S,"selectedGroup"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]})},Qo=({flow:e,setFlowData:t,edit:n=!1})=>{var c,d;const r=n?e.triggered_entity_id:(c=e==null?void 0:e.triggerData)==null?void 0:c.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData,a=(u,f,b=!0)=>{const p=it(e,g=>{n?g.flow_details[f]=u:g.triggerData[f]=u});f==="selectedVariableProduct"&&r==="20"?Xs(u,p,l,n):l(p)};return o.jsxs("div",{children:[(r==="10"||r==="19")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Product","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedProduct,options:(d=i==null?void 0:i.products)==null?void 0:d.map(u=>({label:u.product_title,value:u.product_id.toString()})),onChange:u=>t(u,"selectedProduct"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="11"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a order status","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedOrderStatus,options:(i==null?void 0:i.orderStatus)&&Object.entries(i.orderStatus).map(([u,f])=>({label:f,value:u.toString()})),onChange:u=>t(u,"selectedOrderStatus"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="17"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a categories","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedProductCategory,options:(i==null?void 0:i.allProductCategories)&&i.allProductCategories.map(u=>({label:u.name,value:u.term_id.toString()})),onChange:u=>t(u,"selectedProductCategory"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="20"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a variable product","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedVariableProduct,options:(i==null?void 0:i.allVariableProduct)&&i.allVariableProduct.map(u=>({label:u.product_title,value:u.product_id.toString()})),onChange:u=>a(u,"selectedVariableProduct"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(i==null?void 0:i.selectedVariableProduct)&&r==="20"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a variation","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedVariation,options:(i==null?void 0:i.allVariation)&&i.allVariation.map(u=>({label:u.variation_title,value:u.variation_id.toString()})),onChange:u=>t(u,"selectedVariation"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),o.jsx("div",{})]})},Ko=({flow:e,setFlowData:t,edit:n=!1})=>{var c,d,u,f;const r=n?e.triggered_entity_id:(c=e==null?void 0:e.triggerData)==null?void 0:c.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData,a=(b,p,g=!0)=>{const v=it(e,_=>{n?_.flow_details[p]=b:_.triggerData[p]=b});p==="selectedForum"&&r==="4"?Qs(b,v,l,n):l(v)};return o.jsxs(o.Fragment,{children:[(r==="3"||r==="4")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Forum","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedForum,options:(d=i==null?void 0:i.forums)==null?void 0:d.map(b=>({label:b.forum_title,value:b.forum_id.toString()})),onChange:b=>a(b,"selectedForum"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="4"&&(i==null?void 0:i.topics)&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Topic","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedTopic,options:(u=i==null?void 0:i.topics)==null?void 0:u.map(b=>({label:b.topic_title,value:b.topic_id.toString()})),onChange:b=>t(b,"selectedTopic"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(r==="9"||r==="10"||r==="11"||r==="12"||r==="13")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Group","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedGroup,options:(f=i==null?void 0:i.groups)==null?void 0:f.map(b=>({label:b.group_title,value:b.group_id.toString()})),onChange:b=>t(b,"selectedGroup"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]})},Yo=({flow:e,setFlowData:t,edit:n=!1})=>{var a,c;n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null||a.formID;const[r,s]=pe(ue),l=(d,u,f=!0)=>{const b=O({},e);n?b.flow_details[u]=d:b.triggerData[u]=d,s(O({},b))},i=n?e.flow_details:r==null?void 0:r.triggerData;return o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Membership","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedMembership,options:(c=i==null?void 0:i.allMembership)==null?void 0:c.map(d=>({label:d.level_name,value:d.level_id.toString()})),onChange:d=>l(d,"selectedMembership"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})},Jo=({flow:e,setFlowData:t,edit:n=!1})=>{var a,c;const r=n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsx("div",{children:(r==="4"||r==="5"||r==="3")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Type","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedType,options:(c=i==null?void 0:i.allType)==null?void 0:c.map(d=>({label:d.type_name,value:d.type_id.toString()})),onChange:d=>t(d,"selectedType"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})})},Do=({flow:e,setFlowData:t,edit:n=!1})=>{var c,d,u,f,b;const r=n?e.triggered_entity_id:(c=e==null?void 0:e.triggerData)==null?void 0:c.formID,[s,l]=pe(ue),i=(p,g,v=!0)=>{const _=O({},e);n?_.flow_details[g]=p:_.triggerData[g]=p,g==="selectedRankType"?Ks(p,_,l,n):g==="selectedAchievementType"&&r==="2"?Ys(p,_,l,n):l(O({},_))},a=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsxs(o.Fragment,{children:[r==="1"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Rank Type","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a.selectedRankType,options:(d=a==null?void 0:a.rankTypes)==null?void 0:d.map(p=>({label:p.post_title,value:p.post_name.toString()})),onChange:p=>i(p,"selectedRankType"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Rank","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a==null?void 0:a.selectedRank,options:(u=a==null?void 0:a.ranks)==null?void 0:u.map(p=>({label:p.post_title,value:p.post_name.toString()})),onChange:p=>t(p,"selectedRank"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]}),(r==="2"||r==="3"||r==="5")&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select an achievement type","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a.selectedAchievementType,options:(f=a==null?void 0:a.achievementTypes)==null?void 0:f.map(p=>({label:p.post_title,value:p.post_name.toString()})),onChange:p=>i(p,"selectedAchievementType"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="2"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select an award","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a==null?void 0:a.selectedAward,options:(b=a==null?void 0:a.awards)==null?void 0:b.map(p=>({label:p.post_title,value:p.post_name.toString()})),onChange:p=>t(p,"selectedAward"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]}),r==="6"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Enter Point","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:a==null?void 0:a.selectedPoint,placeholder:"Leave empty for any amount of points.",customValue:!0,onChange:p=>t(p,"selectedPoint"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]})},Xo=({flow:e,setFlowData:t,edit:n=!1})=>{var a,c;const r=Number(n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID),[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsx("div",{children:[1,2].includes(r)&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"mr-24":"wdt-200 d-in-b mt-3 mb-3",children:m("Post Types","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options mt-2",defaultValue:i==null?void 0:i.selectedPostType,options:(c=i==null?void 0:i.types)==null?void 0:c.map(d=>({label:d.title,value:d.id.toString()})),onChange:d=>t(d,"selectedPostType"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:450}})]}),o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"mr-24":"wdt-200 d-in-b mt-3 mb-3",children:m("Meta key","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options mt-2",defaultValue:i==null?void 0:i.selectedMetaKey,onChange:d=>t(d,"selectedMetaKey"),customValue:!0,singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:450}})]}),r===2&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"mr-24":"wdt-200 d-in-b mt-3 mb-3",children:m("Meta value","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options mt-2",defaultValue:i==null?void 0:i.selectedMetaValue,onChange:d=>t(d,"selectedMetaValue"),customValue:!0,singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:450}})]})]})})},Zo=({flow:e,setFlowData:t,edit:n=!1})=>{var a,c,d,u;const r=n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsxs(o.Fragment,{children:[r==="1"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select life time membership","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedOneTimeMembership,options:(c=i==null?void 0:i.oneTimeMembership)==null?void 0:c.map(f=>({label:f.membershipTitle,value:f.membershipId.toString()})),onChange:f=>t(f,"selectedOneTimeMembership"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(r==="2"||r==="5")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a recurring membership","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedRecurringMembership,options:(d=i==null?void 0:i.recurringMembership)==null?void 0:d.map(f=>({label:f.membershipTitle,value:f.membershipId.toString()})),onChange:f=>t(f,"selectedRecurringMembership"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(r==="3"||r==="4")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a membership","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedCancelMembership,options:(u=i==null?void 0:i.allMemberships)==null?void 0:u.map(f=>({label:f.membershipTitle,value:f.membershipId.toString()})),onChange:f=>t(f,"selectedCancelMembership"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]})},Fo=({flow:e,setFlowData:t,edit:n=!1})=>{var a,c;const r=n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsx("div",{children:r&&r!=5&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select membership","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedMembershipLevel,options:(c=i==null?void 0:i.AllMembershipLevels)==null?void 0:c.map(d=>({label:d.membershipTitle,value:d.membershipId.toString()})),onChange:d=>t(d,"selectedMembershipLevel"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})})},wo=({flow:e,setFlowData:t,edit:n=!1})=>{var a,c;const r=n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsx("div",{children:r==="2"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a commission type","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedCommissionType,options:(c=i==null?void 0:i.AllCommissionType)==null?void 0:c.map(d=>({label:d.type_label,value:d.type_id.toString()})),onChange:d=>t(d,"selectedCommissionType"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})})},el=({flow:e,setFlowData:t,edit:n=!1})=>{var a,c;const r=n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsx("div",{children:(r==="1"||r==="2"||r==="3")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Product","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedProduct,options:(c=i==null?void 0:i.allProduct)==null?void 0:c.map(d=>{var u;return{label:d==null?void 0:d.product_name,value:(u=d==null?void 0:d.product_id)==null?void 0:u.toString()}}),onChange:d=>t(d,"selectedProduct"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})})},tl=({flow:e,setFlowData:t,edit:n=!1})=>{var a,c,d;const r=n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsxs("div",{children:[(r==="1"||r==="*")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Donation Form","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedDonationForm,options:(c=i==null?void 0:i.allDonationForms)==null?void 0:c.map(u=>({label:u.post_title,value:u.ID.toString()})),onChange:u=>t(u,"selectedDonationForm"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="2"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Recurring Donation Form","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedRecurringDonationForm,options:(d=i==null?void 0:i.allRecurringForms)==null?void 0:d.map(u=>({label:u.post_title,value:u.ID.toString()})),onChange:u=>t(u,"selectedRecurringDonationForm"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]})},nl=({flow:e,setFlowData:t,edit:n=!1})=>{var c,d,u,f,b;const r=n?e.triggered_entity_id:(c=e==null?void 0:e.triggerData)==null?void 0:c.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData,a=(p,g,v=!0)=>{const _=it(e,y=>{n?y.flow_details[g]=p:y.triggerData[g]=p});g==="selectedForum"&&r==="4"?getTopicByForum(p,_,l,n):l(_)};return o.jsxs(o.Fragment,{children:[(r==="1"||r==="2"||r==="3")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a quiz","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedQuiz,options:(d=i==null?void 0:i.allQuiz)==null?void 0:d.map(p=>({label:p.post_title,value:p.ID.toString()})),onChange:p=>a(p,"selectedQuiz"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="4"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Lesson","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedLesson,options:(u=i==null?void 0:i.allLesson)==null?void 0:u.map(p=>({label:p.post_title,value:p.ID.toString()})),onChange:p=>t(p,"selectedLesson"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(r==="5"||r==="6"||r==="7")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Course","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedCourse,options:(f=i==null?void 0:i.allCourse)==null?void 0:f.map(p=>({label:p.post_title,value:p.ID.toString()})),onChange:p=>t(p,"selectedCourse"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="8"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Membership","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedMembership,options:(b=i==null?void 0:i.allMembership)==null?void 0:b.map(p=>({label:p.post_title,value:p.ID.toString()})),onChange:p=>t(p,"selectedMembership"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]})},rl=({flow:e,setFlowData:t,edit:n=!1})=>{var c,d,u;const r=n?e.triggered_entity_id:(c=e==null?void 0:e.triggerData)==null?void 0:c.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData,a=(f,b,p=!0)=>{const g=it(e,v=>{n?v.flow_details[b]=f:v.triggerData[b]=f});l(g)};return o.jsxs(o.Fragment,{children:[r==="1"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a product","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedProduct,options:(d=i==null?void 0:i.allProduct)==null?void 0:d.map(f=>({label:f.title,value:f.id.toString()})),onChange:f=>a(f,"selectedProduct"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="2"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a discount code","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedDiscount,options:(u=i==null?void 0:i.allDiscountCode)==null?void 0:u.map(f=>({label:f.title,value:f.id.toString()})),onChange:f=>t(f,"selectedDiscount"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]})},Dc=(e,t)=>{const n=ge(null,"get_masterStudyLms_all_course",null,"GET").then(r=>{if(r&&r.success){const s=O({},e);return s.flow_details.allCourse=r.data,t(O({},s)),m("All MasterStudyLms course fetched successfully","bit-integrations")}return m("MasterStudyLms course fetching failed. please try again","bit-integrations")});me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading course...")})},Xc=(e,t)=>{const n=ge(null,"get_masterStudyLms_all_lesson",null,"GET").then(r=>{if(r&&r.success){const s=O({},e);return s.flow_details.allLesson=r.data,t(O({},s)),m("All MasterStudyLms lesson fetched successfully","bit-integrations")}return m("MasterStudyLms lesson fetching failed. please try again","bit-integrations")});me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading lesson...")})},Zc=(e,t)=>{const n=ge(null,"get_masterStudyLms_all_distribution",null,"GET").then(r=>{if(r&&r.success){const s=O({},e);return s.flow_details.allDistribution=r.data,t(O({},s)),m("All MasterStudyLms Point Distribution fetched successfully","bit-integrations")}return m("MasterStudyLms Point Distribution fetching failed. please try again","bit-integrations")});me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading lesson...")})},il=(e,t,n,r=!1)=>{const l=ge(null,"get_mslms_all_quiz_by_course",{course_id:e},"GET").then(i=>{if(i&&i.success){const a=O({},t);return r?a.flow_details.allQuiz=i.data:a.triggerData.allQuiz=i.data,n(O({},a)),m("Fetched Quiz successfully","bit-integrations")}return m("Quiz fetching failed. please try again","bit-integrations")});me.promise(l,{success:i=>i,error:m("Error Occurred","bit-integrations"),loading:m("Loading Lesson...")})},sl=({flow:e,setFlowData:t,edit:n=!1})=>{var c,d,u,f,b,p;const r=n?e.triggered_entity_id:(c=e==null?void 0:e.triggerData)==null?void 0:c.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData,a=(g,v,_=!0)=>{const y=O({},e);n?y.flow_details[v]=g:y.triggerData[v]=g,v==="selectedCourse"&&(r==="4"||r==="5")?il(g,y,l,n):l(y)};return o.jsxs(o.Fragment,{children:[(r==="1"||r==="3")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Course","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedCourse,options:(d=i==null?void 0:i.allCourse)==null?void 0:d.map(g=>({label:g.title,value:g.id.toString()})),onChange:g=>t(g,"selectedCourse"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="2"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Lesson","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedLesson,options:(u=i==null?void 0:i.allLesson)==null?void 0:u.map(g=>({label:g.title,value:g.id.toString()})),onChange:g=>t(g,"selectedLesson"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(r==="4"||r==="5")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Course","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedCourse,options:(f=i==null?void 0:i.allCourse)==null?void 0:f.map(g=>({label:g.title,value:g.id.toString()})),onChange:g=>a(g,"selectedCourse"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(r==="4"||r==="5")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Quiz","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedQuiz,options:(b=i==null?void 0:i.allQuiz)==null?void 0:b.map(g=>({label:g.title,value:g.id.toString()})),onChange:g=>t(g,"selectedQuiz"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="6"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"d-in-b mt-3 mb-3",children:m("Select Point Distribution","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedDistribution,options:(p=i==null?void 0:i.allDistribution)==null?void 0:p.map(g=>({label:g.title,value:g.id})),onChange:g=>t(g,"selectedDistribution"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]})},al=({flow:e,setFlowData:t,edit:n=!1})=>{var a,c,d,u;const r=n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,[s,l]=pe(ue),i=n?e==null?void 0:e.flow_details:s==null?void 0:s.triggerData;return o.jsxs(o.Fragment,{children:[r==="1"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Course","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedCourse,options:(c=i==null?void 0:i.allCourse)==null?void 0:c.map(f=>({label:f.title,value:f.id.toString()})),onChange:f=>t(f,"selectedCourse"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="2"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Lesson","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedLesson,options:(d=i==null?void 0:i.allLesson)==null?void 0:d.map(f=>({label:f.title,value:f.id.toString()})),onChange:f=>t(f,"selectedLesson"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="3"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a Module","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedModule,options:(u=i==null?void 0:i.allModule)==null?void 0:u.map(f=>({label:f.title,value:f.id.toString()})),onChange:f=>t(f,"selectedModule"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]})},ol=({flow:e,setFlowData:t,edit:n=!1})=>{var a,c;const r=n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsx(o.Fragment,{children:r==="roleSpecificChange"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select a role","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedRole,options:(c=i==null?void 0:i.allRole)==null?void 0:c.map(d=>({label:d.label,value:d.name.toString()})),onChange:d=>t(d,"selectedRole"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})})},ll=({flow:e,setFlowData:t})=>{var r,s,l,i,a,c,d,u,f,b,p,g,v,_;const n=(r=e==null?void 0:e.triggerData)==null?void 0:r.formID;return o.jsxs("div",{children:[(n==="2"||n==="5")&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:m("Select a Quiz","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:(s=e.triggerData)==null?void 0:s.selectedQuiz,options:(i=(l=e==null?void 0:e.triggerData)==null?void 0:l.quizzes)==null?void 0:i.map(y=>({label:y.quiz_title,value:y.quiz_id.toString()})),onChange:y=>t(y,"selectedQuiz"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),n==="3"&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:m("Select a Lesson","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:(a=e.triggerData)==null?void 0:a.selectedLesson,options:(d=(c=e==null?void 0:e.triggerData)==null?void 0:c.lessons)==null?void 0:d.map(y=>({label:y.lesson_title,value:y.lesson_id.toString()})),onChange:y=>t(y,"selectedLesson"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(n==="4"||n==="1")&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:m("Select a Course","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:(u=e.triggerData)==null?void 0:u.selectedCourse,options:(b=(f=e==null?void 0:e.triggerData)==null?void 0:f.courses)==null?void 0:b.map(y=>({label:y.course_title,value:y.course_id.toString()})),onChange:y=>t(y,"selectedCourse"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),n==="5"&&e.triggerData.selectedQuiz&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:m("Select a Condition","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:(p=e.triggerData)==null?void 0:p.selectedCondition,options:(v=(g=e==null?void 0:e.triggerData)==null?void 0:g.percentageCondition)==null?void 0:v.map(y=>({label:y.condition_title,value:y.condition_id.toString()})),onChange:y=>t(y,"selectedCondition"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}}),o.jsx("h4",{children:m("Target Value","bit-integrations")}),o.jsx("input",{className:"btcd-paper-inp w-10 mt-1",onChange:y=>t(y.target.value,"requiredPercent"),name:"requiredPercent",value:(_=e==null?void 0:e.triggerData)==null?void 0:_.requiredPercent,type:"text",placeholder:m("Targeted Percentage Value(ex: 50)","bit-integrations")})]}),o.jsx("div",{})]})},cl=(e,t,n,r)=>{const s=ge({id:t},"fluentbooking/get/fields",null,"POST").then(l=>l&&l.success?(n?r(l.data):e(l.data,"fields"),m("Fetched fields successfully","bit-integrations")):m("Fields fetching failed. please try again","bit-integrations"));me.promise(s,{success:l=>l,error:m("Error Occurred","bit-integrations"),loading:m("Loading fields...")})},Fc=(e,t)=>{const n=ge({id:"fluentbooking"},"fluentbooking/get/form",null,"POST").then(r=>{if(r&&r.success){const s=O({},e);return s.flow_details.events=r.data.events,t(O({},s)),m("Fetched Events successfully","bit-integrations")}return m("Events fetching failed. please try again","bit-integrations")});me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading Events...")})},dl=({flow:e,setFlowData:t,edit:n=!1})=>{var d,u;const r=n?e.triggered_entity_id:(d=e==null?void 0:e.triggerData)==null?void 0:d.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData,a=Yr(Kr),c=f=>{t(f,"selectedEvent"),f?cl(t,f,n,a):n?a([]):t([],"fields")};return o.jsx("div",{children:r&&o.jsxs("div",{className:n?"flx":"",children:[o.jsx("h4",{className:n?"wdt-200":"",children:m("Select a Event","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedEvent,options:(u=i==null?void 0:i.events)==null?void 0:u.map(f=>({label:f.title,value:f.id.toString()})),onChange:f=>c(f),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})})},ul=({flow:e,setFlowData:t,edit:n=!1})=>{var a,c;const r=n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsx("div",{children:r&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsxs("b",{className:n?"wdt-200 d-in-b flx":"flx wdt-200 d-in-b mt-3 mb-3",children:["Select Group",(r==="sureMembers-1"||r==="sureMembers-2")&&o.jsx(Un,{width:250,icnSize:17,className:"ml-2",children:o.jsx("div",{className:"txt-body",children:m("This integration won't work if a group isn't chosen","bit-integrations")})})]}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedGroup,options:(c=i==null?void 0:i.groups)==null?void 0:c.map(d=>({label:d.title,value:d.id.toString()})),onChange:d=>t(d,"selectedGroup"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})})},pl=({flow:e,setFlowData:t,edit:n=!1})=>{var a;const r=n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsxs("div",{children:[r==="wpforo-1"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select Forum","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedForum,options:i==null?void 0:i.forums,onChange:c=>t(c,"selectedForum"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(r==="wpforo-2"||r==="wpforo-3"||r==="wpforo-4"||r==="wpforo-5"||r==="wpforo-6"||r==="wpforo-11")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select Topic","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedTopic,options:i==null?void 0:i.topics,onChange:c=>t(c,"selectedTopic"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(r==="wpforo-7"||r==="wpforo-8"||r==="wpforo-9"||r==="wpforo-10"||r==="wpforo-12")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select User","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedUser,options:i==null?void 0:i.users,onChange:c=>t(c,"selectedUser"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]})},fl=({flow:e,setFlowData:t,edit:n=!1})=>{var a;const r=n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsxs("div",{children:[(r==="wp_job_manager-1"||r==="wp_job_manager-4"||r==="wp_job_manager-5"||r==="wp_job_manager-8"||r==="wp_job_manager-10")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select Job Type:","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedJobType,options:i==null?void 0:i.jobTypes,onChange:c=>t(c,"selectedJobType"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(r==="wp_job_manager-2"||r==="wp_job_manager-3"||r==="wp_job_manager-6"||r==="wp_job_manager-7"||r==="wp_job_manager-11")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select Job:","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedJob,options:i==null?void 0:i.jobList,onChange:c=>t(c,"selectedJob"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),(r==="wp_job_manager-9"||r==="wp_job_manager-10")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:"Select Application Status:"}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedStatus,options:i==null?void 0:i.statusList,onChange:c=>t(c,"selectedStatus"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]})},hl=({flow:e,setFlowData:t,edit:n=!1})=>{var c;const r=n?e.triggered_entity_id:(c=e==null?void 0:e.triggerData)==null?void 0:c.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData,a=[{label:"Any Status",value:"any"},{label:"Active",value:"active"},{label:"On Hold",value:"on-hold"},{label:"Pending",value:"pending"},{label:"Cancelled",value:"cancelled"},{label:"Pending Cancel",value:"pending-cancel"}];return o.jsxs("div",{children:[r&&!["user_subscribes_to_product","user_purchases_variable_subscription"].includes(r)&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select Subscription:","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedSubscription,options:i==null?void 0:i.allSubscriptions,onChange:d=>t(d,"selectedSubscription"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select Product:","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedProduct,options:i==null?void 0:i.allSubscriptionProducts,onChange:d=>t(d,"selectedProduct"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),r==="user_subscription_status_updated"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select Status:","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedStatus,options:a,onChange:d=>t(d,"selectedStatus"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})]})},ml=({flow:e,setFlowData:t,edit:n=!1})=>{var c;const r=n?e.triggered_entity_id:(c=e==null?void 0:e.triggerData)==null?void 0:c.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData,a=[{label:"Any Status",value:"any"},{label:"Unpaid",value:"unpaid"},{label:"Pending Confirmation",value:"pending-confirmation"},{label:"Confirmed",value:"confirmed"},{label:"Paid",value:"paid"},{label:"Complete",value:"complete"},{label:"In Cart",value:"in-cart"},{label:"Cancelled",value:"cancelled"}];return o.jsx("div",{children:r==="booking_status_changed"&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select Status:","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:(i==null?void 0:i.selectedStatus)||"any",options:a,onChange:d=>t(d,"selectedStatus"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})})},bl=({flow:e,setFlowData:t,edit:n=!1})=>{var a;const r=n?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData;return o.jsx("div",{children:(r==="events_calendar-1"||r==="events_calendar-2"||r==="events_calendar-3"||r==="events_calendar-4")&&o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select Event:","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedEvent,options:i==null?void 0:i.events,onChange:c=>t(c,"selectedEvent"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]})})},gl=(e,t,n,r,s)=>{var a;const l=r?e.triggered_entity_id:(a=e==null?void 0:e.triggerData)==null?void 0:a.formID,i=ge({id:n,type:"postType",TaskId:l},"voxel/get/fields",null,"POST").then(c=>c&&c.success?(r?s(c.data):t(c.data,"fields"),m("Fetched fields successfully","bit-integrations")):m("Fields fetching failed. please try again","bit-integrations"));me.promise(i,{success:c=>c,error:m("Error Occurred","bit-integrations"),loading:m("Loading fields...")})},wc=(e,t)=>{const n=ge(null,"voxel/get/post-types",null,"GET").then(r=>{if(r&&r.success){const s=O({},e);return s.flow_details.postTypes=r.data,s.flow_details.selectedPostType="",t(O({},s)),m("Fetched post types successfully","bit-integrations")}return m("Post types fetching failed. please try again","bit-integrations")});me.promise(n,{success:r=>r,error:m("Error Occurred","bit-integrations"),loading:m("Loading post types...")})},vl=({flow:e,setFlowData:t,edit:n=!1})=>{var d;const r=n?e.triggered_entity_id:(d=e==null?void 0:e.triggerData)==null?void 0:d.formID,[s,l]=pe(ue),i=n?e.flow_details:s==null?void 0:s.triggerData,a=Yr(Kr),c=(u,f)=>{t(u,f),u?gl(e,t,u,n,a):n?a([]):t([],"fields")};return o.jsx("div",{children:(r==="voxel-7"||r==="voxel-8"||r==="voxel-9"||r==="voxel-10"||r==="voxel-11"||r==="voxel-20")&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:n?"flx mt-3":"",children:[o.jsx("b",{className:n?"wdt-200 d-in-b":"wdt-200 d-in-b mt-3 mb-3",children:m("Select Post Type:","bit-integrations")}),o.jsx(E,{className:"msl-wrp-options",defaultValue:i==null?void 0:i.selectedPostType,options:i==null?void 0:i.postTypes,onChange:u=>c(u,"selectedPostType"),singleSelect:!0,style:{width:"100%",minWidth:300,maxWidth:400}})]}),n&&!i.selectedPostType&&o.jsxs(o.Fragment,{children:[o.jsx("br",{}),o.jsx("span",{className:"actions-note",children:m("Please select a post type to fetch fields.","bit-integrations")})]})]})})},ed=({flow:e,setFlowData:t,edit:n=!1})=>o.jsxs("div",{children:[(e==null?void 0:e.triggered_entity)==="TutorLms"&&o.jsx(Fs,{flow:e,setFlowData:t}),(e==null?void 0:e.triggered_entity)==="WC"&&o.jsx(Qo,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="Groundhogg"&&o.jsx(qo,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="RestrictContent"&&o.jsx(Yo,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="WPCourseware"&&o.jsx(ws,{flow:e,setFlowData:t}),(e==null?void 0:e.triggered_entity)==="FluentCrm"&&o.jsx(Zs,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="Post"&&o.jsx($o,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="LearnDash"&&o.jsx(Go,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="BuddyBoss"&&o.jsx(Ko,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="Affiliate"&&o.jsx(Jo,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="GamiPress"&&o.jsx(Do,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="JetEngine"&&o.jsx(Xo,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="Memberpress"&&o.jsx(Zo,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="PaidMembershipPro"&&o.jsx(Fo,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="SliceWp"&&o.jsx(wo,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="SureCart"&&o.jsx(el,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="GiveWp"&&o.jsx(tl,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="LifterLms"&&o.jsx(nl,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="EDD"&&o.jsx(rl,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="MasterStudyLms"&&o.jsx(sl,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="ThriveApprentice"&&o.jsx(al,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="UltimateMember"&&o.jsx(ol,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="AcademyLms"&&o.jsx(ll,{flow:e,setFlowData:t}),(e==null?void 0:e.triggered_entity)==="FluentBooking"&&o.jsx(dl,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="SureMembers"&&o.jsx(ul,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="WPForo"&&o.jsx(pl,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="WPJobManager"&&o.jsx(fl,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="WCSubscriptions"&&o.jsx(hl,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="EventsCalendar"&&o.jsx(bl,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="Voxel"&&o.jsx(vl,{flow:e,setFlowData:t,edit:n}),(e==null?void 0:e.triggered_entity)==="WCBookings"&&o.jsx(ml,{flow:e,setFlowData:t,edit:n})]});function td({value:e,setSnackbar:t,toastShow:n,className:r,readOnly:s}){const l=i=>{const a=i.target;a.setAttribute("style",'--tooltip-txt: "Copied"'),t&&t({show:!0,msg:m("Copied on Clipboard.","bit-integrations")});const c=i.target.parentNode.children[0];c.select(),c.setSelectionRange(0,99999),document.execCommand("copy"),n&&me.success(m("Copied on Clipboard.")),setTimeout(()=>{a.setAttribute("style",'--tooltip-txt: "Copy"')},2e3)};return o.jsx("div",{className:r,children:o.jsxs("label",{htmlFor:e,className:"flx",children:[o.jsx("input",{id:"copy-input-fld",className:`w-10 ${s&&"readonly"}`,value:e,readOnly:!0}),o.jsx("button",{onClick:l,className:"tooltip",style:{"--tooltip-txt":'"Copy"'},"aria-label":"Copy",type:"button",children:o.jsx(Jr,{size:"14"})})]})})}function nd({width:e,height:t,strokeColor:n}){return o.jsxs("svg",{width:e,height:t,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o.jsxs("g",{clipPath:"url(#clip0)",children:[o.jsx("path",{d:"M1.5 12.5C1.5 12.5 5.5 4.5 12.5 4.5C19.5 4.5 23.5 12.5 23.5 12.5C23.5 12.5 19.5 20.5 12.5 20.5C5.5 20.5 1.5 12.5 1.5 12.5Z",stroke:`${n}`||"#808080",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M12.5 15.5C14.1569 15.5 15.5 14.1569 15.5 12.5C15.5 10.8431 14.1569 9.5 12.5 9.5C10.8431 9.5 9.5 10.8431 9.5 12.5C9.5 14.1569 10.8431 15.5 12.5 15.5Z",stroke:`${n}`||"#808080",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0",children:o.jsx("rect",{width:"24",height:"24",fill:"white",transform:"translate(0.5 0.5)"})})})]})}function rd({className:e,width:t,height:n,strokeColor:r}){return o.jsxs("svg",{className:e,width:t,height:n,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o.jsxs("g",{clipPath:"url(#clip0)",children:[o.jsx("path",{d:"M12.2663 12.2667C12.0375 12.5123 11.7615 12.7093 11.4548 12.8459C11.1481 12.9826 10.8171 13.056 10.4814 13.062C10.1457 13.0679 9.81231 13.0061 9.50102 12.8804C9.18972 12.7547 8.90694 12.5675 8.66955 12.3301C8.43215 12.0927 8.245 11.81 8.11927 11.4987C7.99353 11.1874 7.93178 10.8539 7.9377 10.5183C7.94363 10.1826 8.0171 9.85154 8.15374 9.54487C8.29038 9.23821 8.48739 8.96221 8.73301 8.73333M15.4497 15.45C14.0252 16.5358 12.2906 17.1374 10.4997 17.1667C4.66634 17.1667 1.33301 10.5 1.33301 10.5C2.36958 8.56825 3.80729 6.88051 5.54967 5.55L15.4497 15.45ZM8.74967 4.03333C9.32328 3.89907 9.91056 3.83195 10.4997 3.83333C16.333 3.83333 19.6663 10.5 19.6663 10.5C19.1605 11.4463 18.5572 12.3373 17.8663 13.1583L8.74967 4.03333Z",stroke:`${r}`||"#808080",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M1.33301 1.33331L19.6663 19.6666",stroke:`${r}`||"#808080",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),o.jsx("defs",{children:o.jsx("clipPath",{id:"clip0",children:o.jsx("rect",{width:"20",height:"20",fill:"white",transform:"translate(0.5 0.5)"})})})]})}function yl({data:e=[],onRemoveField:t,onUpdateField:n}){var d,u,f;const[r,s]=D.useState(!1),[l,i]=D.useState(),a=b=>{i(b),s(!0)},c=[{label:"Text",value:"text"},{label:"Email",value:"email"},{label:"Select",value:"select"},{label:"Radio",value:"radio"},{label:"Checkbox",value:"checkbox"},{label:"Number",value:"number"},{label:"Phone Number",value:"tel"},{label:"Textarea",value:"textarea"},{label:"Date Picker",value:"datepicker"},{label:"URL",value:"url"},{label:"File",value:"file"},{label:"Array",value:"array"},{label:"Object",value:"object"}];return o.jsxs("div",{className:"bg-white rounded border my-1 table-webhook-div p-2 field-container",style:{minHeight:"6rem",maxHeight:"14rem"},children:[e.map((b,p)=>{var g;return o.jsxs("div",{class:"field-wrapper",children:[o.jsx("button",{className:"field purple-sh tooltip",onClick:()=>a(p),style:{"--tooltip-txt":`'${m("Click to edit","bit-integrations")}'`},type:"button",children:(g=b==null?void 0:b.label)==null?void 0:g.replace(/[,]/gi,".").replace(/["{\}[\](\)]/gi,"")}),o.jsx("button",{className:"remove-field tooltip",onClick:()=>t(p),style:{"--tooltip-txt":`'${m("Click to remove","bit-integrations")}'`},children:o.jsx(Xi,{size:8,stroke:7})})]},p)}),o.jsxs(wi,{className:"custom-conf-mdl",mainMdlCls:"o-v",btnClass:"purple",btnTxt:"Ok",show:r,close:()=>s(!1),action:()=>s(!1),title:m("Edit Field","bit-integrations"),children:[o.jsx("div",{className:"btcd-hr mt-2 mb-2"}),o.jsxs("div",{className:"mt-2",children:[o.jsx("div",{className:"mt-3 mb-2",children:o.jsx("b",{children:m("Field Label","bit-integrations")})}),o.jsx("input",{className:"btcd-paper-inp w-100",type:"text",onChange:b=>n(b.target.value,l,"label"),value:(d=e[l])==null?void 0:d.label}),o.jsx("div",{className:"mt-3 mb-2",children:o.jsx("b",{children:`${m("Field Id","bit-integrations")} (${m("It is not recommended to edit the field ID","bit-integrations")})`})}),o.jsx("input",{className:"btcd-paper-inp w-100",type:"text",onChange:b=>n(b.target.value,l,"name"),value:(u=e[l])==null?void 0:u.name}),o.jsx("div",{className:"mt-3 mb-2",children:o.jsx("b",{children:m("Field Type","bit-integrations")})}),o.jsx(E,{className:"msl-wrp-options w-10",defaultValue:((f=e[l])==null?void 0:f.type)||"text",options:c,onChange:b=>n(b,l,"type"),singleSelect:!0,closeOnSelect:!0,customValue:!0})]})]})]})}var id=D.memo(yl),Ei={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var l="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(l=s(l,r(a)))}return l}function r(l){if(typeof l=="string"||typeof l=="number")return l;if(typeof l!="object")return"";if(Array.isArray(l))return n.apply(null,l);if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]"))return l.toString();var i="";for(var a in l)t.call(l,a)&&l[a]&&(i=s(i,a));return i}function s(l,i){return i?l?l+" "+i:l+i:l}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ei);var xl=Ei.exports,Nt=Fi(xl);function sr(e){return(sr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function An(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ti(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var s=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var l,i,a=[],c=!0,d=!1;try{for(s=s.call(n);!(c=(l=s.next()).done)&&(a.push(l.value),!r||a.length!==r);c=!0);}catch(u){d=!0,i=u}finally{try{c||s.return==null||s.return()}finally{if(d)throw i}}return a}}(e,t)||ar(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function qe(e){return function(t){if(Array.isArray(t))return qn(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||ar(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ar(e,t){if(e){if(typeof e=="string")return qn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qn(e,t):void 0}}function qn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ce(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ar(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,s=function(){};return{s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return i=c.done,c},e:function(c){a=!0,l=c},f:function(){try{i||n.return==null||n.return()}finally{if(a)throw l}}}}function or(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n}var Ur={root:"tree",node:"tree-node",branch:"tree-node__branch",branchWrapper:"tree-branch-wrapper",leafListItem:"tree-leaf-list-item",leaf:"tree-node__leaf",nodeGroup:"tree-node-group"},Xe={select:"SELECT",focus:"FOCUS",exclusiveSelect:"EXCLUSIVE_SELECT"},Sl=Object.freeze(Object.values(Xe)),jl=Object.freeze(Object.values({check:"check",select:"select"})),lr="COLLAPSE",vn="COLLAPSE_MANY",fn="EXPAND",hn="EXPAND_MANY",cr="HALF_SELECT",Gt="SELECT",Oi="DESELECT",yn="TOGGLE",mn="TOGGLE_SELECT",et="SELECT_MANY",Ci="EXCLUSIVE_CHANGE_SELECT_MANY",We="FOCUS",Ai="CLEAR_FOCUS",Pi="BLUR",_l="DISABLE",Il="ENABLE",Mi="CLEAR_MANUALLY_TOGGLED",Wi="CONTROLLED_SELECT_MANY",Li="UPDATE_TREE_STATE_WHEN_DATA_CHANGED",bt=function(){},Pn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var s=0,l=t;s<l.length;s++){var i=l[s];if(i&&i(r),r.defaultPrevented)break}}},ot=function(e,t){var n,r=new Set,s=Ce(e);try{for(s.s();!(n=s.n()).done;){var l=n.value;t.has(l)||r.add(l)}}catch(i){s.e(i)}finally{s.f()}return r},rn=function(e,t){return new Set([].concat(qe(ot(e,t)),qe(ot(t,e))))},qr=function(e){var t=D.useRef();return D.useEffect(function(){t.current=e},[e]),t.current},Oe=function(e,t){var n;return!!(!((n=he(e,t).children)===null||n===void 0)&&n.length)},nt=function(e,t){return he(e,t).parent},El=function(e,t,n){for(var r=t,s=[];;){var l=nt(e,r);if(l===0||l==null||l!=null&&n.has(l))break;s.push(l),r=l}return s},ct=function(e,t,n){var r=[];return function s(l,i){var a=he(l,i);if(a.children!=null){var c,d=Ce(a.children.filter(function(f){return!n.has(f)}));try{for(d.s();!(c=d.n()).done;){var u=c.value;r.push(u),s(l,u)}}catch(f){d.e(f)}finally{d.f()}}}(e,t),r},ki=function(e,t){var n=he(e,t);return n.children==null?[]:n.children},Vi=function(e,t,n){var r=nt(e,t);if(r!=null){var s=he(e,r),l=s.children.indexOf(t)+n;if(s.children[l])return s.children[l]}return null},Gn=function(e,t,n){var r=he(e,t);for(He(e).id===t&&(r=he(e,he(e,t).children[he(e,t).children.length-1]));n.has(r.id)&&Oe(e,r.id);)r=he(e,r.children[r.children.length-1]);return r.id},Qn=function(e,t,n){if(t===He(e).children[0])return null;var r=Vi(e,t,-1);return r==null?nt(e,t):Gn(e,r,n)},Vt=function(e,t,n){var r=he(e,t).id;if(Oe(e,r)&&n.has(r))return he(e,r).children[0];for(;;){var s=Vi(e,r,1);if(s!=null)return s;if((r=nt(e,r))==null)return null}},Ri=function(e){var t=e.data,n=e.expandedIds,r=e.from,s=e.to,l=[],i=t.length,a=0,c=r;if(l.push(r),r<s)for(;a<i&&((c=Vt(t,c,n))!=null&&l.push(c),c!=null&&c!==s);)a+=1;else if(r>s)for(;a<i&&((c=Qn(t,c,n))!=null&&l.push(c),c!=null&&c!==s);)a+=1;return l},Tl=function(e){var t=0,n=[];return function r(s,l){var i,a=Object.assign(Object.assign({id:s.id||t,name:s.name,children:[]},s.isBranch&&{isBranch:s.isBranch}),{parent:l,metadata:s.metadata?Object.assign({},s.metadata):void 0});if(n.find(function(p){return p.id===a.id}))throw Error("Multiple TreeView nodes have the same ID (".concat(a.id,"). IDs must be unique."));if(n.push(a),t+=1,(i=s.children)===null||i===void 0?void 0:i.length){var c,d=Ce(s.children);try{for(d.s();!(c=d.n()).done;)r(c.value,a.id)}catch(p){d.e(p)}finally{d.f()}var u,f=Ce(n.values());try{for(f.s();!(u=f.n()).done;){var b=u.value;b.parent===a.id&&a.children.push(b.id)}}catch(p){f.e(p)}finally{f.f()}}}(e,null),n},Ol=function(e){var t=e.isSelected,n=e.isDisabled,r=e.multiSelect;return n||r?t:!!t||void 0},Cl=function(e){var t=e.isSelected,n=e.isDisabled,r=e.isHalfSelected,s=e.multiSelect;return n?t:r?"mixed":s?t:!!t||void 0},lt=function(e,t,n){return t.concat.apply(t,qe(t.filter(function(r){return Oe(e,r)}).map(function(r){return ct(e,r,n)})))},Al=function(e,t,n){t!=null?window.navigator.userAgent.match(/Trident/)?setTimeout(function(){return!t.contains(document.activeElement)&&n()},0):!t.contains(e.nativeEvent.relatedTarget)&&n():console.warn("ref not set on <ul>")},Pl=function(e,t,n){var r=ki(e,t);return Oe(e,t)&&!n.has(t)&&r.length===1&&r.every(function(s){return n.has(s)})},zi=function(e,t,n,r){var s=function(i,a,c){return Oe(i,a)&&c.has(a)&&ct(i,a,new Set).some(function(d){return c.has(d)})}(e,t,n),l=function(i,a,c){var d=ki(i,a);return Oe(i,a)&&c.has(a)&&d.length===1&&d.every(function(u){return c.has(u)})}(e,t,n);return function(i,a,c,d){var u=ct(i,a,new Set);return Oe(i,a)&&c.has(a)&&u.every(function(f){return c.has(f)})&&u.every(function(f){return!d.has(f)})}(e,t,n,r)?mn:s&&!l?cr:mn},He=function(e){var t=e.find(function(n){return n.parent===null});if(!t)throw Error("TreeView data must contain parent node.");return t},he=function(e,t){var n=e.find(function(r){return r.id===t});if(n==null)throw Error("Node with id=".concat(t," doesn't exist in the tree."));return n},Gr=function(e){var t=Array.from(new Set(e));return e.length!==t.length},Ml=function(e,t){switch(t.type){case lr:var n=new Set(e.expandedIds);return n.delete(t.id),Object.assign(Object.assign({},e),{expandedIds:n,tabbableId:t.id,isFocused:!0,lastAction:t.type,lastInteractedWith:t.lastInteractedWith});case vn:var r,s=new Set(e.expandedIds),l=Ce(t.ids);try{for(l.s();!(r=l.n()).done;){var i=r.value;s.delete(i)}}catch(ee){l.e(ee)}finally{l.f()}return Object.assign(Object.assign({},e),{expandedIds:s,lastAction:t.type,lastInteractedWith:t.lastInteractedWith});case fn:var a=new Set(e.expandedIds);return a.add(t.id),Object.assign(Object.assign({},e),{expandedIds:a,tabbableId:t.id,isFocused:!0,lastAction:t.type,lastInteractedWith:t.lastInteractedWith});case hn:var c=new Set([].concat(qe(e.expandedIds),qe(t.ids)));return Object.assign(Object.assign({},e),{expandedIds:c,lastAction:t.type,lastInteractedWith:t.lastInteractedWith});case yn:var d=new Set(e.expandedIds);return e.expandedIds.has(t.id)?d.delete(t.id):d.add(t.id),Object.assign(Object.assign({},e),{expandedIds:d,tabbableId:t.id,isFocused:!0,lastAction:t.type,lastInteractedWith:t.lastInteractedWith});case cr:if(e.disabledIds.has(t.id))return e;var u=new Set(e.halfSelectedIds),f=new Set(e.selectedIds);return u.add(t.id),f.delete(t.id),Object.assign(Object.assign({},e),{selectedIds:f,halfSelectedIds:u,tabbableId:t.keepFocus?e.tabbableId:t.id,lastAction:t.type,lastInteractedWith:t.lastInteractedWith,lastManuallyToggled:t.lastManuallyToggled,lastUserSelect:t.NotUserAction?e.lastUserSelect:t.id});case Gt:if(!t.NotUserAction&&e.disabledIds.has(t.id))return e;var b;t.multiSelect?(b=new Set(e.selectedIds)).add(t.id):(b=new Set).add(t.id);var p=new Set(e.halfSelectedIds);p.delete(t.id);var g=t.keepFocus?e.tabbableId:t.id,v=g===t.lastInteractedWith||t.NotUserAction!==!0;return Object.assign(Object.assign({},e),{selectedIds:b,halfSelectedIds:p,tabbableId:g,isFocused:v,lastUserSelect:t.NotUserAction?e.lastUserSelect:t.id,lastAction:t.type,lastInteractedWith:t.lastInteractedWith,lastManuallyToggled:t.lastManuallyToggled});case Oi:if(!t.NotUserAction&&e.disabledIds.has(t.id))return e;var _,y=new Set(e.selectedIds);return y.delete(t.id),t.multiSelect?(_=new Set(e.halfSelectedIds)).delete(t.id):_=new Set,Object.assign(Object.assign({},e),{selectedIds:y,halfSelectedIds:_,tabbableId:t.keepFocus?e.tabbableId:t.id,isFocused:!0,lastUserSelect:t.NotUserAction?e.lastUserSelect:t.id,lastAction:t.type,lastInteractedWith:t.lastInteractedWith,lastManuallyToggled:t.lastManuallyToggled});case mn:if(e.disabledIds.has(t.id))return e;var C,S=e.selectedIds.has(t.id);t.multiSelect?(C=new Set(e.selectedIds),S?C.delete(t.id):C.add(t.id)):(C=new Set,S||C.add(t.id));var h=new Set(e.halfSelectedIds);return h.delete(t.id),Object.assign(Object.assign({},e),{selectedIds:C,halfSelectedIds:h,tabbableId:t.id,isFocused:!0,lastUserSelect:t.NotUserAction?e.lastUserSelect:t.id,lastAction:t.type,lastInteractedWith:t.lastInteractedWith,lastManuallyToggled:t.lastManuallyToggled});case et:var I,j=t.ids.filter(function(ee){return!e.disabledIds.has(ee)});if(t.multiSelect){I=t.select?new Set([].concat(qe(e.selectedIds),qe(j))):ot(e.selectedIds,new Set(j));var W=ot(e.halfSelectedIds,I);return Object.assign(Object.assign({},e),{selectedIds:I,halfSelectedIds:W,lastAction:t.type,lastInteractedWith:t.lastInteractedWith,lastManuallyToggled:t.lastManuallyToggled})}return e;case Ci:var V,T=t.ids.filter(function(ee){return!e.disabledIds.has(ee)});if(t.multiSelect){V=t.select?new Set(T):ot(e.selectedIds,new Set(T));var A=ot(e.halfSelectedIds,V);return Object.assign(Object.assign({},e),{selectedIds:V,halfSelectedIds:A,lastAction:t.type,lastInteractedWith:t.lastInteractedWith,lastManuallyToggled:t.lastManuallyToggled})}return e;case Wi:var z,k=e.lastInteractedWith,P=e.tabbableId;if(t.multiSelect)z=new Set(t.ids),t.ids.length&&(k=t.ids[t.ids.length-1],P=t.ids[t.ids.length-1]);else{z=new Set,t.ids.length>1&&console.warn("Tree in singleSelect mode, only the first item from selectedIds will be selected.");var M=t.ids[0];M&&z.add(M),k=M!=null?M:k,P=M!=null?M:k}var L=new Set(e.halfSelectedIds);t.ids.every(function(ee){return L.delete(ee)});var U=new Set(t.ids);return Object.assign(Object.assign({},e),{selectedIds:z,halfSelectedIds:L,controlledIds:U,isFocused:!0,lastAction:t.type,tabbableId:P,lastInteractedWith:k});case We:return Object.assign(Object.assign({},e),{tabbableId:t.id,isFocused:!0,lastAction:t.type,lastInteractedWith:t.lastInteractedWith});case Pi:return Object.assign(Object.assign({},e),{isFocused:!1});case Ai:return Object.assign(Object.assign({},e),{isFocused:!1,lastInteractedWith:null,tabbableId:t.id});case _l:var Z=new Set(e.disabledIds);return Z.add(t.id),Object.assign(Object.assign({},e),{disabledIds:Z});case Il:var w=new Set(e.disabledIds);return w.delete(t.id),Object.assign(Object.assign({},e),{disabledIds:w});case Mi:return Object.assign(Object.assign({},e),{lastManuallyToggled:null});case Li:return Object.assign(Object.assign({},e),{tabbableId:t.tabbableId,lastInteractedWith:t.lastInteractedWith,lastManuallyToggled:t.lastManuallyToggled,lastUserSelect:t.lastUserSelect});default:throw new Error("Invalid action passed to the reducer")}},Hi=function(e){var t=e.element,n=e.dispatch,r=e.data,s=e.selectedIds,l=e.tabbableId,i=e.isFocused,a=e.expandedIds,c=e.disabledIds,d=e.halfSelectedIds,u=e.lastUserSelect,f=e.nodeRefs,b=e.leafRefs,p=e.baseClassNames,g=e.nodeRenderer,v=e.nodeAction,_=e.setsize,y=e.posinset,C=e.level,S=e.propagateCollapse,h=e.propagateSelect,I=e.multiSelect,j=e.togglableSelect,W=e.clickAction,V=e.state,T=function(M){if(!(M.ctrlKey||M.altKey||M.shiftKey))if(a.has(t.id)&&S){var L=[t.id].concat(qe(ct(r,t.id,new Set)));n({type:vn,ids:L,lastInteractedWith:t.id})}else n({type:yn,id:t.id,lastInteractedWith:t.id})},A=function(){return n({type:We,id:t.id,lastInteractedWith:t.id})},z=function(M){if(M.shiftKey){var L=Ri({data:r,expandedIds:a,from:u,to:t.id}).filter(function(U){return!c.has(U)});L=h?lt(r,L,c):L,n({type:Ci,select:!0,multiSelect:I,ids:L,lastInteractedWith:t.id,lastManuallyToggled:t.id})}else M.ctrlKey||W===Xe.select?(n({type:j?zi(r,t.id,s,c):Gt,id:t.id,multiSelect:I,lastInteractedWith:t.id,lastManuallyToggled:t.id}),h&&!c.has(t.id)&&n({type:et,ids:lt(r,[t.id],c),select:!j||!s.has(t.id),multiSelect:I,lastInteractedWith:t.id,lastManuallyToggled:t.id})):W===Xe.exclusiveSelect?n({type:j?mn:Gt,id:t.id,multiSelect:!1,lastInteractedWith:t.id,lastManuallyToggled:t.id}):W===Xe.focus&&n({type:We,id:t.id,lastInteractedWith:t.id})},k=function(M){var L;return Nt(M,(An(L={},"".concat(M,"--expanded"),a.has(t.id)),An(L,"".concat(M,"--selected"),s.has(t.id)),An(L,"".concat(M,"--focused"),l===t.id&&i),L))},P=v==="select"?{"aria-selected":Ol({isSelected:s.has(t.id),isDisabled:c.has(t.id),multiSelect:I})}:{"aria-checked":Cl({isSelected:s.has(t.id),isDisabled:c.has(t.id),isHalfSelected:d.has(t.id),multiSelect:I})};return Oe(r,t.id)||t.isBranch?$.createElement("li",Object.assign({role:"treeitem","aria-expanded":a.has(t.id),"aria-setsize":_,"aria-posinset":y,"aria-level":C,"aria-disabled":c.has(t.id),tabIndex:l===t.id?0:-1,ref:function(M){(f==null?void 0:f.current)!=null&&M!=null&&(f.current[t.id]=M)},className:p.branchWrapper},P),$.createElement($.Fragment,null,g({element:t,isBranch:!0,isSelected:s.has(t.id),isHalfSelected:d.has(t.id),isExpanded:a.has(t.id),isDisabled:c.has(t.id),dispatch:n,getNodeProps:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},L=M.onClick;return{onClick:L==null?Pn(z,T,A):Pn(L,A),className:Nt(k(p.node),p.branch),ref:function(U){(b==null?void 0:b.current)!=null&&(b.current[t.id]=U)}}},setsize:_,posinset:y,level:C,handleSelect:z,handleExpand:T,treeState:V}),$.createElement(Wl,Object.assign({getClasses:k},function(M){return M.setsize,M.posinset,or(M,["setsize","posinset"])}(e))))):$.createElement("li",{role:"none",className:k(p.leafListItem)},g({element:t,isBranch:!1,isSelected:s.has(t.id),isHalfSelected:!1,isExpanded:!1,isDisabled:c.has(t.id),dispatch:n,getNodeProps:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},L=M.onClick;return Object.assign({role:"treeitem",tabIndex:l===t.id?0:-1,onClick:Pn(L==null?z:L,A),ref:function(U){(f==null?void 0:f.current)!=null&&(b==null?void 0:b.current)!=null&&(f.current[t.id]=U,b.current[t.id]=U)},className:Nt(k(p.node),p.leaf),"aria-setsize":_,"aria-posinset":y,"aria-level":C,disabled:c.has(t.id),"aria-disabled":c.has(t.id)},P)},setsize:_,posinset:y,level:C,handleSelect:z,handleExpand:bt,treeState:V}))},Wl=function(e){var t=e.data,n=e.element,r=e.expandedIds,s=e.getClasses,l=e.baseClassNames,i=e.level,a=or(e,["data","element","expandedIds","getClasses","baseClassNames","level"]);return $.createElement("ul",{role:"group",className:s(l.nodeGroup)},r.has(n.id)&&n.children.length>0&&n.children.map(function(c,d){return $.createElement(Hi,Object.assign({data:t,expandedIds:r,baseClassNames:l,key:"".concat(c,"-").concat(sr(c)),element:he(t,c),setsize:n.children.length,posinset:d+1,level:i+1},a))}))},Ll=function(e){var t=e.data,n=e.controlledSelectedIds,r=e.controlledExpandedIds,s=e.defaultExpandedIds,l=e.defaultSelectedIds,i=e.defaultDisabledIds,a=e.nodeRefs,c=e.leafRefs,d=e.onSelect,u=e.onNodeSelect,f=e.onExpand,b=e.onLoadData,p=e.togglableSelect,g=e.multiSelect,v=e.propagateSelect,_=e.propagateSelectUpwards,y=e.treeRef,C=e.focusedId,S=He(t),h=Ti(D.useReducer(Ml,{selectedIds:new Set(n||l),controlledIds:new Set(n),tabbableId:S.children[0],isFocused:!1,expandedIds:new Set(r||s),halfSelectedIds:new Set,lastUserSelect:S.children[0],lastInteractedWith:null,lastManuallyToggled:null,disabledIds:new Set(i)}),2),I=h[0],j=h[1],W=I.selectedIds,V=I.expandedIds,T=I.disabledIds,A=I.tabbableId,z=I.halfSelectedIds,k=I.lastAction,P=I.lastInteractedWith,M=I.lastManuallyToggled,L=qr(W)||new Set,U=rn(W,L);D.useEffect(function(){var G;if(d!=null&&d!==bt){var B,q=Ce(U);try{for(q.s();!(B=q.n()).done;){var Q=B.value,X=Oe(t,Q)||!!(!((G=he(t,A))===null||G===void 0)&&G.isBranch);d({element:he(t,Q),isBranch:X,isExpanded:!!X&&V.has(Q),isSelected:W.has(Q),isDisabled:T.has(Q),isHalfSelected:!!X&&z.has(Q),treeState:I})}}catch(se){q.e(se)}finally{q.f()}}},[t,W,V,T,z,U,d,I]),D.useEffect(function(){u!=null&&u!==bt&&M!=null&&U.size&&(u({element:he(t,M),isSelected:W.has(M),isBranch:Oe(t,M),treeState:I}),j({type:Mi}))},[M,W,U]);var Z=qr(V)||new Set;D.useEffect(function(){var G=rn(V,Z);if(f!=null&&f!==bt){var B,q=Ce(G);try{for(q.s();!(B=q.n()).done;){var Q=B.value;f({element:he(t,Q),isExpanded:V.has(Q),isSelected:W.has(Q),isDisabled:T.has(Q),isHalfSelected:z.has(Q),treeState:I})}}catch(X){q.e(X)}finally{q.f()}}},[t,W,V,T,z,Z,f,I]);var w,ee,le=(w=t,ee=D.useRef(),D.useEffect(function(){ee.current=w}),ee.current||new Map);D.useEffect(function(){var G=rn(V,Z);if(b){var B,q=Ce(G);try{for(q.s();!(B=q.n()).done;){var Q=B.value;b({element:he(t,Q),isExpanded:V.has(Q),isSelected:W.has(Q),isDisabled:T.has(Q),isHalfSelected:z.has(Q),treeState:I})}}catch(be){q.e(be)}finally{q.f()}if(le!==t&&p&&v){var X,se=Ce(V);try{for(se.s();!(X=se.n()).done;){var ae=X.value;W.has(ae)&&j({type:et,ids:lt(t,[ae],T),select:!0,multiSelect:g,lastInteractedWith:ae})}}catch(be){se.e(be)}finally{se.f()}}}},[t,W,V,T,z,Z,b,I]),D.useEffect(function(){if(le!==t){var G=He(t);G.children.length&&j({type:Li,tabbableId:t.find(function(B){return B.id===I.tabbableId})?I.tabbableId:G.children[0],lastInteractedWith:t.find(function(B){return B.id===I.lastInteractedWith})?I.lastInteractedWith:null,lastManuallyToggled:t.find(function(B){return B.id===I.lastManuallyToggled})?I.lastManuallyToggled:null,lastUserSelect:t.find(function(B){return B.id===I.lastUserSelect})?I.lastUserSelect:G.children[0]})}},[t]);var Ee=rn(new Set(n),W);return D.useEffect(function(){if(n){Ee.size&&j({type:Wi,ids:n,multiSelect:g});var G,B=Ce(n);try{for(B.s();!(G=B.n()).done;){var q=G.value;v&&!T.has(q)&&j({type:et,ids:lt(t,[q],T),select:!0,multiSelect:g,lastInteractedWith:q})}}catch(Q){B.e(Q)}finally{B.f()}}},[n]),D.useEffect(function(){var G=new Set(r),B=ot(G,Z),q=ot(Z,G);if(q.size){var Q,X=Ce(q);try{for(X.s();!(Q=X.n()).done;){var se=Q.value;if(Oe(t,se)||he(t,se).isBranch){var ae=[se].concat(qe(ct(t,se,new Set)));j({type:vn,ids:ae,lastInteractedWith:se})}}}catch(Pe){X.e(Pe)}finally{X.f()}}if(B.size){var be,ne=Ce(B);try{for(ne.s();!(be=ne.n()).done;){var re=be.value;if(Oe(t,re)||he(t,re).isBranch){var Ae=nt(t,re);j(Ae?{type:hn,ids:[re,Ae],lastInteractedWith:re}:{type:fn,id:re,lastInteractedWith:re})}}}catch(Pe){ne.e(Pe)}finally{ne.f()}}},[r]),D.useEffect(function(){if(_){var G=new Set(qe(U));P&&k!==We&&k!==lr&&k!==fn&&k!==yn&&G.add(P);var B=[];G.forEach(function(N){t.find(function(fe){return fe.id===N})||B.push(N)}),B.forEach(function(N){return G.delete(N)});var q=function(N,fe,Se,ce,F,oe){var Ie,je={every:new Set,some:new Set,none:new Set},ve=Ce(fe);try{for(ve.s();!(Ie=ve.n()).done;)for(var $e=Ie.value;;){var ke=nt(N,$e);if(ke===0||ke==null||ke!=null&&ce.has(ke))break;var st=he(N,ke).children.filter(function(Te){return!ce.has(Te)});if(st.length===0)break;if(st.some(function(Te){return Se.has(Te)||je.some.has(Te)&&!je.none.has(Te)||F.has(Te)&&!je.none.has(Te)}))st.every(function(Te){return Se.has(Te)})?je.every.add(ke):je.some.add(ke);else{var Xt=El(N,$e,ce).find(function(Te){return Se.has(Te)});if(!oe&&Xt){ct(N,Xt,ce).forEach(function(Te){F.has(Te)&&je.none.add(Te)});break}je.none.add(ke)}$e=ke}}catch(Te){ve.e(Te)}finally{ve.f()}return je}(t,G,W,T,z,g),Q=q.every,X=q.some,se=q.none;n&&G.forEach(function(N){Oe(t,N)&&ct(t,N,new Set).every(function(fe){return W.has(fe)})&&Q.add(N)});var ae,be=Ce(Q);try{for(be.s();!(ae=be.n()).done;){var ne=ae.value;W.has(ne)||j({type:Gt,id:ne,multiSelect:g||Pl(t,ne,W),keepFocus:!0,NotUserAction:!0,lastInteractedWith:P})}}catch(N){be.e(N)}finally{be.f()}var re,Ae=Ce(X);try{for(Ae.s();!(re=Ae.n()).done;){var Pe=re.value;z.has(Pe)||j({type:cr,id:Pe,lastInteractedWith:P,keepFocus:!0,NotUserAction:!0})}}catch(N){Ae.e(N)}finally{Ae.f()}var H,Y=Ce(se);try{for(Y.s();!(H=Y.n()).done;){var J=H.value;(W.has(J)||z.has(J))&&j({type:Oi,id:J,multiSelect:g,keepFocus:!0,NotUserAction:!0,lastInteractedWith:P,lastManuallyToggled:M})}}catch(N){Y.e(N)}finally{Y.f()}}},[t,g,_,W,V,T,z,k,L,U,P,Ee]),D.useEffect(function(){if(P!=null&&A!=null&&(a==null?void 0:a.current)!=null&&(c==null?void 0:c.current)!=null&&((y==null?void 0:y.current)==null||document.activeElement&&y.current.contains(document.activeElement)||C)){var G=a.current[A];(function(B){B!=null&&B.scrollIntoView&&B.scrollIntoView({block:"nearest"})})(c.current[P]),function(B){B!=null&&B.focus&&B.focus({preventScroll:!0})}(G)}},[A,a,c,P]),D.useEffect(function(){if(C||j({type:Ai,id:S.children[0]}),C&&t.find(function(B){return B.id===C})){var G=function B(q,Q){var X=nt(q,Q),se=X&&(Oe(q,X)||he(q,X).isBranch);return X&&se?[X].concat(qe(B(q,X))):[]}(t,C);G.length&&j({type:hn,ids:G,lastInteractedWith:C}),j({type:We,id:C,lastInteractedWith:C})}},[C]),[I,j]},Ni=$.forwardRef(function(e,t){var n=e.data,r=e.selectedIds,s=e.nodeRenderer,l=e.onSelect,i=l===void 0?bt:l,a=e.onNodeSelect,c=a===void 0?bt:a,d=e.onExpand,u=d===void 0?bt:d,f=e.onLoadData,b=e.className,p=b===void 0?"":b,g=e.multiSelect,v=g!==void 0&&g,_=e.propagateSelect,y=_!==void 0&&_,C=e.propagateSelectUpwards,S=C!==void 0&&C,h=e.propagateCollapse,I=h!==void 0&&h,j=e.expandOnKeyboardSelect,W=j!==void 0&&j,V=e.togglableSelect,T=V!==void 0&&V,A=e.defaultExpandedIds,z=A===void 0?[]:A,k=e.defaultSelectedIds,P=k===void 0?[]:k,M=e.defaultDisabledIds,L=M===void 0?[]:M,U=e.clickAction,Z=U===void 0?Xe.select:U,w=e.nodeAction,ee=w===void 0?"select":w,le=e.expandedIds,Ee=e.focusedId,G=e.onBlur,B=or(e,["data","selectedIds","nodeRenderer","onSelect","onNodeSelect","onExpand","onLoadData","className","multiSelect","propagateSelect","propagateSelectUpwards","propagateCollapse","expandOnKeyboardSelect","togglableSelect","defaultExpandedIds","defaultSelectedIds","defaultDisabledIds","clickAction","nodeAction","expandedIds","focusedId","onBlur"]);(function(ne){if(Gr(ne.map(function(re){return re.id})))throw Error("Multiple TreeView nodes have the same ID. IDs must be unique.");if(ne.forEach(function(re){if(re.id===re.parent)throw Error("Node with id=".concat(re.id," has parent reference to itself."));if(Gr(re.children))throw Error("Node with id=".concat(re.id," contains duplicate ids in its children."))}),ne.filter(function(re){return re.parent===null}).length===0)throw Error("TreeView must have one root node.");if(ne.filter(function(re){return re.parent===null}).length>1)throw Error("TreeView can have only one root node.");He(ne).children.length||console.warn("TreeView have no nodes to display.")})(n);var q=D.useRef({}),Q=D.useRef({}),X=D.useRef(null);t!=null&&(X=t);var se=Ti(Ll({data:n,controlledSelectedIds:r,controlledExpandedIds:le,defaultExpandedIds:z,defaultSelectedIds:P,defaultDisabledIds:L,nodeRefs:q,leafRefs:Q,onSelect:i,onNodeSelect:c,onExpand:u,onLoadData:f,togglableSelect:T,multiSelect:v,propagateSelect:y,propagateSelectUpwards:S,treeRef:X,focusedId:Ee}),2),ae=se[0],be=se[1];return y=y&&v,$.createElement("ul",Object.assign({className:Nt(Ur.root,p),role:"tree","aria-multiselectable":ee==="select"?v:void 0,ref:X,onBlur:function(ne){Al(ne,X.current,function(){G&&G({treeState:ae,dispatch:be}),be({type:Pi})})},onKeyDown:kl({data:n,tabbableId:ae.tabbableId,expandedIds:ae.expandedIds,selectedIds:ae.selectedIds,disabledIds:ae.disabledIds,halfSelectedIds:ae.halfSelectedIds,clickAction:Z,dispatch:be,propagateCollapse:I,propagateSelect:y,multiSelect:v,expandOnKeyboardSelect:W,togglableSelect:T})},B),He(n).children.map(function(ne,re){return $.createElement(Hi,Object.assign({key:"".concat(ne,"-").concat(sr(ne)),data:n,element:he(n,ne),setsize:He(n).children.length,posinset:re+1,level:1},ae,{state:ae,dispatch:be,nodeRefs:q,leafRefs:Q,baseClassNames:Ur,nodeRenderer:s,propagateCollapse:I,propagateSelect:y,propagateSelectUpwards:S,multiSelect:v,togglableSelect:T,clickAction:Z,nodeAction:ee}))}))}),kl=function(e){var t=e.data,n=e.expandedIds,r=e.selectedIds,s=e.disabledIds,l=e.tabbableId,i=e.dispatch,a=e.propagateCollapse,c=e.propagateSelect,d=e.multiSelect,u=e.expandOnKeyboardSelect,f=e.togglableSelect,b=e.clickAction;return function(p){var g=he(t,l),v=g.id;if(p.ctrlKey){if(p.key==="a"&&b!==Xe.focus){p.preventDefault();var _=t.filter(function(P){return P.parent!==null}).map(function(P){return P.id}).filter(function(P){return!s.has(P)});i({type:et,multiSelect:d,select:Array.from(r).filter(function(P){return!s.has(P)}).length!==_.length,ids:_,lastInteractedWith:g.id})}else if(p.shiftKey&&(p.key==="Home"||p.key==="End")&&b!==Xe.focus){var y=p.key==="Home"?He(t).children[0]:Gn(t,v,n),C=Ri({data:t,expandedIds:n,from:v,to:y}).filter(function(P){return!s.has(P)});i({type:et,multiSelect:d,select:!0,ids:c?lt(t,C,s):C}),i({type:We,id:y,lastInteractedWith:y})}}else{if(p.shiftKey)switch(p.key){case"ArrowUp":p.preventDefault();var S=Qn(t,v,n);return void(S==null||s.has(S)||(b!==Xe.focus&&i({type:et,ids:c?lt(t,[S],s):[S],select:!0,multiSelect:d,lastInteractedWith:S,lastManuallyToggled:S}),i({type:We,id:S,lastInteractedWith:S})));case"ArrowDown":p.preventDefault();var h=Vt(t,v,n);return void(h==null||s.has(h)||(b!==Xe.focus&&i({type:et,ids:c?lt(t,[h],s):[h],multiSelect:d,select:!0,lastInteractedWith:h,lastManuallyToggled:h}),i({type:We,id:h,lastInteractedWith:h})))}switch(p.key){case"ArrowDown":p.preventDefault();var I=Vt(t,v,n);return void(I!=null&&i({type:We,id:I,lastInteractedWith:I}));case"ArrowUp":p.preventDefault();var j=Qn(t,v,n);return void(j!=null&&i({type:We,id:j,lastInteractedWith:j}));case"ArrowLeft":if(p.preventDefault(),(Oe(t,v)||g.isBranch)&&n.has(l))if(a){var W=[v].concat(qe(ct(t,v,new Set)));i({type:vn,ids:W,lastInteractedWith:g.id})}else i({type:lr,id:v,lastInteractedWith:v});else if(!He(t).children.includes(v)){var V=nt(t,v);if(V==null)throw new Error("parentId of root element is null");i({type:We,id:V,lastInteractedWith:V})}return;case"ArrowRight":return p.preventDefault(),void((Oe(t,v)||g.isBranch)&&(n.has(l)?i({type:We,id:g.children[0],lastInteractedWith:g.children[0]}):i({type:fn,id:v,lastInteractedWith:v})));case"Home":p.preventDefault(),i({type:We,id:He(t).children[0],lastInteractedWith:He(t).children[0]});break;case"End":p.preventDefault();var T=Gn(t,He(t).id,n);return void i({type:We,id:T,lastInteractedWith:T});case"*":p.preventDefault();var A=nt(t,v);if(A==null)throw new Error("parentId of element is null");var z=he(t,A).children.filter(function(P){return Oe(t,P)||he(t,P).isBranch});return void i({type:hn,ids:z,lastInteractedWith:v});case"Enter":case" ":case"Spacebar":return p.preventDefault(),b===Xe.focus?void 0:(i({type:f?zi(t,v,r,s):Gt,id:v,multiSelect:d,lastInteractedWith:v,lastManuallyToggled:v}),c&&!s.has(g.id)&&i({type:et,ids:lt(t,[v],s),select:!f||!r.has(v),multiSelect:d,lastInteractedWith:v,lastManuallyToggled:v}),void(u&&i({type:yn,id:v,lastInteractedWith:v})));default:if(p.key.length===1)for(var k=Vt(t,v,n);k!==v;)if(k!=null){if(he(t,k).name[0].toLowerCase()===p.key.toLowerCase())return void i({type:We,id:k,lastInteractedWith:v});k=Vt(t,k,n)}else k=He(t).children[0];return}}}};Ni.propTypes={data:ye.array.isRequired,onSelect:ye.func,onNodeSelect:ye.func,onExpand:ye.func,className:ye.string,nodeRenderer:ye.func.isRequired,defaultExpandedIds:ye.array,defaultSelectedIds:ye.array,expandedIds:ye.array,selectedIds:ye.array,defaultDisabledIds:ye.array,propagateCollapse:ye.bool,propagateSelect:ye.bool,propagateSelectUpwards:ye.bool,multiSelect:ye.bool,expandOnKeyboardSelect:ye.bool,togglableSelect:ye.bool,nodeAction:ye.oneOf(jl),clickAction:ye.oneOf(Sl),onBlur:ye.func,onLoadData:ye.func,focusedId:ye.oneOfType([ye.string,ye.number])};var Bi={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Qr=$.createContext&&$.createContext(Bi),dt=globalThis&&globalThis.__assign||function(){return dt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},dt.apply(this,arguments)},Vl=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n};function $i(e){return e&&e.map(function(t,n){return $.createElement(t.tag,dt({key:n},t.attr),$i(t.child))})}function Dt(e){return function(t){return $.createElement(Rl,dt({attr:dt({},e.attr)},t),$i(e.child))}}function Rl(e){var t=function(n){var r=e.attr,s=e.size,l=e.title,i=Vl(e,["attr","size","title"]),a=s||n.size||"1em",c;return n.className&&(c=n.className),e.className&&(c=(c?c+" ":"")+e.className),$.createElement("svg",dt({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,i,{className:c,style:dt(dt({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),l&&$.createElement("title",null,l),e.children)};return Qr!==void 0?$.createElement(Qr.Consumer,null,function(n){return t(n)}):t(Bi)}function zl(e){return Dt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zm0 400H48V80h352v352zm-35.864-241.724L191.547 361.48c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z"}}]})(e)}function Hl(e){return Dt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M108 284c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h232c6.6 0 12 5.4 12 12v32c0 6.6-5.4 12-12 12H108zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"}}]})(e)}function Nl(e){return Dt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h340c3.3 0 6 2.7 6 6v340c0 3.3-2.7 6-6 6z"}}]})(e)}function Bl(e){return Dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M363 277h-86v86h-42v-86h-86v-42h86v-86h42v86h86v42z"}},{tag:"path",attr:{d:"M256 90c44.3 0 86 17.3 117.4 48.6C404.7 170 422 211.7 422 256s-17.3 86-48.6 117.4C342 404.7 300.3 422 256 422c-44.3 0-86-17.3-117.4-48.6C107.3 342 90 300.3 90 256c0-44.3 17.3-86 48.6-117.4C170 107.3 211.7 90 256 90m0-42C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48z"}}]})(e)}function $l(e){return Dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 90c44.3 0 86 17.3 117.4 48.6C404.7 170 422 211.7 422 256s-17.3 86-48.6 117.4C342 404.7 300.3 422 256 422s-86-17.3-117.4-48.6C107.3 342 90 300.3 90 256s17.3-86 48.6-117.4C170 107.3 211.7 90 256 90m0-42C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48z"}},{tag:"path",attr:{d:"M363 277H149v-42h214v42z"}}]})(e)}function Ul({data:e=[],onChange:t}){const n=D.useMemo(()=>Tl(Rt(e)),[e]),r=({element:s,isSelected:l})=>{const i=Ui(n,s,"");l?t(i):t(i,!0)};return o.jsx("div",{className:"bg-white rounded border py-3 table-webhook-div shadow mt-3",style:{maxHeight:"600px"},children:o.jsx(Ni,{data:n,"aria-label":"Checkbox tree",multiSelect:!0,defaultExpandedIds:[1],propagateSelect:!0,propagateSelectUpwards:!0,togglableSelect:!0,onNodeSelect:r,nodeRenderer:({element:s,isBranch:l,isExpanded:i,isSelected:a,isHalfSelected:c,isDisabled:d,getNodeProps:u,level:f,handleSelect:b,handleExpand:p})=>o.jsxs("div",xe(O({},u({onClick:p})),{style:{marginLeft:40*(f-1),opacity:d?.5:1},children:[l&&o.jsx(ql,{isOpen:i}),o.jsx(Gl,{className:"checkbox-icon",onClick:g=>{b(g),g.stopPropagation()},variant:c?"some":a?"all":"none"}),o.jsx("span",{className:"name",children:s.name})]}))})})}var sd=D.memo(Ul);const Rt=(e,t="")=>{if(typeof e!="object"||e===null)return{name:t+" ("+e+")",value:e};if(Array.isArray(e))return{name:t+" (Array)",value:"Array",children:e.map((s,l)=>Rt(s,l.toString()))};const n={name:t+" (Object)",value:"Object",children:[]};Object.keys(e).forEach(s=>{n.children.push(Rt(e[s],s))}),Object.getOwnPropertyNames(e).forEach(s=>{e.propertyIsEnumerable(s)||n.children.push(Rt(e[s],s))});let r=Object.getPrototypeOf(e);for(;r!==null&&r!==Object.prototype;)Object.getOwnPropertyNames(r).forEach(s=>{typeof r[s]=="function"?n.children.push({name:s+" (Method)",value:"Function"}):n.children.push(Rt(r[s],s))}),r=Object.getPrototypeOf(r);return n},ql=({isOpen:e,className:t})=>{const n="arrow",r=Nt(n,{[`${n}--closed`]:!e},{[`${n}--open`]:e},t);return e?o.jsx($l,{title:`${m("Collapse the tree view","bit-integrations")}`,className:r}):o.jsx(Bl,{title:`${m("Expand the tree view","bit-integrations")}`,className:r})},Gl=n=>{var r=n,{variant:e}=r,t=hr(r,["variant"]);switch(e){case"all":return o.jsx(zl,O({},t));case"none":return o.jsx(Nl,O({},t));case"some":return o.jsx(Hl,O({},t));default:return null}},Ui=(e,t,n)=>{const{id:r,name:s,parent:l}=t;if(n=s.substring(0,s.indexOf(" ("))+(n?"."+n:""),l){const i=e.find(a=>(a==null?void 0:a.id)===l);n=Ui(e,i,n)}return n};function ad({value:e,setSnackbar:t,toastShow:n,className:r,readOnly:s}){const l=i=>{const a=i.target;a.setAttribute("style",'--tooltip-txt: "Copied"'),t&&t({show:!0,msg:m("Copied on Clipboard.","bit-integrations")});const c=i.target.parentNode.children[0];c.select(),c.setSelectionRange(0,99999),document.execCommand("copy"),n&&me.success(m("Copied on Clipboard.")),setTimeout(()=>{a.setAttribute("style",'--tooltip-txt: "Copy"')},2e3)};return o.jsxs("div",{className:r,children:[o.jsx("textarea",{className:"copyCustomTrigger",readOnly:s,value:e}),o.jsx("button",{onClick:l,className:"tooltip",style:{"--tooltip-txt":'"Copy"'},"aria-label":"Copy",type:"button",children:o.jsx(Jr,{size:"14"})})]})}function od({note:e,isInstruction:t=!1,isHeadingNull:n=!1,maxWidth:r="450px"}){return o.jsxs("div",{className:"note",style:{maxWidth:r},children:[!n&&o.jsx("h4",{className:"mt-0",children:t?m("Instruction","bit-integrations"):m("Note","bit-integrations")}),o.jsx("div",{className:"note-text",dangerouslySetInnerHTML:{__html:m(e,"bit-integrations")}})]})}export{Uo as $,Tc as A,Rc as B,Ac as C,ed as D,Ic as E,qc as F,uc as G,Gc as H,Qc as I,Bc as J,Nc as K,Sc as L,jc as M,Yc as N,Kc as O,gc as P,Jc as Q,lc as R,Fl as S,_c as T,Ec as U,Uc as V,rc as W,$c as X,Dc as Y,Xc as Z,Zc as _,pc as a,Fc as a0,wc as a1,td as a2,nd as a3,rd as a4,id as a5,sd as a6,jr as a7,ad as a8,od as a9,Wc as aa,zc as ab,Dl as ac,kc as ad,Hc as ae,Pc as af,qs as ag,Lc as ah,Mc as ai,Un as aj,cc as b,fc as c,Xl as d,vc as e,Zl as f,oc as g,yc as h,xc as i,mc as j,wl as k,dc as l,bc as m,ec as n,tc as o,hc as p,ic as q,Oc as r,Cc as s,sc as t,it as u,nc as v,ac as w,E as x,zn as y,Vc as z};