@genesislcap/design-system-configurator 14.46.0 → 14.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{361.361.f07c37795d71f6b613f8.js → 361.361.c47ca1da3a42ac60d3ed.js} +2 -2
- package/dist/{361.cfdc54253a20886a43fade5f43f70c87.js.map → 361.a1b4dda436f688032dca2de3232d9ab4.js.map} +1 -1
- package/dist/{420.420.f60703058049d58ce37f.js → 420.420.d70ea1f431865b5aab61.js} +2 -2
- package/dist/{430.430.453a7b1caaa3ce7b828e.js → 430.430.bc5fc2717df103379c79.js} +1 -1
- package/dist/{661.661.6e3d289349bd37e350f9.js → 661.661.72d9c6766e905a067f1e.js} +3 -3
- package/dist/{661.cf2a61fe5bd571747fac2940dc214961.js.map → 661.955b15ff5536a44d8697ecee9a7fd06d.js.map} +1 -1
- package/dist/{688.688.19d97a412e5d3bbc6e18.js → 688.688.5f001adaa2dc4bfdb4dc.js} +1 -1
- package/dist/{755.755.1d420c67124c8c26945d.js → 755.755.eae9ef83f18f43f4a5ce.js} +1 -1
- package/dist/{designSystemConfigurator.1a95d182e2aef730f6990e0091dfb639.js.map → designSystemConfigurator.e2f12389b692604b7c73be04d6a11724.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/info.html +4 -4
- package/dist/{main.df52f8ce125c61295397.js → main.86866fbb1abbd578b5d3.js} +2 -2
- package/dist/{main.415044279e4252c7194570ab09b0de66.js.map → main.ce399d14f3b7f4bde4eee5bc16b35f89.js.map} +1 -1
- package/dist/{npm.lodash.913.d264c63c00ee3a0ea033.js → npm.lodash.913.1b6ad6b302bb171ac533.js} +1 -1
- package/dist/remoteEntry.js +2 -2
- package/package.json +7 -7
- /package/dist/{420.420.f60703058049d58ce37f.js.LICENSE.txt → 420.420.d70ea1f431865b5aab61.js.LICENSE.txt} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! For license information please see 420.420.
|
|
1
|
+
/*! For license information please see 420.420.d70ea1f431865b5aab61.js.LICENSE.txt */
|
|
2
2
|
(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[420],{87530:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,o=36e5,i="millisecond",a="second",n="minute",s="hour",r="day",l="week",d="month",c="quarter",u="year",p="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],o=e%100;return"["+e+(t[(o-20)%10]||t[o]||t[0])+"]"}},g=function(e,t,o){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(o)+e},b={s:g,z:function(e){var t=-e.utcOffset(),o=Math.abs(t),i=Math.floor(o/60),a=o%60;return(t<=0?"+":"-")+g(i,2,"0")+":"+g(a,2,"0")},m:function e(t,o){if(t.date()<o.date())return-e(o,t);var i=12*(o.year()-t.year())+(o.month()-t.month()),a=t.clone().add(i,d),n=o-a<0,s=t.clone().add(i+(n?-1:1),d);return+(-(i+(o-a)/(n?a-s:s-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:d,y:u,w:l,d:r,D:p,h:s,m:n,s:a,ms:i,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",w={};w[y]=v;var x=function(e){return e instanceof D},F=function e(t,o,i){var a;if(!t)return y;if("string"==typeof t){var n=t.toLowerCase();w[n]&&(a=n),o&&(w[n]=o,a=n);var s=t.split("-");if(!a&&s.length>1)return e(s[0])}else{var r=t.name;w[r]=t,a=r}return!i&&a&&(y=a),a||!i&&y},$=function(e,t){if(x(e))return e.clone();var o="object"==typeof t?t:{};return o.date=e,o.args=arguments,new D(o)},S=b;S.l=F,S.i=x,S.w=function(e,t){return $(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var D=function(){function v(e){this.$L=F(e.locale,null,!0),this.parse(e)}var g=v.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,o=e.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(m);if(i){var a=i[2]-1||0,n=(i[7]||"0").substring(0,3);return o?new Date(Date.UTC(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],a,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var o=$(e);return this.startOf(t)<=o&&o<=this.endOf(t)},g.isAfter=function(e,t){return $(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<$(e)},g.$g=function(e,t,o){return S.u(e)?this[t]:this.set(o,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var o=this,i=!!S.u(t)||t,c=S.p(e),h=function(e,t){var a=S.w(o.$u?Date.UTC(o.$y,t,e):new Date(o.$y,t,e),o);return i?a:a.endOf(r)},m=function(e,t){return S.w(o.toDate()[e].apply(o.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(t)),o)},f=this.$W,v=this.$M,g=this.$D,b="set"+(this.$u?"UTC":"");switch(c){case u:return i?h(1,0):h(31,11);case d:return i?h(1,v):h(0,v+1);case l:var y=this.$locale().weekStart||0,w=(f<y?f+7:f)-y;return h(i?g-w:g+(6-w),v);case r:case p:return m(b+"Hours",0);case s:return m(b+"Minutes",1);case n:return m(b+"Seconds",2);case a:return m(b+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var o,l=S.p(e),c="set"+(this.$u?"UTC":""),h=(o={},o[r]=c+"Date",o[p]=c+"Date",o[d]=c+"Month",o[u]=c+"FullYear",o[s]=c+"Hours",o[n]=c+"Minutes",o[a]=c+"Seconds",o[i]=c+"Milliseconds",o)[l],m=l===r?this.$D+(t-this.$W):t;if(l===d||l===u){var f=this.clone().set(p,1);f.$d[h](m),f.init(),this.$d=f.set(p,Math.min(this.$D,f.daysInMonth())).$d}else h&&this.$d[h](m);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[S.p(e)]()},g.add=function(i,c){var p,h=this;i=Number(i);var m=S.p(c),f=function(e){var t=$(h);return S.w(t.date(t.date()+Math.round(e*i)),h)};if(m===d)return this.set(d,this.$M+i);if(m===u)return this.set(u,this.$y+i);if(m===r)return f(1);if(m===l)return f(7);var v=(p={},p[n]=t,p[s]=o,p[a]=e,p)[m]||1,g=this.$d.getTime()+i*v;return S.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,o=this.$locale();if(!this.isValid())return o.invalidDate||h;var i=e||"YYYY-MM-DDTHH:mm:ssZ",a=S.z(this),n=this.$H,s=this.$m,r=this.$M,l=o.weekdays,d=o.months,c=function(e,o,a,n){return e&&(e[o]||e(t,i))||a[o].slice(0,n)},u=function(e){return S.s(n%12||12,e,"0")},p=o.meridiem||function(e,t,o){var i=e<12?"AM":"PM";return o?i.toLowerCase():i},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:r+1,MM:S.s(r+1,2,"0"),MMM:c(o.monthsShort,r,d,3),MMMM:c(d,r),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:c(o.weekdaysMin,this.$W,l,2),ddd:c(o.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(n),HH:S.s(n,2,"0"),h:u(1),hh:u(2),a:p(n,s,!0),A:p(n,s,!1),m:String(s),mm:S.s(s,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:a};return i.replace(f,(function(e,t){return t||m[e]||a.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(i,p,h){var m,f=S.p(p),v=$(i),g=(v.utcOffset()-this.utcOffset())*t,b=this-v,y=S.m(this,v);return y=(m={},m[u]=y/12,m[d]=y,m[c]=y/3,m[l]=(b-g)/6048e5,m[r]=(b-g)/864e5,m[s]=b/o,m[n]=b/t,m[a]=b/e,m)[f]||b,h?y:S.a(y)},g.daysInMonth=function(){return this.endOf(d).$D},g.$locale=function(){return w[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var o=this.clone(),i=F(e,t,!0);return i&&(o.$L=i),o},g.clone=function(){return S.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),C=D.prototype;return $.prototype=C,[["$ms",i],["$s",a],["$m",n],["$H",s],["$W",r],["$M",d],["$y",u],["$D",p]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),$.extend=function(e,t){return e.$i||(e(t,D,$),e.$i=!0),$},$.locale=F,$.isDayjs=x,$.unix=function(e){return $(1e3*e)},$.en=w[y],$.Ls=w,$.p={},$}()},78113:function(e){e.exports=function(){"use strict";return function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}}()},81708:(e,t,o)=>{"use strict";o.r(t),o.d(t,{ActionsMenu:()=>m,Anchor:()=>y,Badge:()=>D,Banner:()=>L,BaseDatasource:()=>Qr,Breadcrumb:()=>E,BreadcrumbItem:()=>G,Button:()=>q,CSSVarsTokenMapper:()=>Wr,Card:()=>ee,Checkbox:()=>se,Combobox:()=>pe,ConnectionIndicator:()=>we,DEFUALT_FILTER_BAR_COLUMNS:()=>Ri,DataGrid:()=>Se,DataGridCell:()=>ke,DataGridDatasource:()=>el,DataGridRow:()=>Ne,DatePicker:()=>Xe,Dialog:()=>Wt,DialogElement:()=>Yt,Disclosure:()=>Zt,Divider:()=>io,DropdownMenu:()=>mo,ErrorBanner:()=>yo,ErrorBoundary:()=>Mo,ErrorBoundaryEvent:()=>xo,ErrorDialog:()=>Ho,FaPrefixFromStyle:()=>Sa,FileUpload:()=>ri,Filter:()=>Fi,FilterBar:()=>Li,FilterEvents:()=>xi,FlexLayout:()=>Bi,FlexMediaQueriesEnum:()=>Ni,Flipper:()=>Vi,Flyout:()=>Zi,FoundationDesignSystemProvider:()=>Pt,FoundationRouter:()=>rl,GridLayout:()=>la,GridLayoutItem:()=>ha,GridMediaQueriesEnum:()=>ta,Icon:()=>Da,ListboxOption:()=>ka,Menu:()=>Aa,MenuItem:()=>ja,Modal:()=>Xa,Multiselect:()=>nn,MultiselectDatasource:()=>il,NumberField:()=>dn,OptionsDatasource:()=>ol,Popper:()=>fn,Progress:()=>xn,ProgressRing:()=>_n,Radio:()=>Mn,RadioGroup:()=>Hn,SegmentedControl:()=>Un,SegmentedItem:()=>Zn,Select:()=>is,Skeleton:()=>ds,Slider:()=>gs,Snackbar:()=>Ss,Switch:()=>Os,Tab:()=>Ns,TabPanel:()=>Bs,Tabs:()=>Ys,TextArea:()=>Js,TextField:()=>ar,Toast:()=>pr,Toolbar:()=>vr,Tooltip:()=>Fr,TreeItem:()=>Or,TreeView:()=>Nr,UrlInput:()=>Gr,accentFillActive:()=>v.accentFillActive,accentFillActiveDelta:()=>v.accentFillActiveDelta,accentFillFocus:()=>v.accentFillFocus,accentFillFocusDelta:()=>v.accentFillFocusDelta,accentFillHover:()=>v.accentFillHover,accentFillHoverDelta:()=>v.accentFillHoverDelta,accentFillRest:()=>v.accentFillRest,accentFillRestDelta:()=>v.accentFillRestDelta,accentForegroundActive:()=>v.accentForegroundActive,accentForegroundActiveDelta:()=>v.accentForegroundActiveDelta,accentForegroundFocus:()=>v.accentForegroundFocus,accentForegroundFocusDelta:()=>v.accentForegroundFocusDelta,accentForegroundHover:()=>v.accentForegroundHover,accentForegroundHoverDelta:()=>v.accentForegroundHoverDelta,accentForegroundRest:()=>v.accentForegroundRest,accentForegroundRestDelta:()=>v.accentForegroundRestDelta,accentPalette:()=>v.accentPalette,accentPaletteValue:()=>_t,actionsMenuBaseStyles:()=>d,baseComponents:()=>Vr,baseHeightMultiplier:()=>v.baseHeightMultiplier,baseLayerLuminance:()=>v.baseLayerLuminance,baseLayerLuminanceValue:()=>kt,black:()=>Qe,bodyFont:()=>v.bodyFont,closeIcon:()=>Gt,configureDesignSystem:()=>Ct,controlCornerRadius:()=>v.controlCornerRadius,controlCornerRadiusValue:()=>Rt,createDesignSystemProxy:()=>Ur,createFormData:()=>ei,defaultAnchorConfig:()=>x,defaultBadgeConfig:()=>_,defaultBreadcrumbConfig:()=>P,defaultBreadcrumbItemConfig:()=>V,defaultButtonConfig:()=>K,defaultCardConfig:()=>oe,defaultCheckboxConfig:()=>le,defaultComboboxConfig:()=>me,defaultDataGridCellConfig:()=>Re,defaultDataGridConfig:()=>Ce,defaultDataGridRowConfig:()=>Ee,defaultDatePickerConfig:()=>qe,defaultDialogConfig:()=>Ut,defaultDisclosureConfig:()=>Qt,defaultDividerConfig:()=>no,defaultFileUploadConfig:()=>di,defaultFillColor:()=>tt,defaultFlexLayoutConfig:()=>Hi,defaultFlipperConfig:()=>Yi,defaultFlyoutConfig:()=>Qi,defaultGridLayoutConfig:()=>sa,defaultGridLayoutItemConfig:()=>pa,defaultIconConfig:()=>$a,defaultListboxOptionConfig:()=>Ra,defaultMenuConfig:()=>Ia,defaultMenuItemConfig:()=>za,defaultModalConfig:()=>qa,defaultMultiselectConfig:()=>an,defaultNeutralForegroundContrast:()=>mt,defaultNumberFieldConfig:()=>un,defaultProgressConfig:()=>$n,defaultProgressRingConfig:()=>kn,defaultRadioConfig:()=>An,defaultRadioGroupConfig:()=>jn,defaultSegmentedControlConfig:()=>Wn,defaultSegmentedItemConfig:()=>Qn,defaultSelectConfig:()=>ns,defaultSkeletonConfig:()=>us,defaultSliderConfig:()=>ys,defaultSwitchConfig:()=>Ts,defaultTabConfig:()=>Es,defaultTabPanelConfig:()=>Gs,defaultTabsConfig:()=>qs,defaultTextAreaConfig:()=>er,defaultTextFieldConfig:()=>sr,defaultToastConfig:()=>ur,defaultToolbarConfig:()=>br,defaultTooltipConfig:()=>Sr,defaultTreeItemConfig:()=>Tr,defaultTreeViewConfig:()=>Er,defaultUrlInputConfig:()=>jr,defineFactory:()=>al,density:()=>v.density,designToken:()=>yt,designUnit:()=>v.designUnit,designUnitValue:()=>Lt,direction:()=>v.direction,directionValue:()=>Tt,disabledOpacity:()=>v.disabledOpacity,downloadFile:()=>oi,dropdownMenuBaseStyles:()=>lo,errorDialogTemplate:()=>Io,extractMenuItems:()=>uo,fillColor:()=>v.fillColor,flyoutAnimationTime:()=>qi,focusStrokeInner:()=>v.focusStrokeInner,focusStrokeOuter:()=>v.focusStrokeOuter,focusStrokeWidth:()=>v.focusStrokeWidth,foregroundOnAccentActive:()=>v.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>v.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>v.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>v.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>v.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>v.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>v.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>v.foregroundOnAccentRestLarge,foundationActionsMenu:()=>f,foundationActionsMenuStyles:()=>c,foundationActionsMenuTemplate:()=>h,foundationAnchor:()=>F,foundationAnchorShadowOptions:()=>w,foundationAnchorStyles:()=>g,foundationAnchorTemplate:()=>b,foundationBadge:()=>O,foundationBadgeShadowOptions:()=>C,foundationBadgeStyles:()=>$,foundationBadgeTemplate:()=>S,foundationBanner:()=>M,foundationBannerShadowOptions:()=>R,foundationBannerStyles:()=>k,foundationBannerTemplate:()=>T,foundationBreadcrumb:()=>H,foundationBreadcrumbItem:()=>U,foundationBreadcrumbItemShadowOptions:()=>z,foundationBreadcrumbItemStyles:()=>B,foundationBreadcrumbItemTemplate:()=>j,foundationBreadcrumbShadowOptions:()=>I,foundationBreadcrumbStyles:()=>N,foundationBreadcrumbTemplate:()=>A,foundationButton:()=>Z,foundationButtonShadowOptions:()=>X,foundationButtonStyles:()=>Y,foundationButtonTemplate:()=>W,foundationCard:()=>ie,foundationCardShadowOptions:()=>te,foundationCardStyles:()=>J,foundationCardTemplate:()=>Q,foundationCheckbox:()=>de,foundationCheckboxShadowOptions:()=>re,foundationCheckboxStyles:()=>ae,foundationCheckboxTemplate:()=>ne,foundationCombobox:()=>fe,foundationComboboxShadowOptions:()=>he,foundationComboboxStyles:()=>ce,foundationComboboxTemplate:()=>ue,foundationConnectionIndicator:()=>xe,foundationConnectionIndicatorStyles:()=>be,foundationConnectionIndicatorTemplate:()=>ye,foundationDataGrid:()=>_e,foundationDataGridCell:()=>Le,foundationDataGridCellShadowOptions:()=>Te,foundationDataGridCellStyles:()=>Oe,foundationDataGridCellTemplate:()=>r.dataGridCellTemplate,foundationDataGridRow:()=>Ie,foundationDataGridRowShadowOptions:()=>Ae,foundationDataGridRowStyles:()=>Me,foundationDataGridRowTemplate:()=>r.dataGridRowTemplate,foundationDataGridShadowOptions:()=>De,foundationDataGridStyles:()=>Fe,foundationDataGridTemplate:()=>$e,foundationDatePicker:()=>Ke,foundationDatePickerShadowOptions:()=>We,foundationDatePickerStyles:()=>Ue,foundationDatePickerTemplate:()=>Ye,foundationDesignSystemProvider:()=>Ht,foundationDialog:()=>qt,foundationDialogShadowOptions:()=>Vt,foundationDialogStyles:()=>jt,foundationDialogTemplate:()=>zt,foundationDisclosure:()=>eo,foundationDisclosureShadowOptions:()=>Jt,foundationDisclosureStyles:()=>Xt,foundationDisclosureTemplate:()=>Kt,foundationDivider:()=>so,foundationDividerShadowOptions:()=>ao,foundationDividerStyles:()=>to,foundationDividerTemplate:()=>oo,foundationDropdownMenu:()=>fo,foundationDropdownMenuStyles:()=>co,foundationDropdownMenuTemplate:()=>ho,foundationErrorBanner:()=>wo,foundationErrorBannerShadowOptions:()=>bo,foundationErrorBannerTemplate:()=>go,foundationErrorBoundary:()=>No,foundationErrorBoundaryShadowOptions:()=>Lo,foundationErrorBoundaryTemplate:()=>Ro,foundationErrorDialog:()=>Bo,foundationErrorDialogShadowOptions:()=>Po,foundationErrorDialogStyles:()=>Ao,foundationFileUpload:()=>ci,foundationFileUploadShadowOptions:()=>li,foundationFileUploadStyles:()=>Zo,foundationFileUploadTemplate:()=>Qo,foundationFilter:()=>$i,foundationFilterBar:()=>Mi,foundationFilterBarStyles:()=>Di,foundationFilterBarTemplate:()=>Ti,foundationFilterStyles:()=>ui,foundationFilterTemplate:()=>wi,foundationFlexLayout:()=>ji,foundationFlexLayoutShadowOptions:()=>Pi,foundationFlexLayoutStyles:()=>Ei,foundationFlexLayoutTemplate:()=>Ii,foundationFlipper:()=>Wi,foundationFlipperShadowOptions:()=>Ui,foundationFlipperStyles:()=>Gi,foundationFlipperTemplate:()=>zi,foundationFlyout:()=>ea,foundationFlyoutShadowOptions:()=>Ji,foundationFlyoutStyles:()=>Xi,foundationFlyoutTemplate:()=>Ki,foundationGridLayout:()=>da,foundationGridLayoutItem:()=>ma,foundationGridLayoutItemShadowOptions:()=>ua,foundationGridLayoutItemTemplate:()=>ca,foundationGridLayoutShadowOptions:()=>na,foundationGridLayoutStyles:()=>ia,foundationGridLayoutTemplate:()=>aa,foundationIcon:()=>Ca,foundationIconShadowOptions:()=>Fa,foundationIconStyles:()=>wa,foundationIconTemplate:()=>xa,foundationListboxOption:()=>La,foundationListboxOptionShadowOptions:()=>Ta,foundationListboxOptionStyles:()=>_a,foundationListboxOptionTemplate:()=>Oa,foundationMenu:()=>Pa,foundationMenuItem:()=>Va,foundationMenuItemShadowOptions:()=>Ga,foundationMenuItemStyles:()=>Ha,foundationMenuItemTemplate:()=>Ba,foundationMenuShadowOptions:()=>Ea,foundationMenuStyles:()=>Ma,foundationMenuTemplate:()=>Na,foundationModal:()=>Ka,foundationModalShadowOptions:()=>Wa,foundationModalStyles:()=>Ua,foundationModalTemplate:()=>Ya,foundationMultiselect:()=>sn,foundationMultiselectShadowOptions:()=>on,foundationNumberField:()=>pn,foundationNumberFieldShadowOptions:()=>cn,foundationNumberFieldStyles:()=>rn,foundationNumberFieldTemplate:()=>ln,foundationPopper:()=>bn,foundationProgress:()=>Sn,foundationProgressRing:()=>Tn,foundationProgressRingShadowOptions:()=>On,foundationProgressRingStyles:()=>Dn,foundationProgressRingTemplate:()=>Cn,foundationProgressShadowOptions:()=>Fn,foundationProgressStyles:()=>yn,foundationProgressTemplate:()=>wn,foundationRadio:()=>En,foundationRadioGroup:()=>Gn,foundationRadioGroupShadowOptions:()=>Bn,foundationRadioGroupStyles:()=>In,foundationRadioGroupTemplate:()=>Pn,foundationRadioShadowOptions:()=>Nn,foundationRadioStyles:()=>Rn,foundationRadioTemplate:()=>Ln,foundationSegmentedControl:()=>qn,foundationSegmentedControlShadowOptions:()=>Yn,foundationSegmentedControlStyles:()=>zn,foundationSegmentedControlTemplate:()=>Vn,foundationSegmentedItem:()=>es,foundationSegmentedItemShadowOptions:()=>Jn,foundationSegmentedItemStyles:()=>Xn,foundationSegmentedItemTemplate:()=>Kn,foundationSelect:()=>ss,foundationSelectShadowOptions:()=>as,foundationSelectStyles:()=>ts,foundationSelectTemplate:()=>os,foundationSkeleton:()=>ps,foundationSkeletonShadowOptions:()=>cs,foundationSkeletonStyles:()=>rs,foundationSkeletonTemplate:()=>ls,foundationSlider:()=>ws,foundationSliderShadowOptions:()=>bs,foundationSliderStyles:()=>hs,foundationSliderTemplate:()=>vs,foundationSnackbar:()=>Ds,foundationSnackbarShadowOptions:()=>$s,foundationSnackbarStyles:()=>xs,foundationSnackbarTemplate:()=>Fs,foundationSwitch:()=>Rs,foundationSwitchShadowOptions:()=>ks,foundationSwitchStyles:()=>Cs,foundationSwitchTemplate:()=>_s,foundationTab:()=>Is,foundationTabPanel:()=>zs,foundationTabPanelShadowOptions:()=>js,foundationTabPanelStyles:()=>Ps,foundationTabPanelTemplate:()=>Hs,foundationTabShadowOptions:()=>As,foundationTabStyles:()=>Ls,foundationTabTemplate:()=>Ms,foundationTabs:()=>Xs,foundationTabsShadowOptions:()=>Ws,foundationTabsStyles:()=>Vs,foundationTabsTemplate:()=>Us,foundationTextArea:()=>tr,foundationTextAreaShadowOptions:()=>Qs,foundationTextAreaStyles:()=>Ks,foundationTextAreaTemplate:()=>Zs,foundationTextField:()=>rr,foundationTextFieldShadowOptions:()=>nr,foundationTextFieldStyles:()=>or,foundationTextFieldTemplate:()=>ir,foundationToast:()=>hr,foundationToastShadowOptions:()=>cr,foundationToastStyles:()=>lr,foundationToastTemplate:()=>dr,foundationToolbar:()=>yr,foundationToolbarShadowOptions:()=>gr,foundationToolbarStyles:()=>mr,foundationToolbarTemplate:()=>fr,foundationTooltip:()=>Dr,foundationTooltipShadowOptions:()=>$r,foundationTooltipStyles:()=>wr,foundationTooltipTemplate:()=>xr,foundationTreeItem:()=>Rr,foundationTreeItemShadowOptions:()=>kr,foundationTreeItemStyles:()=>Cr,foundationTreeItemTemplate:()=>_r,foundationTreeView:()=>Ir,foundationTreeViewShadowOptions:()=>Ar,foundationTreeViewStyles:()=>Lr,foundationTreeViewTemplate:()=>Mr,foundationUrlInput:()=>zr,foundationUrlInputShadowOptions:()=>Br,foundationUrlInputStyles:()=>Pr,fuiAccentPalette:()=>ct,fuiAccentSwatch:()=>dt,fuiCardFillColor:()=>ht,fuiCardForegroundColor:()=>vt,fuiDefaultCardFillColor:()=>it,fuiDefaultCardPalette:()=>at,fuiFillColor:()=>pt,fuiNeutralPalette:()=>rt,fuiNeutralSwatch:()=>st,getDefaultConfig:()=>$t,getDropdownMenuTemplate:()=>po,getErrorDialogTemplate:()=>Eo,getExports:()=>St,getFontawesomeIconsCss:()=>ya,getPrefixedFileUpload:()=>Jo,getPrefixedMultiselect:()=>en,getTypeRampValue:()=>Dt,jsonConverter:()=>mn,mapType:()=>Ci,maxheight:()=>Ja,menuTemplate:()=>u,mixinFoundationFontFamily:()=>Nt,multiselectStyles:()=>Qa,multiselectTemplate:()=>tn,neutralFillActive:()=>v.neutralFillActive,neutralFillActiveDelta:()=>v.neutralFillActiveDelta,neutralFillFocus:()=>v.neutralFillFocus,neutralFillFocusDelta:()=>v.neutralFillFocusDelta,neutralFillHover:()=>v.neutralFillHover,neutralFillHoverDelta:()=>v.neutralFillHoverDelta,neutralFillInputActive:()=>v.neutralFillInputActive,neutralFillInputActiveDelta:()=>v.neutralFillInputActiveDelta,neutralFillInputFocus:()=>v.neutralFillInputFocus,neutralFillInputFocusDelta:()=>v.neutralFillInputFocusDelta,neutralFillInputHover:()=>v.neutralFillInputHover,neutralFillInputHoverDelta:()=>v.neutralFillInputHoverDelta,neutralFillInputRest:()=>v.neutralFillInputRest,neutralFillInputRestDelta:()=>v.neutralFillInputRestDelta,neutralFillLayerRest:()=>v.neutralFillLayerRest,neutralFillLayerRestDelta:()=>v.neutralFillLayerRestDelta,neutralFillRest:()=>v.neutralFillRest,neutralFillRestDelta:()=>v.neutralFillRestDelta,neutralFillStealthActive:()=>v.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>v.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>v.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>v.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>v.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>v.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>v.neutralFillStealthRest,neutralFillStealthRestDelta:()=>v.neutralFillStealthRestDelta,neutralFillStrongActive:()=>v.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>v.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>v.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>v.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>v.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>v.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>v.neutralFillStrongRest,neutralFillStrongRestDelta:()=>v.neutralFillStrongRestDelta,neutralForeground:()=>ft,neutralForegroundHint:()=>v.neutralForegroundHint,neutralForegroundRest:()=>v.neutralForegroundRest,neutralLayer1:()=>v.neutralLayer1,neutralLayer2:()=>v.neutralLayer2,neutralLayer3:()=>v.neutralLayer3,neutralLayer4:()=>v.neutralLayer4,neutralLayerCardContainer:()=>v.neutralLayerCardContainer,neutralLayerFloating:()=>v.neutralLayerFloating,neutralPalette:()=>v.neutralPalette,neutralPaletteValue:()=>Ot,neutralStrokeActive:()=>v.neutralStrokeActive,neutralStrokeActiveDelta:()=>v.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>v.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>v.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>v.neutralStrokeFocus,neutralStrokeFocusDelta:()=>v.neutralStrokeFocusDelta,neutralStrokeHover:()=>v.neutralStrokeHover,neutralStrokeHoverDelta:()=>v.neutralStrokeHoverDelta,neutralStrokeRest:()=>v.neutralStrokeRest,neutralStrokeRestDelta:()=>v.neutralStrokeRestDelta,paletteFromHex:()=>xt,provideDesignSystem:()=>Yr,provideTokens:()=>bt,registerFoundationDesignSystem:()=>ll,singleOptionTemplate:()=>p,strokeWidth:()=>v.strokeWidth,swatchConverter:()=>wt,tagFor:()=>nl,typeRampBaseFontSize:()=>v.typeRampBaseFontSize,typeRampBaseLineHeight:()=>v.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>v.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>v.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>v.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>v.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>v.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>v.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>v.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>v.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>v.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>v.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>v.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>v.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>v.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>v.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>v.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>v.typeRampPlus6LineHeight,uploadFiles:()=>ti,urlinputTemplate:()=>Hr,white:()=>Je});var i={};o.r(i),o.d(i,{accentFillActive:()=>v.accentFillActive,accentFillActiveDelta:()=>v.accentFillActiveDelta,accentFillFocus:()=>v.accentFillFocus,accentFillFocusDelta:()=>v.accentFillFocusDelta,accentFillHover:()=>v.accentFillHover,accentFillHoverDelta:()=>v.accentFillHoverDelta,accentFillRest:()=>v.accentFillRest,accentFillRestDelta:()=>v.accentFillRestDelta,accentForegroundActive:()=>v.accentForegroundActive,accentForegroundActiveDelta:()=>v.accentForegroundActiveDelta,accentForegroundFocus:()=>v.accentForegroundFocus,accentForegroundFocusDelta:()=>v.accentForegroundFocusDelta,accentForegroundHover:()=>v.accentForegroundHover,accentForegroundHoverDelta:()=>v.accentForegroundHoverDelta,accentForegroundRest:()=>v.accentForegroundRest,accentForegroundRestDelta:()=>v.accentForegroundRestDelta,accentPalette:()=>v.accentPalette,baseHeightMultiplier:()=>v.baseHeightMultiplier,baseLayerLuminance:()=>v.baseLayerLuminance,bodyFont:()=>v.bodyFont,controlCornerRadius:()=>v.controlCornerRadius,defaultNeutralForegroundContrast:()=>mt,density:()=>v.density,designUnit:()=>v.designUnit,direction:()=>v.direction,disabledOpacity:()=>v.disabledOpacity,fillColor:()=>v.fillColor,focusStrokeInner:()=>v.focusStrokeInner,focusStrokeOuter:()=>v.focusStrokeOuter,focusStrokeWidth:()=>v.focusStrokeWidth,foregroundOnAccentActive:()=>v.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>v.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>v.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>v.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>v.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>v.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>v.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>v.foregroundOnAccentRestLarge,fuiCardFillColor:()=>ht,fuiCardForegroundColor:()=>vt,fuiFillColor:()=>pt,neutralFillActive:()=>v.neutralFillActive,neutralFillActiveDelta:()=>v.neutralFillActiveDelta,neutralFillFocus:()=>v.neutralFillFocus,neutralFillFocusDelta:()=>v.neutralFillFocusDelta,neutralFillHover:()=>v.neutralFillHover,neutralFillHoverDelta:()=>v.neutralFillHoverDelta,neutralFillInputActive:()=>v.neutralFillInputActive,neutralFillInputActiveDelta:()=>v.neutralFillInputActiveDelta,neutralFillInputFocus:()=>v.neutralFillInputFocus,neutralFillInputFocusDelta:()=>v.neutralFillInputFocusDelta,neutralFillInputHover:()=>v.neutralFillInputHover,neutralFillInputHoverDelta:()=>v.neutralFillInputHoverDelta,neutralFillInputRest:()=>v.neutralFillInputRest,neutralFillInputRestDelta:()=>v.neutralFillInputRestDelta,neutralFillLayerRest:()=>v.neutralFillLayerRest,neutralFillLayerRestDelta:()=>v.neutralFillLayerRestDelta,neutralFillRest:()=>v.neutralFillRest,neutralFillRestDelta:()=>v.neutralFillRestDelta,neutralFillStealthActive:()=>v.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>v.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>v.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>v.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>v.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>v.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>v.neutralFillStealthRest,neutralFillStealthRestDelta:()=>v.neutralFillStealthRestDelta,neutralFillStrongActive:()=>v.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>v.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>v.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>v.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>v.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>v.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>v.neutralFillStrongRest,neutralFillStrongRestDelta:()=>v.neutralFillStrongRestDelta,neutralForeground:()=>ft,neutralForegroundHint:()=>v.neutralForegroundHint,neutralForegroundRest:()=>v.neutralForegroundRest,neutralLayer1:()=>v.neutralLayer1,neutralLayer2:()=>v.neutralLayer2,neutralLayer3:()=>v.neutralLayer3,neutralLayer4:()=>v.neutralLayer4,neutralLayerCardContainer:()=>v.neutralLayerCardContainer,neutralLayerFloating:()=>v.neutralLayerFloating,neutralPalette:()=>v.neutralPalette,neutralStrokeActive:()=>v.neutralStrokeActive,neutralStrokeActiveDelta:()=>v.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>v.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>v.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>v.neutralStrokeFocus,neutralStrokeFocusDelta:()=>v.neutralStrokeFocusDelta,neutralStrokeHover:()=>v.neutralStrokeHover,neutralStrokeHoverDelta:()=>v.neutralStrokeHoverDelta,neutralStrokeRest:()=>v.neutralStrokeRest,neutralStrokeRestDelta:()=>v.neutralStrokeRestDelta,strokeWidth:()=>v.strokeWidth,typeRampBaseFontSize:()=>v.typeRampBaseFontSize,typeRampBaseLineHeight:()=>v.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>v.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>v.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>v.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>v.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>v.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>v.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>v.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>v.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>v.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>v.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>v.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>v.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>v.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>v.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>v.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>v.typeRampPlus6LineHeight});var a={};o.r(a),o.d(a,{accentPaletteValue:()=>_t,baseLayerLuminanceValue:()=>kt,controlCornerRadiusValue:()=>Rt,designUnitValue:()=>Lt,directionValue:()=>Tt,neutralPaletteValue:()=>Ot});var n=o(38092),s=o(83147),r=o(75951),l=o(9770);const d=(e,t)=>s.css`
|
|
3
3
|
:host {
|
|
4
4
|
--actions-opener-height-multiplier: 0.7px;
|
|
@@ -487,7 +487,7 @@
|
|
|
487
487
|
`)}
|
|
488
488
|
</div>
|
|
489
489
|
</div>
|
|
490
|
-
`,We=void 0,qe={};class Xe extends r.FoundationElement{formatChanged(e,t){t&&this.calendar&&(this.formatDate=He()(this.currentDate.Date).format(t))}valueChanged(e,t){t&&this.calendar&&(this.currentDate=new Ge(new Date(t)),this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=He()(this.currentDate.Date).format(this.format),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid())}constructor(){var e;super(),this.format="MM-DD-YYYY",this.visible=!1,this.position="bottom";const t="en-US",o=new Date(null!==(e=this.currentDate)&&void 0!==e?e:this.getAttribute("value")||Date.now());this.substringNumber=3,this.currentDate=new Ge(o,t),this.value=He()(this.currentDate.Date).format("MM-DD-YYYY"),this.calendar=new Ve(this.currentDate.year,this.currentDate.monthNumber,t)}connectedCallback(){super.connectedCallback(),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.formatDate=He()(this.currentDate.Date).format(this.format),this.toggleButton.addEventListener("click",(()=>this.toggleCalendar())),this.prevBtn.addEventListener("click",(()=>this.prevMonth())),this.nextBtn.addEventListener("click",(()=>this.nextMonth())),this.monthList=this.getMonthDaysGrid()}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}toggleCalendar(){this.visible=!this.visible,this.toggleVisibility(),this.isCurrentCalendarMonth()||(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText())}toggleVisibility(){this.calendarDropdownClasses=(0,l.A)(["visible",this.visible],this.position)}isSelectedDate(e){return He()(e.Date).isSame(this.currentDate.Date,"day")}isCurrentCalendarMonth(){return this.currentMonth===this.currentDate.monthNumber&&this.currentYear===this.currentDate.year}prevMonth(){this.calendar.goToPreviousMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}nextMonth(){this.calendar.goToNextMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}selectDay(e){He()(e.Date).isSame(this.currentDate.Date)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=He()(this.currentDate.Date).format(this.format),this.value=He()(e.Date).format("MM-DD-YYYY"),this.toggleCalendar())}getMonthDaysGrid(){const e=this.calendar.month.getDay(1),t=this.calendar.getPreviousMonth(),o=e.dayNumber-1,i=this.calendar.month.numberOfDays+o,a=Array.from({length:i});for(let e=o;e<i;e+=1)a[e]=this.calendar.month.getDay(e+1-o);for(let e=0;e<o;e+=1){const i=o-(e+1);a[e]=t.getDay(t.numberOfDays-i)}return a}}(0,n.__decorate)([s.attr],Xe.prototype,"format",void 0),(0,n.__decorate)([s.attr],Xe.prototype,"visible",void 0),(0,n.__decorate)([s.attr],Xe.prototype,"position",void 0),(0,n.__decorate)([s.attr],Xe.prototype,"value",void 0),(0,n.__decorate)([s.observable],Xe.prototype,"currentDate",void 0),(0,n.__decorate)([s.observable],Xe.prototype,"currentMonth",void 0),(0,n.__decorate)([s.observable],Xe.prototype,"currentYear",void 0),(0,n.__decorate)([s.observable],Xe.prototype,"calendarDropdownClasses",void 0),(0,n.__decorate)([s.observable],Xe.prototype,"formatDate",void 0),(0,n.__decorate)([s.observable],Xe.prototype,"monthList",void 0);const Ke=Xe.compose(Object.assign({baseName:"date-picker",styles:Ue,template:Ye,shadowOptions:We},qe));var Ze=o(82694);const Je=v.SwatchRGB.create(1,1,1),Qe=v.SwatchRGB.create(0,0,0),et=(0,Ze.parseColorHexRGB)("#585858"),tt=v.SwatchRGB.create(et.r,et.g,et.b),ot=(0,Ze.parseColorHexRGB)("#ffffff"),it=v.SwatchRGB.create(ot.r,ot.g,ot.b),at=v.PaletteRGB.from(it),nt=(0,Ze.parseColorHexRGB)("#eeeeee"),st=v.SwatchRGB.create(nt.r,nt.g,nt.b),rt=v.PaletteRGB.from(st),lt=(0,Ze.parseColorHexRGB)("#08c3a5"),dt=v.SwatchRGB.create(lt.r,lt.g,lt.b),ct=v.PaletteRGB.from(dt),{create:ut}=r.DesignToken,pt=ut("fui-fill-color").withDefault(tt),ht=ut({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(it),mt=14;function ft(e,t){return e.colorContrast(t,mt)}const vt=ut({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault((e=>ft(ut("fui-card-palette").withDefault(at).getValueFor(e),ht.getValueFor(e))));var gt=o(
|
|
490
|
+
`,We=void 0,qe={};class Xe extends r.FoundationElement{formatChanged(e,t){t&&this.calendar&&(this.formatDate=He()(this.currentDate.Date).format(t))}valueChanged(e,t){t&&this.calendar&&(this.currentDate=new Ge(new Date(t)),this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=He()(this.currentDate.Date).format(this.format),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid())}constructor(){var e;super(),this.format="MM-DD-YYYY",this.visible=!1,this.position="bottom";const t="en-US",o=new Date(null!==(e=this.currentDate)&&void 0!==e?e:this.getAttribute("value")||Date.now());this.substringNumber=3,this.currentDate=new Ge(o,t),this.value=He()(this.currentDate.Date).format("MM-DD-YYYY"),this.calendar=new Ve(this.currentDate.year,this.currentDate.monthNumber,t)}connectedCallback(){super.connectedCallback(),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.formatDate=He()(this.currentDate.Date).format(this.format),this.toggleButton.addEventListener("click",(()=>this.toggleCalendar())),this.prevBtn.addEventListener("click",(()=>this.prevMonth())),this.nextBtn.addEventListener("click",(()=>this.nextMonth())),this.monthList=this.getMonthDaysGrid()}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}toggleCalendar(){this.visible=!this.visible,this.toggleVisibility(),this.isCurrentCalendarMonth()||(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText())}toggleVisibility(){this.calendarDropdownClasses=(0,l.A)(["visible",this.visible],this.position)}isSelectedDate(e){return He()(e.Date).isSame(this.currentDate.Date,"day")}isCurrentCalendarMonth(){return this.currentMonth===this.currentDate.monthNumber&&this.currentYear===this.currentDate.year}prevMonth(){this.calendar.goToPreviousMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}nextMonth(){this.calendar.goToNextMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}selectDay(e){He()(e.Date).isSame(this.currentDate.Date)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=He()(this.currentDate.Date).format(this.format),this.value=He()(e.Date).format("MM-DD-YYYY"),this.toggleCalendar())}getMonthDaysGrid(){const e=this.calendar.month.getDay(1),t=this.calendar.getPreviousMonth(),o=e.dayNumber-1,i=this.calendar.month.numberOfDays+o,a=Array.from({length:i});for(let e=o;e<i;e+=1)a[e]=this.calendar.month.getDay(e+1-o);for(let e=0;e<o;e+=1){const i=o-(e+1);a[e]=t.getDay(t.numberOfDays-i)}return a}}(0,n.__decorate)([s.attr],Xe.prototype,"format",void 0),(0,n.__decorate)([s.attr],Xe.prototype,"visible",void 0),(0,n.__decorate)([s.attr],Xe.prototype,"position",void 0),(0,n.__decorate)([s.attr],Xe.prototype,"value",void 0),(0,n.__decorate)([s.observable],Xe.prototype,"currentDate",void 0),(0,n.__decorate)([s.observable],Xe.prototype,"currentMonth",void 0),(0,n.__decorate)([s.observable],Xe.prototype,"currentYear",void 0),(0,n.__decorate)([s.observable],Xe.prototype,"calendarDropdownClasses",void 0),(0,n.__decorate)([s.observable],Xe.prototype,"formatDate",void 0),(0,n.__decorate)([s.observable],Xe.prototype,"monthList",void 0);const Ke=Xe.compose(Object.assign({baseName:"date-picker",styles:Ue,template:Ye,shadowOptions:We},qe));var Ze=o(82694);const Je=v.SwatchRGB.create(1,1,1),Qe=v.SwatchRGB.create(0,0,0),et=(0,Ze.parseColorHexRGB)("#585858"),tt=v.SwatchRGB.create(et.r,et.g,et.b),ot=(0,Ze.parseColorHexRGB)("#ffffff"),it=v.SwatchRGB.create(ot.r,ot.g,ot.b),at=v.PaletteRGB.from(it),nt=(0,Ze.parseColorHexRGB)("#eeeeee"),st=v.SwatchRGB.create(nt.r,nt.g,nt.b),rt=v.PaletteRGB.from(st),lt=(0,Ze.parseColorHexRGB)("#08c3a5"),dt=v.SwatchRGB.create(lt.r,lt.g,lt.b),ct=v.PaletteRGB.from(dt),{create:ut}=r.DesignToken,pt=ut("fui-fill-color").withDefault(tt),ht=ut({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(it),mt=14;function ft(e,t){return e.colorContrast(t,mt)}const vt=ut({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault((e=>ft(ut("fui-card-palette").withDefault(at).getValueFor(e),ht.getValueFor(e))));var gt=o(59557);const bt=(e,t,o)=>{const i=o?(e,t)=>e.setValueFor(o,t):(e,t)=>e.withDefault(t);Object.keys(e).forEach((o=>{const a=`${o}Value`;t[a]&&i(e[o],t[a])}))};function yt(e){return(t,o)=>{t[o+"Changed"]=function(t,o){null!=o?e.setValueFor(this,o):e.deleteValueFor(this)}}}const wt={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=(0,Ze.parseColorHexRGB)(e);return t?v.SwatchRGB.create(t.r,t.g,t.b):null}},xt=e=>v.PaletteRGB.from(v.SwatchRGB.from((0,Ze.parseColorHexRGB)(e))),Ft=["baseClass","baseName","shadowOptions","styles","template"],$t=(e,t=Ft)=>Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,o)=>(t[o]=e[o],t)),{}),St=e=>{const{definition:t}=e(),{shadowOptions:o,styles:i,template:a}=t;return{shadowOptions:o,styles:i,template:a,defaultConfig:$t(t)}},Dt=(e,t)=>{const o=e.match(/^(\d+)([a-z]+)/i),i=o[1],a=o[2];return Number(i)+t+a},Ct=(e,t)=>{const o=t.design_tokens;v.accentPalette.setValueFor(e,xt(o.color.accent.$value)),v.neutralPalette.setValueFor(e,xt(o.color.neutral.$value)),v.bodyFont.setValueFor(e,o.fontFamily.bodyFont.$value),v.baseLayerLuminance.setValueFor(e,o.mode.luminance.$value),v.density.setValueFor(e,o.style.density.$value),v.controlCornerRadius.setValueFor(e,o.style.borderRadius.$value),v.strokeWidth.setValueFor(e,o.style.strokeWidth.$value),v.designUnit.setValueFor(e,o.space.designUnit.$value),v.typeRampBaseFontSize.setValueFor(e,o.typography.baseFontSize.$value),v.typeRampBaseLineHeight.setValueFor(e,o.typography.baseLineHeight.$value);const i=v.typeRampBaseFontSize.getValueFor(e),a=v.typeRampBaseLineHeight.getValueFor(e);v.typeRampMinus1FontSize.setValueFor(e,Dt(i,gt.TypeRampValues.minusOne)),v.typeRampMinus1LineHeight.setValueFor(e,Dt(a,gt.TypeRampValues.minusOne)),v.typeRampMinus2FontSize.setValueFor(e,Dt(i,gt.TypeRampValues.minusTwo)),v.typeRampMinus2LineHeight.setValueFor(e,Dt(a,gt.TypeRampValues.minusTwo)),v.typeRampPlus1FontSize.setValueFor(e,Dt(i,gt.TypeRampValues.plusOne)),v.typeRampPlus1LineHeight.setValueFor(e,Dt(a,gt.TypeRampValues.plusOne)),v.typeRampPlus2FontSize.setValueFor(e,Dt(i,gt.TypeRampValues.plusTwo)),v.typeRampPlus2LineHeight.setValueFor(e,Dt(a,gt.TypeRampValues.plusTwo)),v.typeRampPlus3FontSize.setValueFor(e,Dt(i,gt.TypeRampValues.plusThree)),v.typeRampPlus3LineHeight.setValueFor(e,Dt(a,gt.TypeRampValues.plusThree)),v.typeRampPlus4FontSize.setValueFor(e,Dt(i,gt.TypeRampValues.plusFour)),v.typeRampPlus4LineHeight.setValueFor(e,Dt(a,gt.TypeRampValues.plusFour)),v.typeRampPlus5FontSize.setValueFor(e,Dt(i,gt.TypeRampValues.plusFive)),v.typeRampPlus5LineHeight.setValueFor(e,Dt(a,gt.TypeRampValues.plusFive)),v.typeRampPlus6FontSize.setValueFor(e,Dt(i,gt.TypeRampValues.plusSix)),v.typeRampPlus6LineHeight.setValueFor(e,Dt(a,gt.TypeRampValues.plusSix))},_t=xt("#08c3a5"),Ot=xt("#eeeeee"),kt=v.StandardLuminance.DarkMode;const Tt=o(5598).N.ltr,Rt=4,Lt=4;var Mt=o(67973);const Nt=(e="normal",t="normal")=>`\n font-family: ${v.bodyFont};\n font-style: ${e};\n font-weight: ${t};\n`,At=s.css`
|
|
491
491
|
${(0,r.display)("flex")}
|
|
492
492
|
:host {
|
|
493
493
|
flex: 1;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[430],{4077:(e,t,s)=>{var i;s.d(t,{G:()=>i,l:()=>r}),function(e){e.BASIC="BASIC",e.SSO="SSO",e.JWT="JWT",e.REFRESH="REFRESH"}(i||(i={}));class r extends Error{constructor(e,t,s="Auth Failed \n"){super(s),this.sent=e,this.received=t,Object.setPrototypeOf(this,r.prototype)}isIgnorableError(){var e,t,s,i;return null===(i=null===(s=null===(t=null===(e=this.received)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.ERROR)||void 0===s?void 0:s.toLowerCase())||void 0===i?void 0:i.includes("request needs the user to be logged")}getMessageError(){var e,t;return Array.isArray(null===(e=this.received)||void 0===e?void 0:e.ERROR)?null===(t=this.received)||void 0===t?void 0:t.ERROR.map((e=>this.errorDetailFormatter(e))).join("\n"):""}getDetailsError(){var e,t,s,i;return Array.isArray(null===(t=null===(e=this.received)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.ERROR)?null===(i=null===(s=this.received)||void 0===s?void 0:s.DETAILS)||void 0===i?void 0:i.ERROR.map((e=>this.errorDetailFormatter(e))).join("\n"):""}hasPasswordExpiredError(){return this.hasErrorCode("PASSWORD_EXPIRED")}hasErrorCode(e){var t,s;return!!Array.isArray(null===(t=this.received)||void 0===t?void 0:t.ERROR)&&(null===(s=this.received)||void 0===s?void 0:s.ERROR.some((t=>t.CODE===e)))}errorDetailFormatter(e){return`\n ${e.CODE}: \n ${e.TEXT}`}}},62646:(e,t,s)=>{s.d(t,{lj:()=>q});var i=s(186),r=s(66952),o=s(83147),n=s(75951);class a{constructor(){this.cachedMetadata=new Map,this.cachedJsonSchema=new Map}getMetadataFor(e){return this.cachedMetadata.get(e)}getJsonSchemaFor(e){return this.cachedJsonSchema.get(e)}hasMetadataFor(e){return this.cachedMetadata.has(e)}hasJsonSchemaFor(e){return this.cachedJsonSchema.has(e)}setMetadataFor(e,t){this.cachedMetadata.set(e,t)}setJsonSchemaFor(e,t){this.cachedJsonSchema.set(e,t)}}const c=n.DI.createInterface((e=>e.singleton(a))),d=new RegExp(/wss?:\/\/[-a-zA-Z0-9@:%._\+~#=]{1,256}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)\b\/*$/,"i");var h=s(22296);const E=n.DI.createInterface(),l=n.DI.createInterface();var u=s(26714),g=s(16697),S=s(56383),_=s(29866),T=s(40804),R=s(7211),v=s(44866),p=s(75527);class m{serialize(e){return JSON.stringify(e)}deserialize(e){return e?"string"==typeof e?JSON.parse(e):e.data?JSON.parse(e.data):e.text().then((e=>JSON.parse(e))):Promise.resolve({})}}const O=n.DI.createInterface((e=>e.singleton(m)));let A=class{constructor(e){this.serializer=e}get(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=yield fetch(e,Object.assign(Object.assign({},t),{method:"GET"}));return(t.serializer||this.serializer).deserialize(s)}))}post(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=yield fetch(e,Object.assign(Object.assign({},t),{method:"POST"}));return(t.serializer||this.serializer).deserialize(s)}))}};A=(0,i.__decorate)([(0,i.__param)(0,O)],A);const I=n.DI.createInterface((e=>e.singleton(A)));var f=s(9162);const M={polling:Object.assign({POLLING_MAP:{EVENT_AMEND_USER:{TEMP_FREQUENCY:500,AMOUNT_OF_POLLS:5,QUERIES:["ALL_USERS"]}},POLLING_INTERVAL_MAP:{ALL_TRADES:5e3,ALL_USERS:5e3,ALL_PROCESSES_STATUS:1e4},POLLING_FREQUENCY:5e3},{})};let N=class e{get isConnected(){return this._isConnected}set isConnected(e){this._isConnected=e,this.isConnectedSubject.next(this._isConnected)}constructor(e,t,s,i,r,o=M){var n;this.http=e,this.messageBuilder=t,this.session=s,this.metaCache=i,this.serializer=r,this.config=o,this.isWorking=!1,this._isConnected=!1,this.isConnectedSubject=new u.X(this._isConnected),this.isConnected$=null===(n=this.isConnectedSubject)||void 0===n?void 0:n.asObservable(),this.ongoingTurbo={},this.streams=new Map}checkHost(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){try{return this.getMessage({MESSAGE_TYPE:f.Cs.HEARTBEAT_PING,SOURCE_REF:"host check"}).then((e=>e.MESSAGE_TYPE===f.Cs.HEARTBEAT_PONG))}catch(e){return h.k.error(e),!1}}))}send(t,s){return this.http.post(e.getUrl(this.host,t),{body:e.getBody(t),headers:e.getHeaders(t)})}httpMode(){return!0}setValidSession(e){h.k.warn("setValidSession() called while in http polling mode.")}connect(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return this.host=e,this.host.endsWith("/")||(this.host=this.host.concat("/")),this.checkHost().then((e=>(this.isConnected=e,this.session.setSessionStorageItem("hostUrl",this.host),e)))}))}disconnect(){this.isConnected=!1,this.streams.clear(),this.ongoingTurbo={},this.host=void 0}snapshot(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createDataLogonMessage(e,t);return h.k.debug(`HTTP MODE - ${s.MESSAGE_TYPE} (snapshot) message created -> `,s),this.send(s).then((e=>(this.dataLogoff(s.SOURCE_REF).catch((e=>h.k.error(e))),e)))}))}stream(e,t,s,i){const r=this.messageBuilder.createDataLogonMessage(e,i);h.k.debug(`HTTP MODE - ${r.MESSAGE_TYPE} (stream) message created -> `,r);const o=r.SOURCE_REF;this.streams.set(o,{SOURCE_REF:o,POLLING_FREQUENCY:new u.X(this.config.polling.POLLING_FREQUENCY),RESOURCE_NAME:e});const n=this.streams.get(o).POLLING_FREQUENCY,a=(0,g.z)((0,S.D)(this.send(r)),n.pipe((0,_.w)((e=>(0,T.F)(e)))).pipe((0,_.w)((()=>(0,S.D)(this.getMessage(r)))))).pipe((0,R.o)((()=>this.streams.has(o))),(0,v.x)((()=>{h.k.debug(`Terminating stream for ${e} - ${o}`),this.dataLogoff(o)})));return this.streams.get(o).STREAM=a,a}getMessage(t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return this.http.get(e.getUrl(this.host,t),{headers:e.getHeaders(t)})}))}getMoreRows(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreRowsMessage(e);return h.k.debug(`HTTP MODE - ${t.MESSAGE_TYPE} message created -> `,t),this.send(t)}))}dataLogoff(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return this.send(t).then((t=>(this.streams.has(e)&&(h.k.debug(`Removing stream ${e}`),this.streams.delete(e)),t)))}))}getMetadata(e,t=!0){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMetaRequestMessage(e);return h.k.debug(`HTTP MODE - ${t.MESSAGE_TYPE} (metadata) message created -> `,t),this.send(t).then((e=>e.DETAILS))}))}getJSONSchema(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMetaRequestMessage(e,f.N$.JSON_SCHEMA_REQUEST);return h.k.debug(`HTTP MODE! - ${t.MESSAGE_TYPE} (json schema) message created -> `,t),this.send(t)}))}request(e,t){const s=this.messageBuilder.createRequestMessage(e,t);return h.k.debug(`HTTP MODE! - ${s.MESSAGE_TYPE} (request server) message created -> `,s),this.send(s)}commitEvent(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createCommitMessage(e,t);return h.k.debug(`HTTP MODE! - ${s.MESSAGE_TYPE} (commit) message created -> `,s),this.send(s).then((t=>(this.maybeTurbo(e,t),t)))}))}maybeTurbo(e,t){var s;if(!(null===(s=null==t?void 0:t.MESSAGE_TYPE)||void 0===s?void 0:s.endsWith("_ACK")))return;if(this.ongoingTurbo[e])return void h.k.debug(`${e} polling frequency is already accelerated.`);const i=this.config.polling.POLLING_MAP[e];if(!(null==i?void 0:i.TEMP_FREQUENCY)||!i.AMOUNT_OF_POLLS)return;const r=i.TEMP_FREQUENCY,o=r*i.AMOUNT_OF_POLLS,n=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP)),a=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP));for(const e of i.QUERIES)a[e]=r,n[e]||(n[e]=this.config.polling.POLLING_FREQUENCY);h.k.debug(`${e} TRIGGERED -> ENFORCING TURBO | FREQUENCY=${r}ms DURATION=${o}`),this.ongoingTurbo[e]=!0,this.updateIntervals({polling:{POLLING_INTERVAL_MAP:a}}),setTimeout((()=>{h.k.debug(`RESTORED ORIGINAL POLLING INTERVALS FOR ${e}`),this.updateIntervals({polling:{POLLING_INTERVAL_MAP:n}}),this.ongoingTurbo[e]=!1}),o)}updateIntervals(e){const{POLLING_INTERVAL_MAP:t}=e.polling;t&&(this.config.polling.POLLING_INTERVAL_MAP=t,this.handlePollingIntervalMapUpdate(t))}handlePollingIntervalMapUpdate(e){if(e)for(const t in e){if(!e.hasOwnProperty(t))continue;const s=e[t];this.config.polling.POLLING_INTERVAL_MAP[t]=s,h.k.debug(`Setting polling frequency for ${t} = ${s}`),[...this.streams.values()].filter((e=>e.RESOURCE_NAME===t)).forEach((e=>{var t;return null===(t=null==e?void 0:e.POLLING_FREQUENCY)||void 0===t?void 0:t.next(s)}))}}static getHeaders(e){const t={"Content-type":"application/json; charset=UTF-8","source-ref":e.SOURCE_REF};return e.SESSION_AUTH_TOKEN&&(t["SESSION-AUTH-TOKEN"]=e.SESSION_AUTH_TOKEN),e.MESSAGE_TYPE===f.N$.EVENT_LOGOUT&&(t["SESSION-ID"]=e.SESSION_ID),t}static getBody(e){return JSON.stringify(e)}static getUrl(e,t){const s=t.MESSAGE_TYPE;let i=t.MESSAGE_TYPE.replace(/_/g,"-").toLowerCase();return s===f.N$.DATA_LOGON&&(i=t.DETAILS.DATASOURCE_NAME.replace(/_/g,"-").toLowerCase()),`${e}${i}`}};(0,i.__decorate)([o.observable],N.prototype,"host",void 0),(0,i.__decorate)([o.observable],N.prototype,"isWorking",void 0),(0,i.__decorate)([o.observable],N.prototype,"_isConnected",void 0),(0,i.__decorate)([o.volatile],N.prototype,"isConnected",null),N=(0,i.__decorate)([(0,i.__param)(0,I),(0,i.__param)(1,f.sW),(0,i.__param)(2,p.z),(0,i.__param)(3,c),(0,i.__param)(4,r.JSONSerializer),(0,i.__param)(5,(0,n.optional)(l))],N);const b=n.DI.createInterface((e=>e.singleton(N)));var C=s(72284),L=s(98239),U=s(37674),k=s(30094),w=s(30526),P=s(52702),y=s(68370),D=s(52354),G=s(2355);const F=1e4,H=6e4;var V;!function(e){e.Linear="linear",e.Exponential="exponential"}(V||(V={}));const $=(e,t)=>{const{reconnectInterval:s=F}=e,i=s>H?H:s,r=Math.round(Math.log2(H/i));return i*Math.pow(2,t%r)},Y=e=>{const{reconnectInterval:t=F}=e;return t>H?H:t};class K extends C.x{constructor(){super()}}class W{constructor(e,t,s,i){this._message=e,this._onMessage=t,this._onError=s,this._isSubscription=i}get sentMessage(){return this._message}get onReceivedMessage(){return this._onMessage}get onReceivedError(){return this._onError}get isSubscription(){return this._isSubscription}}let B=class{isConnectedChanged(e,t){this.isConnectedSubject.next(t)}constructor(e,t,s,i){this.messageBuilder=e,this.session=t,this.serializer=s,this.uuid=i,this.defaultInterval=1e4,this.secondsMultiplier=1e3,this.isConnectedSubject=new u.X(!1),this.isConnected=!1,this.hasValidSession=!1,this.heartbeatIsEnabled=!0,this.heartbeatInterval=this.defaultInterval,this.isReconnecting=!1,this.socketMessages=()=>this.wsMessages}get heartbeatLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeatLogging)&&void 0!==t&&t}get messageLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableMessageLogging)&&void 0!==t&&t}connect(e,t,s){return this.url=e,this.connectOptions=t,this.reconnectOptions=s,new Promise((e=>{var t,s,r,o;h.k.info(`${this.isReconnecting?"Reconnecting":"Connecting"} to ${this.url}`);(!this.isReconnecting||!(null===(t=this.reconnectOptions)||void 0===t?void 0:t.reconnectStreams))&&this.cleanMessages(),null===(s=this.socketSubscription)||void 0===s||s.unsubscribe(),this.websocket=new D.p({url:this.url,openObserver:{next:()=>{this.isConnected=!0,this.session.setSessionStorageItem("hostUrl",this.url),this.prepareHeartbeat(),h.k.info("WebSocket connection is now open"),e(this.isConnected)}},closeObserver:{next:t=>{this.disconnectedByServer=!t.wasClean,this.isConnected=!1,this.disconnectedByServer&&h.k.info(`WebSocket connection was closed due an error - Code: ${t.code} ${t.reason?" | Reason: "+t.reason:""}`),e(this.isConnected)}},serializer:this.serializer.serialize,deserializer:this.serializer.deserialize});this.socketSubscription=this.websocket.subscribe(null!==(o=null===(r=this.connectOptions)||void 0===r?void 0:r.connectObserver)&&void 0!==o?o:{next:e=>(0,i.__awaiter)(this,void 0,void 0,(function*(){var t;const s=`Response Message received for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,h.k.info,s);const{SOURCE_REF:i,MESSAGE_TYPE:r}=e,o=this.getMessageHandler(i,r);if(!o)return;let n=!1;switch(e.MESSAGE_TYPE){case f.N$.EVENT_LOGIN_AUTH_ACK:{this.hasValidSession=!0;const s=e.DETAILS;s.HEARTBEAT_INTERVAL_SECS&&void 0===(null===(t=this.connectOptions)||void 0===t?void 0:t.heartbeatInterval)&&(this.heartbeatInterval=s.HEARTBEAT_INTERVAL_SECS*this.secondsMultiplier,this.prepareHeartbeat());break}case f.Cs.LOGOUT_ACK:return this.hasValidSession=!1,o.onReceivedMessage.call(this,e),void this.cleanMessages();case f.Cs.LOGON_ACK:return;case f.Cs.LOGOFF_ACK:if(e.LOGGED_OUT&&this.hasValidSession){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.send(e);t?t.MESSAGE_TYPE===f.N$.EVENT_LOGIN_AUTH_ACK&&(this.session.setAuthResult(t),this.wsMessageHandlers.forEach((e=>{e.isSubscription&&(e.sentMessage.SESSION_AUTH_TOKEN=t.SESSION_AUTH_TOKEN,this.websocket.next(e.sentMessage))}))):this.hasValidSession=!1}break;case f.Cs.QUERY_UPDATE:if(!o.isSubscription){const e=this.messageBuilder.createDataLogoffMessage(i);this.send(e)}break;case f.Cs.MSG_NACK:n=!0}n?o.onReceivedError.call(this,{receivedMessage:e,sentMessage:o.sentMessage}):o.onReceivedMessage.call(this,e),this.wsMessages.next(e),o.isSubscription||this.removeMessageHandler(i)})),error:e=>{h.k.debug("Error found: ",e),this.reconnect()},complete:()=>{var e;this.disconnectedByServer&&(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)?this.reconnect():h.k.info("Connection is now closed")}})}))}prepareHeartbeat(){var e,t,s,r;this.heartbeatSubscription&&this.heartbeatSubscription.unsubscribe();const o=()=>(0,i.__awaiter)(this,void 0,void 0,(function*(){if(!this.isConnected)return;const e={MESSAGE_TYPE:f.Cs.HEARTBEAT_PING,SOURCE_REF:this.uuid.createId()},t=yield this.send(e);this.heartbeatIsEnabled=t.MESSAGE_TYPE===f.Cs.HEARTBEAT_PONG&&t.SOURCE_REF===e.SOURCE_REF}));if(null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeat)&&void 0!==t?t:this.heartbeatIsEnabled){const e=null!==(r=null===(s=this.connectOptions)||void 0===s?void 0:s.heartbeatInterval)&&void 0!==r?r:this.heartbeatInterval;this.heartbeatSubscription=(0,L.H)(e,e).pipe((0,R.o)((()=>this.websocket&&this.isConnected)),(0,w.b)((()=>this.heartbeatLoggingIsEnabled&&h.k.debug(`Sending a heartbeat ping every ${e} ms`)))).subscribe((()=>o()))}}reconnect(){var e,t,s,i,r;const o=!(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)&&!1===(null===(t=this.connectOptions)||void 0===t?void 0:t.enableHeartbeat);if(this.isReconnecting||o)return;this.isReconnecting=!0;const n=(null===(s=this.reconnectOptions)||void 0===s?void 0:s.reconnectStrategy)===V.Exponential?$:Y,a=this.isConnectedSubject.asObservable().pipe((0,_.w)((e=>e?(0,U.of)(-1):((e,t)=>new G.y((s=>{let i,r=0;return function o(){s.next(r),clearTimeout(i),i=setTimeout(o,t(e,r)),r+=1}(),()=>{clearTimeout(i)}})))(this.reconnectOptions,n).pipe((0,P.z)((e=>{var t,s,i;let r;return r=(null===(t=this.connectOptions)||void 0===t?void 0:t.alwaysOn)?e+1:null!==(i=null===(s=this.reconnectOptions)||void 0===s?void 0:s.reconnectAttempts)&&void 0!==i?i:10,e<r?(0,U.of)(e):(0,k._)((()=>new Error(`Max reconnect attempts ${r} reached.`)))}))))),(0,R.o)((()=>this.websocket&&!this.isConnected)));a.subscribe(null!==(r=null===(i=this.reconnectOptions)||void 0===i?void 0:i.reconnectObserver)&&void 0!==r?r:{next:e=>{h.k.debug(`Attempt no. ${e+1} to reconnect`),this.websocket.complete(),this.connect(this.url,this.connectOptions,this.reconnectOptions)},error:e=>{var t;h.k.debug(e),null===(t=this.socketSubscription)||void 0===t||t.unsubscribe(),this.isReconnecting=!1},complete:()=>{h.k.info(this.isConnected?"Reconnected":"Disconnected"),this.isReconnecting=!1,this.wsMessageHandlers.forEach((e=>{e.isSubscription&&this.websocket.next(e.sentMessage)}))}})}reset(){this.isConnected=!1,this.websocket&&this.websocket.complete(),this.websocket=null,this.cleanMessages()}cleanMessages(){this.wsMessages&&this.wsMessages.complete(),this.wsMessages=new K,this.wsMessageHandlers=new Map}send(e,t=!0){if(!this.isConnected)return void Promise.reject(new Error("WebSocket connection is closed"));const s=`Sending Message for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,h.k.info,s),new Promise(((s,i)=>{const r=e=>{s(e)},o=e=>{i(e)};t&&this.setMessageHandler(e,r,o),this.websocket.next(e)}))}sendForStream(e,t,s){if(!this.isConnected)return(0,k._)((()=>new Error("WebSocket connection is closed")));if(!this.hasValidSession)return(0,k._)((()=>new Error("WebSocket connection is open but there is no valid/active session, please check your auth flow")));const i=`Sending Message (stream) for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,h.k.info,i),this.setMessageHandler(e,t,s,!0),this.websocket.next(e),(0,S.D)(this.wsMessages.pipe((0,y.h)((t=>t.SOURCE_REF===e.SOURCE_REF))))}setMessageHandler(e,t,s,i=!1){const r=`Setting Message Handler for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,h.k.debug,r),this.wsMessageHandlers.set(e.SOURCE_REF,new W(e,t,s,i))}removeMessageHandler(e){this.wsMessageHandlers.delete(e)}getMessageHandler(e,t){const s=`Getting Message Handler for SourceRef: ${e} | MessageType: ${t}`;return this.logMessageTypeFlow(t,h.k.debug,s),this.wsMessageHandlers.get(e)}logMessageTypeFlow(e,t,s){switch(e){case f.Cs.HEARTBEAT_PING:case f.Cs.HEARTBEAT_PONG:this.heartbeatLoggingIsEnabled&&t(s);break;default:this.messageLoggingIsEnabled&&t(s)}}};(0,i.__decorate)([o.observable],B.prototype,"websocket",void 0),(0,i.__decorate)([o.observable],B.prototype,"wsMessages",void 0),(0,i.__decorate)([o.observable],B.prototype,"wsMessageHandlers",void 0),(0,i.__decorate)([o.observable],B.prototype,"isConnected",void 0),(0,i.__decorate)([o.observable],B.prototype,"disconnectedByServer",void 0),(0,i.__decorate)([o.observable],B.prototype,"hasValidSession",void 0),(0,i.__decorate)([o.observable],B.prototype,"heartbeatIsEnabled",void 0),(0,i.__decorate)([o.observable],B.prototype,"isReconnecting",void 0),B=(0,i.__decorate)([(0,i.__param)(0,f.sW),(0,i.__param)(1,p.z),(0,i.__param)(2,O),(0,i.__param)(3,r.UUID)],B);const x=n.DI.createInterface((e=>e.singleton(B))),j={connect:{alwaysOn:!1,enableHeartbeat:!0,enableHeartbeatLogging:!1,heartbeatInterval:1e4,enableMessageLogging:!1},reconnect:{reconnectAttempts:10,reconnectInterval:1e4,reconnectStreams:!0}};let Q=class{get isConnected(){return this.socket.isConnected}get isConnectedSubject(){return this.socket.isConnectedSubject}get isConnected$(){var e;return null===(e=this.socket.isConnectedSubject)||void 0===e?void 0:e.asObservable()}constructor(e,t,s,i=j){this.socket=e,this.messageBuilder=t,this.metaCache=s,this.config=i,this.isWorking=!1}httpMode(){return!1}setValidSession(e){this.socket.hasValidSession=e}send(e,t){return this.socket.send(e,t)}connect(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return this.socket.reset(),d.test(e)?this.socket.connect(e,this.config.connect,this.config.reconnect):(h.k.error(`Specified host (${e}) is not valid WebSocket url. Connection will not proceed.`),void h.k.warn("Make sure the host url starts with wss:// or ws://"))}))}disconnect(){this.socket.reset()}snapshot(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createDataLogonMessage(e,t);return h.k.debug(`${s.MESSAGE_TYPE} (snapshot) message created -> `,s),this.socket.send(s)}))}stream(e,t,s,i){const r=this.messageBuilder.createDataLogonMessage(e,i);return h.k.debug(`${r.MESSAGE_TYPE} (stream) message created -> `,r),this.socket.sendForStream(r,t,s)}getMoreRows(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreRowsMessage(e);return h.k.debug(`${t.MESSAGE_TYPE} message created -> `,t),this.socket.send(t,!1)}))}dataLogoff(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return h.k.debug(`${t.MESSAGE_TYPE} message created -> `,t),this.socket.send(t)}))}getMetadata(e,t=!0){var s;return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(t&&this.metaCache.hasMetadataFor(e))return h.k.debug(`Cached metadata retrieved for ${e}`),this.metaCache.getMetadataFor(e);const i=this.messageBuilder.createMetaRequestMessage(e);let r;h.k.debug(`${i.MESSAGE_TYPE} (metadata) message created -> `,i);try{this.isWorking=!0;const t=yield this.socket.send(i);r=null!==(s=null==t?void 0:t.DETAILS)&&void 0!==s?s:{},Object.keys(r).length&&this.metaCache.setMetadataFor(e,r)}catch(e){h.k.error(e)}finally{this.isWorking=!1}return r}))}getJSONSchema(e,t=!0){var s;return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(t&&this.metaCache.hasJsonSchemaFor(e))return h.k.debug(`Cached JsonSchema retrieved for ${e}`),this.metaCache.getJsonSchemaFor(e);const i=this.messageBuilder.createMetaRequestMessage(e,f.N$.JSON_SCHEMA_REQUEST);let r;h.k.debug(`${i.MESSAGE_TYPE} (json schema) message created -> `,i);try{this.isWorking=!0,r=null!==(s=yield this.socket.send(i))&&void 0!==s?s:{},Object.keys(r).length&&this.metaCache.setJsonSchemaFor(e,r)}catch(e){h.k.error(e)}finally{this.isWorking=!1}return r}))}request(e,t){const s=this.messageBuilder.createRequestMessage(e,t);return h.k.debug(`${s.MESSAGE_TYPE} (request server) message created -> `,s),this.socket.send(s)}commitEvent(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createCommitMessage(e,t);return h.k.debug(`${s.MESSAGE_TYPE} (commit) message created -> `,s),this.socket.send(s)}))}};(0,i.__decorate)([o.observable],Q.prototype,"isWorking",void 0),(0,i.__decorate)([o.volatile],Q.prototype,"isConnected",null),Q=(0,i.__decorate)([(0,i.__param)(0,x),(0,i.__param)(1,f.sW),(0,i.__param)(2,c),(0,i.__param)(3,(0,n.optional)(E))],Q);const J="true"===r.FORCE_HTTP||!1,z=n.DI.createInterface((e=>e.singleton(Q))),q=n.DI.createInterface((e=>J?e.aliasTo(b):e.aliasTo(z)))},9162:(e,t,s)=>{s.d(t,{Cs:()=>i,N$:()=>r,QT:()=>o,sW:()=>l});var i,r,o,n=s(186),a=s(66952),c=s(75951),d=s(4077),h=s(75527);!function(e){e.LOGON_ACK="LOGON_ACK",e.LOGON_NACK="LOGON_NACK",e.LOGOFF_ACK="LOGOFF_ACK",e.LOGOFF_NACK="LOGOFF_NACK",e.HEARTBEAT_PING="HEARTBEAT_PING",e.HEARTBEAT_PONG="HEARTBEAT_PONG",e.MORE_ROWS="MORE_ROWS",e.MSG_ACK="MSG_ACK",e.MSG_NACK="MSG_NACK",e.LOGOUT_ACK="LOGOUT_ACK",e.LOGOUT_NACK="LOGOUT_NACK",e.QUERY_UPDATE="QUERY_UPDATE"}(i||(i={})),function(e){e.EVENT_LOGIN_AUTH="EVENT_LOGIN_AUTH",e.EVENT_LOGIN_AUTH_ACK="EVENT_LOGIN_AUTH_ACK",e.EVENT_LOGIN_AUTH_NACK="EVENT_LOGIN_AUTH_NACK",e.EVENT_LOGOUT="EVENT_LOGOUT",e.DATA_LOGON="DATA_LOGON",e.DATA_LOGOFF="DATA_LOGOFF",e.META_REQUEST="META_REQUEST",e.JSON_SCHEMA_REQUEST="JSON_SCHEMA_REQUEST",e.RESOURCES_REQUEST="RESOURCES_REQUEST",e.EVENT_CHANGE_USER_PASSWORD="EVENT_CHANGE_USER_PASSWORD",e.EVENT_SELF_SERVICE_PASSWORD_RESET="EVENT_SELF_SERVICE_PASSWORD_RESET",e.EVENT_PASSWORD_RESET_ACTION="EVENT_PASSWORD_RESET_ACTION"}(r||(r={})),function(e){e.SESSION_NOT_FOUND="SESSION_NOT_FOUND",e.UNKNOWN_MESSAGE_TYPE="UNKNOWN_MESSAGE_TYPE"}(o||(o={}));let E=class{constructor(e,t){this.session=e,this.uuid=t}createLoginMessage(e){let t;switch(e.type){case d.G.BASIC:t={USER_NAME:e.username,PASSWORD:e.password};break;case d.G.REFRESH:t={USER_NAME:e.username,REFRESH_AUTH_TOKEN:e.refreshToken};break;case d.G.SSO:t={SSO_TOKEN:e.ssoToken};break;case d.G.JWT:t={JWT:e.jwt,DOMAIN:e.domain}}return{DETAILS:t,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_LOGIN_AUTH}}createLogoutMessage(e){var t,s;return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_LOGOUT,SESSION_AUTH_TOKEN:null!==(t=e.authToken)&&void 0!==t?t:this.session.getSessionStorageItem("authToken"),SESSION_ID:null!==(s=e.sessionId)&&void 0!==s?s:this.session.getSessionStorageItem("sessionId")}}createDataLogonMessage(e,t){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.DATA_LOGON,DETAILS:Object.assign({DATASOURCE_NAME:e},t),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createDataLogoffMessage(e){return{SOURCE_REF:e,MESSAGE_TYPE:r.DATA_LOGOFF,SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createRequestMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e.startsWith("REQ_")?e:`REQ_${e}`},t)}createMetaRequestMessage(e,t=r.META_REQUEST){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:t,DETAILS:{FEATURE:e},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createCommitMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e},t)}createRefreshTokenMessage(){return{SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:r.EVENT_LOGIN_AUTH,DETAILS:{REFRESH_AUTH_TOKEN:this.session.getSessionStorageItem("refreshToken")}}}createChangePasswordMessage(e,t,s){return{USER_NAME:e,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_CHANGE_USER_PASSWORD,DETAILS:{OLD_PASSWORD:t,NEW_PASSWORD:s}}}createForgotPasswordMessage(e,t,s=e){return{USER_NAME:s,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_SELF_SERVICE_PASSWORD_RESET,DETAILS:{USER_NAME:e,RETURN_URL:t}}}createForgotPasswordTokenMessage(e,t,s,i=e){return{USER_NAME:i,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_PASSWORD_RESET_ACTION,DETAILS:{USER_NAME:e,RESET_TOKEN:t,NEW_PASSWORD:s}}}createMoreRowsMessage(e){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:i.MORE_ROWS,DETAILS:{SOURCE_REF:e},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}};E=(0,n.__decorate)([(0,n.__param)(0,h.z),(0,n.__param)(1,a.UUID)],E);const l=c.DI.createInterface((e=>e.singleton(E)))},5127:(e,t,s)=>{s.d(t,{$:()=>r});var i=s(22296);function r(e,t="ROW_REF"){const s=e=>{const s=Object.assign(Object.assign({},e),{[t]:e.DETAILS[t]});return delete s.DETAILS,s},r=[],o=[],n=[];for(const t of e.ROW)if(t.DETAILS)switch(t.DETAILS.OPERATION){case"INSERT":r.push(s(t));break;case"MODIFY":n.push(s(t));break;case"DELETE":o.push(s(t));break;default:i.k.error(`Unsupported operation type: '${t.DETAILS.OPERATION}'`)}return{inserts:r,deletes:o,updates:n,SOURCE_REF:e.SOURCE_REF}}},43752:(e,t,s)=>{s.d(t,{Yh:()=>H});var i=s(186),r=s(83147),o=s(75951),n=s(98239),a=s(19788),c=s(56383),d=s(29866),h=s(7211),E=s(26714),l=s(62646),u=s(9162),g=s(19082),S=s(4077),_=s(75527),T=s(22296);const R=o.DI.createInterface();function v(){return(null===navigator||void 0===navigator?void 0:navigator.credentials)?"PasswordCredential"in window||(T.k.warn("PasswordCredential not available in this browser."),!1):(T.k.warn("CredentialsContainer not available in this browser."),!1)}const p=":";function m(e="",t=p,s){return e.split(t,s).map((e=>e.trim())).filter((e=>""!==e))}function O(e,t=p){const s="string"==typeof e&&e.trim();return!!s&&s.includes(t)}function A(e,t=p){return"string"==typeof e&&e.trim()?(e.match(new RegExp(t,"g"))||[]).length:0}function I(e,t=p){for(const s of e)if(O(s,t))return s;return e.find((e=>"string"==typeof e&&!!e.trim()))}function f(e,t,s){const i="string"==typeof e&&e.trim();return!i||s&&!i.includes(s)||A(i)>1?s&&t&&s!==t?`${t}:${s}`:t||s:i}function M(e="credential"){T.k.warn(`Unable to migrate legacy ${e} to latest format. Please remove from your browser.`)}const N={password:!0,mediation:"optional"},b={cookie:{path:"/",name:"credentials",expires:7300,storePasswords:!1}};let C=class{constructor(e,t=b){this.session=e,this.config=t}createBasicCredentials(e){return{type:S.G.BASIC,username:e.username,password:e.password}}createRefreshCredentials(e){var t,s;return{type:S.G.REFRESH,username:null!==(t=null==e?void 0:e.username)&&void 0!==t?t:this.getUsername(),refreshToken:null!==(s=null==e?void 0:e.refreshToken)&&void 0!==s?s:this.getRefreshToken()}}createSSOCredentials(e){var t;return{type:S.G.SSO,ssoToken:null!==(t=null==e?void 0:e.ssoToken)&&void 0!==t?t:this.getSSOToken()}}validateBasicCredentials(e){return e&&!!e.username&&!!e.password}validateRefreshCredentials(e){return e&&!!e.refreshToken&&!!e.username}validateSSOCredentials(e){return e&&!!e.ssoToken}validateUserCredentialData(e,t){const s=e&&!!e.id&&!!e.name&&!e.name.includes(p)&&A(e.id)<=1;return t?s&&!!e.password:s}normaliseLegacyCredentialData(e,t){if(this.validateUserCredentialData(e,!0))return[e,!0];if(this.validateUserCredentialData(t))return[t,!1];if(e)try{const t=e,[s]=m(t.name||t.id),[i,r]=m(I([t.id,t.name]));return[{id:f(t.id||t.name,s,r),name:s,password:t.password||""},!0]}catch(e){M("PasswordCredential")}if(t)try{const e=t,[s]=m(e.name||e.username||e.organisation),[i,r]=m(I([e.organisation||e.username||e.name]));return[{id:f(e.id||e.username||e.name,s,r),name:s,password:e.password||""},!1]}catch(e){M("cookie")}return[void 0,!1]}storeCredentialsInContainer(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(!v())return;const t=new PasswordCredential(e);return T.k.debug("Storing credentials in CredentialsContainer"),navigator.credentials.store(t)}))}getCredentialsFromContainer(e=N){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(v())return T.k.debug("Getting credentials from CredentialsContainer"),yield navigator.credentials.get(e)}))}storeCredentialsInCookie(e){const{password:t}=e,s=(0,i.__rest)(e,["password"]),r=this.config.cookie.storePasswords?e:s;return T.k.debug("Storing credentials in cookie"),!!g.Z.set(this.config.cookie.name,JSON.stringify(r),{expires:this.config.cookie.expires,domain:location.hostname,path:this.config.cookie.path,secure:!0})}getCredentialsFromCookie(){T.k.debug("Getting credentials from cookie");const e=g.Z.get(this.config.cookie.name);return e?JSON.parse(e):void 0}storeCredentials(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(v()){const t=yield this.storeCredentialsInContainer(e);return Promise.resolve(!!t)}return Promise.resolve(this.storeCredentialsInCookie(e))}))}getCredentials(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return v()?this.getCredentialsFromContainer(e):Promise.resolve(this.getCredentialsFromCookie())}))}getSSOToken(){return this.session.getSessionStorageItem("ssoToken")}getUsername(){return this.session.getSessionStorageItem("username")}getRefreshToken(){return this.session.getSessionStorageItem("refreshToken")}removeCookie(){g.Z.remove(this.config.cookie.name,{domain:location.hostname,path:this.config.cookie.path})}removeSSOToken(){this.session.removeSessionStorageItem("ssoToken")}removeUsername(){this.session.removeSessionStorageItem("username")}removeRefreshToken(){this.session.removeSessionStorageItem("refreshToken")}removeAll(){this.removeCookie(),this.removeSSOToken(),this.removeUsername(),this.removeRefreshToken()}preventSilentAccess(){return v()&&navigator.credentials.preventSilentAccess()}};C=(0,i.__decorate)([(0,i.__param)(0,_.z),(0,i.__param)(1,(0,o.optional)(R))],C);const L=o.DI.createInterface((e=>e.singleton(C)));class U{constructor(e){Object.assign(this,e)}hasAdminProfile(){return this.hasProfile("ADMIN")}hasPermission(e){return this.hasKey(this.permissions,e)}hasProfile(e){return this.hasKey(this.profiles,e)}hasKey(e,t){return!!(e&&e.length&&t)&&(Array.isArray(t)||(t=[t]),t.some((t=>e.includes(t))))}}(0,i.__decorate)([r.observable],U.prototype,"permissions",void 0),(0,i.__decorate)([r.observable],U.prototype,"profiles",void 0),(0,i.__decorate)([r.observable],U.prototype,"username",void 0);let k=class{loggedUserResultChanged(e,t){var s;null===(s=this.isLoggedInSubject)||void 0===s||s.next(this.isLoggedIn)}get isLoggedIn$(){return this.isLoggedInSubject.asObservable()}get isLoggedIn(){return!!this.loggedUserResult&&!(!this.loggedUserResult.authToken||!this.loggedUserResult.sessionId)}constructor(e,t,s,i){this.session=e,this.connect=t,this.messageBuilder=s,this.credentialManager=i,this.isWorking=!1,this.isLoggedInSubject=new E.X(!1)}login(e){var t;return(0,i.__awaiter)(this,void 0,void 0,(function*(){this.isWorking=!0;try{const s=this.messageBuilder.createLoginMessage(e),i=yield this.connect.send(s);if(!i||i.ERROR||(null===(t=i.DETAILS)||void 0===t?void 0:t.ERROR))throw new S.l(s,i);this.applyAuthResults({authToken:i.SESSION_AUTH_TOKEN,refreshToken:i.REFRESH_AUTH_TOKEN,profiles:i.PROFILE,username:i.USER_NAME,permissions:i.PERMISSION,sessionId:i.SESSION_ID}),this.session.setAuthResult(i),T.k.debug("Login Authentication Result:",i)}catch(e){if(T.k.error("Login Authentication Error:",e),!(e instanceof S.l&&e.isIgnorableError()))throw this.removeAuthResults(),e;T.k.warn("Ignoring authentication error as it is a known edge case.")}finally{this.isWorking=!1}return this.loggedUserResult}))}logout(){var e;return(0,i.__awaiter)(this,void 0,void 0,(function*(){this.isWorking=!0;let t={success:!1};try{const s=this.messageBuilder.createLogoutMessage(this.loggedUserResult);this.session.deleteUserFromSessionStorage(),this.connect.setValidSession(!1);const{CODE:i,DETAILS:r,ERROR:o,MESSAGE_TYPE:n,OIDC_LOGOUT_URL:a}=yield this.connect.send(s),c=null!==(e=null==r?void 0:r.ERROR)&&void 0!==e?e:o,d=n===u.Cs.LOGOUT_NACK;d&&T.k.warn("Unexpected Logout NACK received during logout.",c),t={success:n===u.Cs.LOGOUT_ACK||i===u.QT.SESSION_NOT_FOUND||d,error:c},a&&window.open(a,"_self")}catch(e){const s=new S.l(e.sentMessage,e.receivedMessage);if(T.k.error("Logout Authentication Error:",s),!s.isIgnorableError())throw e;T.k.warn("Ignoring authentication error as it is a known edge case."),t.success=!0}finally{this.removeAuthResults(),this.isWorking=!1}return t}))}reAuthFromSession(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(yield this.ensureConnection()){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.connect.send(e);if((null==t?void 0:t.MESSAGE_TYPE)===u.N$.EVENT_LOGIN_AUTH_ACK)return this.session.setAuthResult(t),this.connect.setValidSession(!0),this.applyAuthResults(this.getLoggedUserFromMessage(t)),!0}return this.session.deleteUserFromSessionStorage(),this.connect.setValidSession(!1),!1}))}ensureConnection(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(this.connect.isConnected)return!0;const e=this.session.getSessionStorageItem("hostUrl");return!!e&&this.connect.connect(e)}))}getLoggedUserFromMessage(e){const t=e.USER_NAME,s=e.SESSION_AUTH_TOKEN,i=e.REFRESH_AUTH_TOKEN;return t&&s&&i?{username:t,authToken:s,refreshToken:i,profiles:e.PROFILE,permissions:e.PERMISSION,sessionId:e.SESSION_ID}:null}applyAuthResults(e){e?(this.loggedUserResult={authToken:e.authToken,refreshToken:e.refreshToken,profiles:e.profiles,username:e.username,permissions:e.permissions,sessionId:e.sessionId},this.currentUser=new U({permissions:e.permissions,profiles:e.profiles,username:e.username})):this.removeAuthResults()}removeAuthResults(){this.loggedUserResult=null,this.currentUser=null}};(0,i.__decorate)([r.observable],k.prototype,"isWorking",void 0),(0,i.__decorate)([r.observable],k.prototype,"currentUser",void 0),(0,i.__decorate)([r.observable],k.prototype,"loggedUserResult",void 0),(0,i.__decorate)([r.volatile],k.prototype,"isLoggedIn",null),k=(0,i.__decorate)([(0,i.__param)(0,_.z),(0,i.__param)(1,l.lj),(0,i.__param)(2,u.sW),(0,i.__param)(3,L)],k);const w=o.DI.createInterface((e=>e.singleton(k)));var P=s(66306);var y=s(5127),D=s(82940);const G={options:{criteria:"",isSnapshot:!1,maxRows:D.WJ.MAX_ROWS_250,maxView:D.WJ.MAX_VIEW_1000,pollingInterval:D.WJ.REQ_REP_POLLING_INTERVAL_MS,movingView:!1,orderBy:"",resourceName:"",reverse:!1},criteriaToFields:function(e){const t=e.split("&&").map((e=>e.trim())),s={};return t.forEach((e=>{const t=e.substr(0,e.indexOf("=")).trim().replace(/["']/g,""),i=e.substr(e.lastIndexOf("=")+1,e.length).trim().replace(/["']/g,"");s[t]=i})),s},dataServerResultFilter:y.$};let F=class{constructor(e,t,s=G){this.connect=e,this.auth=t,this.config=s,this.initialized=!1,this.readOnly=!0,this.originalFieldDef=[],this.requestFields=[],this.fieldMetadata=[],this.availableIndexes=[]}validResourceName(e){return!!e&&!!e.trim().length}init(e,t=!0){var s;return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(!this.validResourceName(null==e?void 0:e.resourceName))return!1;if(this.options=Object.assign(Object.assign({},this.config.options),e),t){T.k.debug(`Initializing ${this.options.resourceName} Datasource`);const t=yield this.connect.getMetadata(this.options.resourceName).catch((t=>T.k.error(`Metadata Fetch failed for ${e.resourceName}:`,t)));if(!t)return this.deinit(),!1;this.resourceType=t.TYPE,this.availableIndexes=null!==(s=t.INDEXES)&&void 0!==s?s:[],this.originalFieldDef=(0,P.C)(t),this.fieldMetadata=(0,P.i)(this.originalFieldDef),this.requestFields=t.REQUEST_FIELD||[],T.k.debug(`Datasource for ${this.options.resourceName} is ready`)}return this.options.isSnapshot||(this._stream=yield this.createStream()),this.initialized=!0,this.initialized}))}deinit(){this.initialized=!1,this.options=void 0,this.resourceType=void 0,this.availableIndexes=[],this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[]}get stream(){return this._stream}get params(){const e={CRITERIA_MATCH:this.options.criteria,FIELDS:this.options.fields,MAX_ROWS:this.options.maxRows,MAX_VIEW:this.options.maxView,MOVING_VIEW:this.options.movingView,POLLING_INTERVAL:this.options.pollingInterval,REQUEST:this.options.request,REVERSE:this.options.reverse};if(this.options.orderBy)if(this.availableIndexes.findIndex((e=>e.NAME===this.options.orderBy))>-1)e.ORDER_BY=this.options.orderBy;else{const e=this.availableIndexes.map((e=>e.NAME));T.k.warn("Specified [orderBy] index is not valid and will not be used. See https://learn.genesis.global/docs/database/data-types/index-entities/ - Available indexes:",e)}return T.k.debug("Getting configured params:",e),e}snapshot(){var e;return(0,i.__awaiter)(this,void 0,void 0,(function*(){switch(T.k.debug(`Requesting snapshot for ${this.options.resourceName} (${this.resourceType}).`),this.resourceType){case D._g.DATASERVER:return this.connect.snapshot(this.options.resourceName,this.params);case D._g.REQUEST_SERVER:{const t=this.params,{REQUEST:s,CRITERIA_MATCH:r}=t,o={DETAILS:(0,i.__rest)(t,["REQUEST","CRITERIA_MATCH"]),REQUEST:Object.assign(Object.assign(Object.assign({},Object.fromEntries(this.requestFields.map((e=>[e.NAME,"*"])))),this.params.REQUEST),(null===(e=null==this?void 0:this.options)||void 0===e?void 0:e.criteria)?this.config.criteriaToFields(this.options.criteria):{})};return this.connect.request(this.options.resourceName,o)}default:throw new Error(`Snapshot not supported for selected resource type: ${this.resourceType}`)}}))}snapshotFiltered(e="ROW_REF"){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=yield this.snapshot();return Array.isArray(t)?t:t.REPLY?t.REPLY:t.ROW?this.config.dataServerResultFilter(t,e).inserts:void 0}))}createStream(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(![D._g.DATASERVER,D._g.REQUEST_SERVER].includes(this.resourceType))throw new Error(`Streaming not supported for selected resource type: ${this.resourceType}`);return this.resourceType===D._g.DATASERVER?this.createDataserverStream():(T.k.debug(`Creating fake stream by polling ${this.options.resourceName} REQUEST_SERVER`),this.createReqRepStream())}))}createDataserverStream(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return this.connect.stream(this.options.resourceName,(e=>{}),(e=>T.k.error(e)),this.params)}))}createReqRepStream(){return(0,n.H)(0,this.params.POLLING_INTERVAL).pipe((0,d.w)((()=>(0,a.a)([this.connect.isConnected$,this.auth.isLoggedIn$]).pipe((0,h.o)((()=>this.connect.isConnected&&this.auth.isLoggedIn)),(0,d.w)((()=>(0,c.D)(this.snapshot())))))))}};(0,i.__decorate)([r.observable],F.prototype,"initialized",void 0),(0,i.__decorate)([r.observable],F.prototype,"readOnly",void 0),(0,i.__decorate)([r.volatile],F.prototype,"stream",null),F=(0,i.__decorate)([(0,i.__param)(0,l.lj),(0,i.__param)(1,w),(0,i.__param)(2,(0,o.optional)(D.tt))],F);const H=o.DI.createInterface((e=>e.transient(F)))},82940:(e,t,s)=>{s.d(t,{WJ:()=>o,_g:()=>i,tt:()=>n});var i,r=s(75951);!function(e){e.DATASERVER="DATASERVER",e.EVENT_HANDLER="EVENT_HANDLER",e.REQUEST_SERVER="REQUEST_SERVER"}(i||(i={}));class o{}o.MAX_ROWS_250=250,o.MAX_VIEW_1000=1e3,o.REQ_REP_POLLING_INTERVAL_MS=1e4;const n=r.DI.createInterface()},32449:(e,t,s)=>{function i(e,t=";"){return e?e.split(t).map((e=>e.trim())).sort(((e,t)=>e.localeCompare(t))).join(t):e}s.d(t,{p:()=>i})},83123:(e,t,s)=>{var i;s.d(t,{E:()=>r,r:()=>i}),function(e){e.STRING="STRING",e.NUMBER="NUMBER",e.BOOLEAN="BOOLEAN",e.ENUM="ENUM",e.DATE="DATE",e.DATETIME="DATETIME",e.CUSTOM="CUSTOM"}(i||(i={}));const r={STRING:i.STRING,ENUM:i.ENUM,BOOLEAN:i.BOOLEAN,INT:i.NUMBER,DOUBLE:i.NUMBER,BIGDECIMAL:i.NUMBER,DATE:i.DATE,DATETIME:i.DATETIME}},66306:(e,t,s)=>{s.d(t,{C:()=>a,i:()=>n});var i=s(82940),r=s(22296),o=s(83123);const n=e=>e?e.map((e=>{const t={name:e.NAME,type:o.E[e.TYPE]||o.r.STRING};if(e.TYPE===o.r.ENUM&&e.VALID_VALUES)try{t.enumOptions=Array.isArray(e.VALID_VALUES)?e.VALID_VALUES:e.VALID_VALUES.split("|")}catch(e){r.k.error(e),t.enumOptions=[]}return t})):null,a=e=>{const t=null==e?void 0:e.TYPE;if(t===i._g.DATASERVER)return e.FIELD||[];if(t===i._g.REQUEST_SERVER)return e.REPLY_FIELD||[];throw new Error(`Unsupported resource type: ${t}`)}},75527:(e,t,s)=>{s.d(t,{z:()=>o});var i=s(75951);class r{constructor(){this.storageKeyPrefix="",this.returnUrl=this.getSessionStorageItem("returnUrl")||""}deleteUserFromSessionStorage(){["authToken","refreshToken","sessionId","ssoToken"].forEach((e=>this.removeSessionStorageItem(e)))}setStorageKeyPrefix(e){this.storageKeyPrefix=`${e.replace(/\s/g,"")}/`}setAuthResult(e){this.setSessionStorageItem("authToken",e.SESSION_AUTH_TOKEN),this.setSessionStorageItem("refreshToken",e.REFRESH_AUTH_TOKEN),this.setSessionStorageItem("username",e.USER_NAME),this.setSessionStorageItem("sessionId",e.SESSION_ID)}captureReturnUrl(){const{pathname:e,search:t,hash:s}=location;if("/login"===e)return;const i=`${"/"!==e?e:""}`;this.returnUrl=`${i}${t}${s}`,this.setSessionStorageItem("returnUrl",this.returnUrl)}setItem(e,t,s){"local"===s?localStorage.setItem(this.storageKeyPrefix+e,t):sessionStorage.setItem(this.storageKeyPrefix+e,t)}getItem(e,t){return"local"===t?localStorage.getItem(this.storageKeyPrefix+e):sessionStorage.getItem(this.storageKeyPrefix+e)}removeItem(e,t){"local"===t?localStorage.removeItem(this.storageKeyPrefix+e):sessionStorage.removeItem(this.storageKeyPrefix+e)}setLocalStorageItem(e,t){this.setItem(e,t,"local")}setSessionStorageItem(e,t){this.setItem(e,t,"session")}getLocalStorageItem(e){return this.getItem(e,"local")}getSessionStorageItem(e){return this.getItem(e,"session")}removeLocalStorageItem(e){this.removeItem(e,"local")}removeSessionStorageItem(e){this.removeItem(e,"session")}}const o=i.DI.createInterface((e=>e.singleton(r)))},22296:(e,t,s)=>{s.d(t,{k:()=>r});var i=s(66952);const r=(0,i.createLogger)("foundation-comms")}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[430],{4077:(e,t,s)=>{var i;s.d(t,{G:()=>i,l:()=>r}),function(e){e.BASIC="BASIC",e.SSO="SSO",e.JWT="JWT",e.REFRESH="REFRESH"}(i||(i={}));class r extends Error{constructor(e,t,s="Auth Failed \n"){super(s),this.sent=e,this.received=t,Object.setPrototypeOf(this,r.prototype)}isIgnorableError(){var e,t,s,i;return null===(i=null===(s=null===(t=null===(e=this.received)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.ERROR)||void 0===s?void 0:s.toLowerCase())||void 0===i?void 0:i.includes("request needs the user to be logged")}getMessageError(){var e,t;return Array.isArray(null===(e=this.received)||void 0===e?void 0:e.ERROR)?null===(t=this.received)||void 0===t?void 0:t.ERROR.map((e=>this.errorDetailFormatter(e))).join("\n"):""}getDetailsError(){var e,t,s,i;return Array.isArray(null===(t=null===(e=this.received)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.ERROR)?null===(i=null===(s=this.received)||void 0===s?void 0:s.DETAILS)||void 0===i?void 0:i.ERROR.map((e=>this.errorDetailFormatter(e))).join("\n"):""}hasPasswordExpiredError(){return this.hasErrorCode("PASSWORD_EXPIRED")}hasErrorCode(e){var t,s;return!!Array.isArray(null===(t=this.received)||void 0===t?void 0:t.ERROR)&&(null===(s=this.received)||void 0===s?void 0:s.ERROR.some((t=>t.CODE===e)))}errorDetailFormatter(e){return`\n ${e.CODE}: \n ${e.TEXT}`}}},62646:(e,t,s)=>{s.d(t,{lj:()=>q});var i=s(186),r=s(59557),o=s(83147),n=s(75951);class a{constructor(){this.cachedMetadata=new Map,this.cachedJsonSchema=new Map}getMetadataFor(e){return this.cachedMetadata.get(e)}getJsonSchemaFor(e){return this.cachedJsonSchema.get(e)}hasMetadataFor(e){return this.cachedMetadata.has(e)}hasJsonSchemaFor(e){return this.cachedJsonSchema.has(e)}setMetadataFor(e,t){this.cachedMetadata.set(e,t)}setJsonSchemaFor(e,t){this.cachedJsonSchema.set(e,t)}}const c=n.DI.createInterface((e=>e.singleton(a))),d=new RegExp(/wss?:\/\/[-a-zA-Z0-9@:%._\+~#=]{1,256}\b([-a-zA-Z0-9()@:%_\+.~#?&\/=]*)\b\/*$/,"i");var h=s(22296);const E=n.DI.createInterface(),l=n.DI.createInterface();var u=s(26714),g=s(16697),S=s(56383),_=s(29866),T=s(40804),R=s(7211),v=s(44866),p=s(75527);class m{serialize(e){return JSON.stringify(e)}deserialize(e){return e?"string"==typeof e?JSON.parse(e):e.data?JSON.parse(e.data):e.text().then((e=>JSON.parse(e))):Promise.resolve({})}}const O=n.DI.createInterface((e=>e.singleton(m)));let A=class{constructor(e){this.serializer=e}get(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=yield fetch(e,Object.assign(Object.assign({},t),{method:"GET"}));return(t.serializer||this.serializer).deserialize(s)}))}post(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=yield fetch(e,Object.assign(Object.assign({},t),{method:"POST"}));return(t.serializer||this.serializer).deserialize(s)}))}};A=(0,i.__decorate)([(0,i.__param)(0,O)],A);const I=n.DI.createInterface((e=>e.singleton(A)));var f=s(9162);const M={polling:Object.assign({POLLING_MAP:{EVENT_AMEND_USER:{TEMP_FREQUENCY:500,AMOUNT_OF_POLLS:5,QUERIES:["ALL_USERS"]}},POLLING_INTERVAL_MAP:{ALL_TRADES:5e3,ALL_USERS:5e3,ALL_PROCESSES_STATUS:1e4},POLLING_FREQUENCY:5e3},{})};let N=class e{get isConnected(){return this._isConnected}set isConnected(e){this._isConnected=e,this.isConnectedSubject.next(this._isConnected)}constructor(e,t,s,i,r,o=M){var n;this.http=e,this.messageBuilder=t,this.session=s,this.metaCache=i,this.serializer=r,this.config=o,this.isWorking=!1,this._isConnected=!1,this.isConnectedSubject=new u.X(this._isConnected),this.isConnected$=null===(n=this.isConnectedSubject)||void 0===n?void 0:n.asObservable(),this.ongoingTurbo={},this.streams=new Map}checkHost(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){try{return this.getMessage({MESSAGE_TYPE:f.Cs.HEARTBEAT_PING,SOURCE_REF:"host check"}).then((e=>e.MESSAGE_TYPE===f.Cs.HEARTBEAT_PONG))}catch(e){return h.k.error(e),!1}}))}send(t,s){return this.http.post(e.getUrl(this.host,t),{body:e.getBody(t),headers:e.getHeaders(t)})}httpMode(){return!0}setValidSession(e){h.k.warn("setValidSession() called while in http polling mode.")}connect(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return this.host=e,this.host.endsWith("/")||(this.host=this.host.concat("/")),this.checkHost().then((e=>(this.isConnected=e,this.session.setSessionStorageItem("hostUrl",this.host),e)))}))}disconnect(){this.isConnected=!1,this.streams.clear(),this.ongoingTurbo={},this.host=void 0}snapshot(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createDataLogonMessage(e,t);return h.k.debug(`HTTP MODE - ${s.MESSAGE_TYPE} (snapshot) message created -> `,s),this.send(s).then((e=>(this.dataLogoff(s.SOURCE_REF).catch((e=>h.k.error(e))),e)))}))}stream(e,t,s,i){const r=this.messageBuilder.createDataLogonMessage(e,i);h.k.debug(`HTTP MODE - ${r.MESSAGE_TYPE} (stream) message created -> `,r);const o=r.SOURCE_REF;this.streams.set(o,{SOURCE_REF:o,POLLING_FREQUENCY:new u.X(this.config.polling.POLLING_FREQUENCY),RESOURCE_NAME:e});const n=this.streams.get(o).POLLING_FREQUENCY,a=(0,g.z)((0,S.D)(this.send(r)),n.pipe((0,_.w)((e=>(0,T.F)(e)))).pipe((0,_.w)((()=>(0,S.D)(this.getMessage(r)))))).pipe((0,R.o)((()=>this.streams.has(o))),(0,v.x)((()=>{h.k.debug(`Terminating stream for ${e} - ${o}`),this.dataLogoff(o)})));return this.streams.get(o).STREAM=a,a}getMessage(t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return this.http.get(e.getUrl(this.host,t),{headers:e.getHeaders(t)})}))}getMoreRows(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreRowsMessage(e);return h.k.debug(`HTTP MODE - ${t.MESSAGE_TYPE} message created -> `,t),this.send(t)}))}dataLogoff(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return this.send(t).then((t=>(this.streams.has(e)&&(h.k.debug(`Removing stream ${e}`),this.streams.delete(e)),t)))}))}getMetadata(e,t=!0){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMetaRequestMessage(e);return h.k.debug(`HTTP MODE - ${t.MESSAGE_TYPE} (metadata) message created -> `,t),this.send(t).then((e=>e.DETAILS))}))}getJSONSchema(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMetaRequestMessage(e,f.N$.JSON_SCHEMA_REQUEST);return h.k.debug(`HTTP MODE! - ${t.MESSAGE_TYPE} (json schema) message created -> `,t),this.send(t)}))}request(e,t){const s=this.messageBuilder.createRequestMessage(e,t);return h.k.debug(`HTTP MODE! - ${s.MESSAGE_TYPE} (request server) message created -> `,s),this.send(s)}commitEvent(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createCommitMessage(e,t);return h.k.debug(`HTTP MODE! - ${s.MESSAGE_TYPE} (commit) message created -> `,s),this.send(s).then((t=>(this.maybeTurbo(e,t),t)))}))}maybeTurbo(e,t){var s;if(!(null===(s=null==t?void 0:t.MESSAGE_TYPE)||void 0===s?void 0:s.endsWith("_ACK")))return;if(this.ongoingTurbo[e])return void h.k.debug(`${e} polling frequency is already accelerated.`);const i=this.config.polling.POLLING_MAP[e];if(!(null==i?void 0:i.TEMP_FREQUENCY)||!i.AMOUNT_OF_POLLS)return;const r=i.TEMP_FREQUENCY,o=r*i.AMOUNT_OF_POLLS,n=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP)),a=JSON.parse(JSON.stringify(this.config.polling.POLLING_INTERVAL_MAP));for(const e of i.QUERIES)a[e]=r,n[e]||(n[e]=this.config.polling.POLLING_FREQUENCY);h.k.debug(`${e} TRIGGERED -> ENFORCING TURBO | FREQUENCY=${r}ms DURATION=${o}`),this.ongoingTurbo[e]=!0,this.updateIntervals({polling:{POLLING_INTERVAL_MAP:a}}),setTimeout((()=>{h.k.debug(`RESTORED ORIGINAL POLLING INTERVALS FOR ${e}`),this.updateIntervals({polling:{POLLING_INTERVAL_MAP:n}}),this.ongoingTurbo[e]=!1}),o)}updateIntervals(e){const{POLLING_INTERVAL_MAP:t}=e.polling;t&&(this.config.polling.POLLING_INTERVAL_MAP=t,this.handlePollingIntervalMapUpdate(t))}handlePollingIntervalMapUpdate(e){if(e)for(const t in e){if(!e.hasOwnProperty(t))continue;const s=e[t];this.config.polling.POLLING_INTERVAL_MAP[t]=s,h.k.debug(`Setting polling frequency for ${t} = ${s}`),[...this.streams.values()].filter((e=>e.RESOURCE_NAME===t)).forEach((e=>{var t;return null===(t=null==e?void 0:e.POLLING_FREQUENCY)||void 0===t?void 0:t.next(s)}))}}static getHeaders(e){const t={"Content-type":"application/json; charset=UTF-8","source-ref":e.SOURCE_REF};return e.SESSION_AUTH_TOKEN&&(t["SESSION-AUTH-TOKEN"]=e.SESSION_AUTH_TOKEN),e.MESSAGE_TYPE===f.N$.EVENT_LOGOUT&&(t["SESSION-ID"]=e.SESSION_ID),t}static getBody(e){return JSON.stringify(e)}static getUrl(e,t){const s=t.MESSAGE_TYPE;let i=t.MESSAGE_TYPE.replace(/_/g,"-").toLowerCase();return s===f.N$.DATA_LOGON&&(i=t.DETAILS.DATASOURCE_NAME.replace(/_/g,"-").toLowerCase()),`${e}${i}`}};(0,i.__decorate)([o.observable],N.prototype,"host",void 0),(0,i.__decorate)([o.observable],N.prototype,"isWorking",void 0),(0,i.__decorate)([o.observable],N.prototype,"_isConnected",void 0),(0,i.__decorate)([o.volatile],N.prototype,"isConnected",null),N=(0,i.__decorate)([(0,i.__param)(0,I),(0,i.__param)(1,f.sW),(0,i.__param)(2,p.z),(0,i.__param)(3,c),(0,i.__param)(4,r.JSONSerializer),(0,i.__param)(5,(0,n.optional)(l))],N);const b=n.DI.createInterface((e=>e.singleton(N)));var C=s(72284),L=s(98239),U=s(37674),k=s(30094),w=s(30526),P=s(52702),y=s(68370),D=s(52354),G=s(2355);const F=1e4,H=6e4;var V;!function(e){e.Linear="linear",e.Exponential="exponential"}(V||(V={}));const $=(e,t)=>{const{reconnectInterval:s=F}=e,i=s>H?H:s,r=Math.round(Math.log2(H/i));return i*Math.pow(2,t%r)},Y=e=>{const{reconnectInterval:t=F}=e;return t>H?H:t};class K extends C.x{constructor(){super()}}class W{constructor(e,t,s,i){this._message=e,this._onMessage=t,this._onError=s,this._isSubscription=i}get sentMessage(){return this._message}get onReceivedMessage(){return this._onMessage}get onReceivedError(){return this._onError}get isSubscription(){return this._isSubscription}}let B=class{isConnectedChanged(e,t){this.isConnectedSubject.next(t)}constructor(e,t,s,i){this.messageBuilder=e,this.session=t,this.serializer=s,this.uuid=i,this.defaultInterval=1e4,this.secondsMultiplier=1e3,this.isConnectedSubject=new u.X(!1),this.isConnected=!1,this.hasValidSession=!1,this.heartbeatIsEnabled=!0,this.heartbeatInterval=this.defaultInterval,this.isReconnecting=!1,this.socketMessages=()=>this.wsMessages}get heartbeatLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeatLogging)&&void 0!==t&&t}get messageLoggingIsEnabled(){var e,t;return null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableMessageLogging)&&void 0!==t&&t}connect(e,t,s){return this.url=e,this.connectOptions=t,this.reconnectOptions=s,new Promise((e=>{var t,s,r,o;h.k.info(`${this.isReconnecting?"Reconnecting":"Connecting"} to ${this.url}`);(!this.isReconnecting||!(null===(t=this.reconnectOptions)||void 0===t?void 0:t.reconnectStreams))&&this.cleanMessages(),null===(s=this.socketSubscription)||void 0===s||s.unsubscribe(),this.websocket=new D.p({url:this.url,openObserver:{next:()=>{this.isConnected=!0,this.session.setSessionStorageItem("hostUrl",this.url),this.prepareHeartbeat(),h.k.info("WebSocket connection is now open"),e(this.isConnected)}},closeObserver:{next:t=>{this.disconnectedByServer=!t.wasClean,this.isConnected=!1,this.disconnectedByServer&&h.k.info(`WebSocket connection was closed due an error - Code: ${t.code} ${t.reason?" | Reason: "+t.reason:""}`),e(this.isConnected)}},serializer:this.serializer.serialize,deserializer:this.serializer.deserialize});this.socketSubscription=this.websocket.subscribe(null!==(o=null===(r=this.connectOptions)||void 0===r?void 0:r.connectObserver)&&void 0!==o?o:{next:e=>(0,i.__awaiter)(this,void 0,void 0,(function*(){var t;const s=`Response Message received for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,h.k.info,s);const{SOURCE_REF:i,MESSAGE_TYPE:r}=e,o=this.getMessageHandler(i,r);if(!o)return;let n=!1;switch(e.MESSAGE_TYPE){case f.N$.EVENT_LOGIN_AUTH_ACK:{this.hasValidSession=!0;const s=e.DETAILS;s.HEARTBEAT_INTERVAL_SECS&&void 0===(null===(t=this.connectOptions)||void 0===t?void 0:t.heartbeatInterval)&&(this.heartbeatInterval=s.HEARTBEAT_INTERVAL_SECS*this.secondsMultiplier,this.prepareHeartbeat());break}case f.Cs.LOGOUT_ACK:return this.hasValidSession=!1,o.onReceivedMessage.call(this,e),void this.cleanMessages();case f.Cs.LOGON_ACK:return;case f.Cs.LOGOFF_ACK:if(e.LOGGED_OUT&&this.hasValidSession){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.send(e);t?t.MESSAGE_TYPE===f.N$.EVENT_LOGIN_AUTH_ACK&&(this.session.setAuthResult(t),this.wsMessageHandlers.forEach((e=>{e.isSubscription&&(e.sentMessage.SESSION_AUTH_TOKEN=t.SESSION_AUTH_TOKEN,this.websocket.next(e.sentMessage))}))):this.hasValidSession=!1}break;case f.Cs.QUERY_UPDATE:if(!o.isSubscription){const e=this.messageBuilder.createDataLogoffMessage(i);this.send(e)}break;case f.Cs.MSG_NACK:n=!0}n?o.onReceivedError.call(this,{receivedMessage:e,sentMessage:o.sentMessage}):o.onReceivedMessage.call(this,e),this.wsMessages.next(e),o.isSubscription||this.removeMessageHandler(i)})),error:e=>{h.k.debug("Error found: ",e),this.reconnect()},complete:()=>{var e;this.disconnectedByServer&&(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)?this.reconnect():h.k.info("Connection is now closed")}})}))}prepareHeartbeat(){var e,t,s,r;this.heartbeatSubscription&&this.heartbeatSubscription.unsubscribe();const o=()=>(0,i.__awaiter)(this,void 0,void 0,(function*(){if(!this.isConnected)return;const e={MESSAGE_TYPE:f.Cs.HEARTBEAT_PING,SOURCE_REF:this.uuid.createId()},t=yield this.send(e);this.heartbeatIsEnabled=t.MESSAGE_TYPE===f.Cs.HEARTBEAT_PONG&&t.SOURCE_REF===e.SOURCE_REF}));if(null!==(t=null===(e=this.connectOptions)||void 0===e?void 0:e.enableHeartbeat)&&void 0!==t?t:this.heartbeatIsEnabled){const e=null!==(r=null===(s=this.connectOptions)||void 0===s?void 0:s.heartbeatInterval)&&void 0!==r?r:this.heartbeatInterval;this.heartbeatSubscription=(0,L.H)(e,e).pipe((0,R.o)((()=>this.websocket&&this.isConnected)),(0,w.b)((()=>this.heartbeatLoggingIsEnabled&&h.k.debug(`Sending a heartbeat ping every ${e} ms`)))).subscribe((()=>o()))}}reconnect(){var e,t,s,i,r;const o=!(null===(e=this.connectOptions)||void 0===e?void 0:e.alwaysOn)&&!1===(null===(t=this.connectOptions)||void 0===t?void 0:t.enableHeartbeat);if(this.isReconnecting||o)return;this.isReconnecting=!0;const n=(null===(s=this.reconnectOptions)||void 0===s?void 0:s.reconnectStrategy)===V.Exponential?$:Y,a=this.isConnectedSubject.asObservable().pipe((0,_.w)((e=>e?(0,U.of)(-1):((e,t)=>new G.y((s=>{let i,r=0;return function o(){s.next(r),clearTimeout(i),i=setTimeout(o,t(e,r)),r+=1}(),()=>{clearTimeout(i)}})))(this.reconnectOptions,n).pipe((0,P.z)((e=>{var t,s,i;let r;return r=(null===(t=this.connectOptions)||void 0===t?void 0:t.alwaysOn)?e+1:null!==(i=null===(s=this.reconnectOptions)||void 0===s?void 0:s.reconnectAttempts)&&void 0!==i?i:10,e<r?(0,U.of)(e):(0,k._)((()=>new Error(`Max reconnect attempts ${r} reached.`)))}))))),(0,R.o)((()=>this.websocket&&!this.isConnected)));a.subscribe(null!==(r=null===(i=this.reconnectOptions)||void 0===i?void 0:i.reconnectObserver)&&void 0!==r?r:{next:e=>{h.k.debug(`Attempt no. ${e+1} to reconnect`),this.websocket.complete(),this.connect(this.url,this.connectOptions,this.reconnectOptions)},error:e=>{var t;h.k.debug(e),null===(t=this.socketSubscription)||void 0===t||t.unsubscribe(),this.isReconnecting=!1},complete:()=>{h.k.info(this.isConnected?"Reconnected":"Disconnected"),this.isReconnecting=!1,this.wsMessageHandlers.forEach((e=>{e.isSubscription&&this.websocket.next(e.sentMessage)}))}})}reset(){this.isConnected=!1,this.websocket&&this.websocket.complete(),this.websocket=null,this.cleanMessages()}cleanMessages(){this.wsMessages&&this.wsMessages.complete(),this.wsMessages=new K,this.wsMessageHandlers=new Map}send(e,t=!0){if(!this.isConnected)return void Promise.reject(new Error("WebSocket connection is closed"));const s=`Sending Message for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,h.k.info,s),new Promise(((s,i)=>{const r=e=>{s(e)},o=e=>{i(e)};t&&this.setMessageHandler(e,r,o),this.websocket.next(e)}))}sendForStream(e,t,s){if(!this.isConnected)return(0,k._)((()=>new Error("WebSocket connection is closed")));if(!this.hasValidSession)return(0,k._)((()=>new Error("WebSocket connection is open but there is no valid/active session, please check your auth flow")));const i=`Sending Message (stream) for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;return this.logMessageTypeFlow(e.MESSAGE_TYPE,h.k.info,i),this.setMessageHandler(e,t,s,!0),this.websocket.next(e),(0,S.D)(this.wsMessages.pipe((0,y.h)((t=>t.SOURCE_REF===e.SOURCE_REF))))}setMessageHandler(e,t,s,i=!1){const r=`Setting Message Handler for SourceRef: ${e.SOURCE_REF} | MessageType: ${e.MESSAGE_TYPE}`;this.logMessageTypeFlow(e.MESSAGE_TYPE,h.k.debug,r),this.wsMessageHandlers.set(e.SOURCE_REF,new W(e,t,s,i))}removeMessageHandler(e){this.wsMessageHandlers.delete(e)}getMessageHandler(e,t){const s=`Getting Message Handler for SourceRef: ${e} | MessageType: ${t}`;return this.logMessageTypeFlow(t,h.k.debug,s),this.wsMessageHandlers.get(e)}logMessageTypeFlow(e,t,s){switch(e){case f.Cs.HEARTBEAT_PING:case f.Cs.HEARTBEAT_PONG:this.heartbeatLoggingIsEnabled&&t(s);break;default:this.messageLoggingIsEnabled&&t(s)}}};(0,i.__decorate)([o.observable],B.prototype,"websocket",void 0),(0,i.__decorate)([o.observable],B.prototype,"wsMessages",void 0),(0,i.__decorate)([o.observable],B.prototype,"wsMessageHandlers",void 0),(0,i.__decorate)([o.observable],B.prototype,"isConnected",void 0),(0,i.__decorate)([o.observable],B.prototype,"disconnectedByServer",void 0),(0,i.__decorate)([o.observable],B.prototype,"hasValidSession",void 0),(0,i.__decorate)([o.observable],B.prototype,"heartbeatIsEnabled",void 0),(0,i.__decorate)([o.observable],B.prototype,"isReconnecting",void 0),B=(0,i.__decorate)([(0,i.__param)(0,f.sW),(0,i.__param)(1,p.z),(0,i.__param)(2,O),(0,i.__param)(3,r.UUID)],B);const x=n.DI.createInterface((e=>e.singleton(B))),j={connect:{alwaysOn:!1,enableHeartbeat:!0,enableHeartbeatLogging:!1,heartbeatInterval:1e4,enableMessageLogging:!1},reconnect:{reconnectAttempts:10,reconnectInterval:1e4,reconnectStreams:!0}};let Q=class{get isConnected(){return this.socket.isConnected}get isConnectedSubject(){return this.socket.isConnectedSubject}get isConnected$(){var e;return null===(e=this.socket.isConnectedSubject)||void 0===e?void 0:e.asObservable()}constructor(e,t,s,i=j){this.socket=e,this.messageBuilder=t,this.metaCache=s,this.config=i,this.isWorking=!1}httpMode(){return!1}setValidSession(e){this.socket.hasValidSession=e}send(e,t){return this.socket.send(e,t)}connect(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return this.socket.reset(),d.test(e)?this.socket.connect(e,this.config.connect,this.config.reconnect):(h.k.error(`Specified host (${e}) is not valid WebSocket url. Connection will not proceed.`),void h.k.warn("Make sure the host url starts with wss:// or ws://"))}))}disconnect(){this.socket.reset()}snapshot(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createDataLogonMessage(e,t);return h.k.debug(`${s.MESSAGE_TYPE} (snapshot) message created -> `,s),this.socket.send(s)}))}stream(e,t,s,i){const r=this.messageBuilder.createDataLogonMessage(e,i);return h.k.debug(`${r.MESSAGE_TYPE} (stream) message created -> `,r),this.socket.sendForStream(r,t,s)}getMoreRows(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createMoreRowsMessage(e);return h.k.debug(`${t.MESSAGE_TYPE} message created -> `,t),this.socket.send(t,!1)}))}dataLogoff(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=this.messageBuilder.createDataLogoffMessage(e);return h.k.debug(`${t.MESSAGE_TYPE} message created -> `,t),this.socket.send(t)}))}getMetadata(e,t=!0){var s;return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(t&&this.metaCache.hasMetadataFor(e))return h.k.debug(`Cached metadata retrieved for ${e}`),this.metaCache.getMetadataFor(e);const i=this.messageBuilder.createMetaRequestMessage(e);let r;h.k.debug(`${i.MESSAGE_TYPE} (metadata) message created -> `,i);try{this.isWorking=!0;const t=yield this.socket.send(i);r=null!==(s=null==t?void 0:t.DETAILS)&&void 0!==s?s:{},Object.keys(r).length&&this.metaCache.setMetadataFor(e,r)}catch(e){h.k.error(e)}finally{this.isWorking=!1}return r}))}getJSONSchema(e,t=!0){var s;return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(t&&this.metaCache.hasJsonSchemaFor(e))return h.k.debug(`Cached JsonSchema retrieved for ${e}`),this.metaCache.getJsonSchemaFor(e);const i=this.messageBuilder.createMetaRequestMessage(e,f.N$.JSON_SCHEMA_REQUEST);let r;h.k.debug(`${i.MESSAGE_TYPE} (json schema) message created -> `,i);try{this.isWorking=!0,r=null!==(s=yield this.socket.send(i))&&void 0!==s?s:{},Object.keys(r).length&&this.metaCache.setJsonSchemaFor(e,r)}catch(e){h.k.error(e)}finally{this.isWorking=!1}return r}))}request(e,t){const s=this.messageBuilder.createRequestMessage(e,t);return h.k.debug(`${s.MESSAGE_TYPE} (request server) message created -> `,s),this.socket.send(s)}commitEvent(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const s=this.messageBuilder.createCommitMessage(e,t);return h.k.debug(`${s.MESSAGE_TYPE} (commit) message created -> `,s),this.socket.send(s)}))}};(0,i.__decorate)([o.observable],Q.prototype,"isWorking",void 0),(0,i.__decorate)([o.volatile],Q.prototype,"isConnected",null),Q=(0,i.__decorate)([(0,i.__param)(0,x),(0,i.__param)(1,f.sW),(0,i.__param)(2,c),(0,i.__param)(3,(0,n.optional)(E))],Q);const J="true"===r.FORCE_HTTP||!1,z=n.DI.createInterface((e=>e.singleton(Q))),q=n.DI.createInterface((e=>J?e.aliasTo(b):e.aliasTo(z)))},9162:(e,t,s)=>{s.d(t,{Cs:()=>i,N$:()=>r,QT:()=>o,sW:()=>l});var i,r,o,n=s(186),a=s(59557),c=s(75951),d=s(4077),h=s(75527);!function(e){e.LOGON_ACK="LOGON_ACK",e.LOGON_NACK="LOGON_NACK",e.LOGOFF_ACK="LOGOFF_ACK",e.LOGOFF_NACK="LOGOFF_NACK",e.HEARTBEAT_PING="HEARTBEAT_PING",e.HEARTBEAT_PONG="HEARTBEAT_PONG",e.MORE_ROWS="MORE_ROWS",e.MSG_ACK="MSG_ACK",e.MSG_NACK="MSG_NACK",e.LOGOUT_ACK="LOGOUT_ACK",e.LOGOUT_NACK="LOGOUT_NACK",e.QUERY_UPDATE="QUERY_UPDATE"}(i||(i={})),function(e){e.EVENT_LOGIN_AUTH="EVENT_LOGIN_AUTH",e.EVENT_LOGIN_AUTH_ACK="EVENT_LOGIN_AUTH_ACK",e.EVENT_LOGIN_AUTH_NACK="EVENT_LOGIN_AUTH_NACK",e.EVENT_LOGOUT="EVENT_LOGOUT",e.DATA_LOGON="DATA_LOGON",e.DATA_LOGOFF="DATA_LOGOFF",e.META_REQUEST="META_REQUEST",e.JSON_SCHEMA_REQUEST="JSON_SCHEMA_REQUEST",e.RESOURCES_REQUEST="RESOURCES_REQUEST",e.EVENT_CHANGE_USER_PASSWORD="EVENT_CHANGE_USER_PASSWORD",e.EVENT_SELF_SERVICE_PASSWORD_RESET="EVENT_SELF_SERVICE_PASSWORD_RESET",e.EVENT_PASSWORD_RESET_ACTION="EVENT_PASSWORD_RESET_ACTION"}(r||(r={})),function(e){e.SESSION_NOT_FOUND="SESSION_NOT_FOUND",e.UNKNOWN_MESSAGE_TYPE="UNKNOWN_MESSAGE_TYPE"}(o||(o={}));let E=class{constructor(e,t){this.session=e,this.uuid=t}createLoginMessage(e){let t;switch(e.type){case d.G.BASIC:t={USER_NAME:e.username,PASSWORD:e.password};break;case d.G.REFRESH:t={USER_NAME:e.username,REFRESH_AUTH_TOKEN:e.refreshToken};break;case d.G.SSO:t={SSO_TOKEN:e.ssoToken};break;case d.G.JWT:t={JWT:e.jwt,DOMAIN:e.domain}}return{DETAILS:t,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_LOGIN_AUTH}}createLogoutMessage(e){var t,s;return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_LOGOUT,SESSION_AUTH_TOKEN:null!==(t=e.authToken)&&void 0!==t?t:this.session.getSessionStorageItem("authToken"),SESSION_ID:null!==(s=e.sessionId)&&void 0!==s?s:this.session.getSessionStorageItem("sessionId")}}createDataLogonMessage(e,t){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.DATA_LOGON,DETAILS:Object.assign({DATASOURCE_NAME:e},t),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createDataLogoffMessage(e){return{SOURCE_REF:e,MESSAGE_TYPE:r.DATA_LOGOFF,SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createRequestMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e.startsWith("REQ_")?e:`REQ_${e}`},t)}createMetaRequestMessage(e,t=r.META_REQUEST){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:t,DETAILS:{FEATURE:e},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}createCommitMessage(e,t){return Object.assign({SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:e},t)}createRefreshTokenMessage(){return{SOURCE_REF:this.uuid.createId(),SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken"),MESSAGE_TYPE:r.EVENT_LOGIN_AUTH,DETAILS:{REFRESH_AUTH_TOKEN:this.session.getSessionStorageItem("refreshToken")}}}createChangePasswordMessage(e,t,s){return{USER_NAME:e,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_CHANGE_USER_PASSWORD,DETAILS:{OLD_PASSWORD:t,NEW_PASSWORD:s}}}createForgotPasswordMessage(e,t,s=e){return{USER_NAME:s,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_SELF_SERVICE_PASSWORD_RESET,DETAILS:{USER_NAME:e,RETURN_URL:t}}}createForgotPasswordTokenMessage(e,t,s,i=e){return{USER_NAME:i,SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:r.EVENT_PASSWORD_RESET_ACTION,DETAILS:{USER_NAME:e,RESET_TOKEN:t,NEW_PASSWORD:s}}}createMoreRowsMessage(e){return{SOURCE_REF:this.uuid.createId(),MESSAGE_TYPE:i.MORE_ROWS,DETAILS:{SOURCE_REF:e},SESSION_AUTH_TOKEN:this.session.getSessionStorageItem("authToken")}}};E=(0,n.__decorate)([(0,n.__param)(0,h.z),(0,n.__param)(1,a.UUID)],E);const l=c.DI.createInterface((e=>e.singleton(E)))},5127:(e,t,s)=>{s.d(t,{$:()=>r});var i=s(22296);function r(e,t="ROW_REF"){const s=e=>{const s=Object.assign(Object.assign({},e),{[t]:e.DETAILS[t]});return delete s.DETAILS,s},r=[],o=[],n=[];for(const t of e.ROW)if(t.DETAILS)switch(t.DETAILS.OPERATION){case"INSERT":r.push(s(t));break;case"MODIFY":n.push(s(t));break;case"DELETE":o.push(s(t));break;default:i.k.error(`Unsupported operation type: '${t.DETAILS.OPERATION}'`)}return{inserts:r,deletes:o,updates:n,SOURCE_REF:e.SOURCE_REF}}},43752:(e,t,s)=>{s.d(t,{Yh:()=>H});var i=s(186),r=s(83147),o=s(75951),n=s(98239),a=s(19788),c=s(56383),d=s(29866),h=s(7211),E=s(26714),l=s(62646),u=s(9162),g=s(19082),S=s(4077),_=s(75527),T=s(22296);const R=o.DI.createInterface();function v(){return(null===navigator||void 0===navigator?void 0:navigator.credentials)?"PasswordCredential"in window||(T.k.warn("PasswordCredential not available in this browser."),!1):(T.k.warn("CredentialsContainer not available in this browser."),!1)}const p=":";function m(e="",t=p,s){return e.split(t,s).map((e=>e.trim())).filter((e=>""!==e))}function O(e,t=p){const s="string"==typeof e&&e.trim();return!!s&&s.includes(t)}function A(e,t=p){return"string"==typeof e&&e.trim()?(e.match(new RegExp(t,"g"))||[]).length:0}function I(e,t=p){for(const s of e)if(O(s,t))return s;return e.find((e=>"string"==typeof e&&!!e.trim()))}function f(e,t,s){const i="string"==typeof e&&e.trim();return!i||s&&!i.includes(s)||A(i)>1?s&&t&&s!==t?`${t}:${s}`:t||s:i}function M(e="credential"){T.k.warn(`Unable to migrate legacy ${e} to latest format. Please remove from your browser.`)}const N={password:!0,mediation:"optional"},b={cookie:{path:"/",name:"credentials",expires:7300,storePasswords:!1}};let C=class{constructor(e,t=b){this.session=e,this.config=t}createBasicCredentials(e){return{type:S.G.BASIC,username:e.username,password:e.password}}createRefreshCredentials(e){var t,s;return{type:S.G.REFRESH,username:null!==(t=null==e?void 0:e.username)&&void 0!==t?t:this.getUsername(),refreshToken:null!==(s=null==e?void 0:e.refreshToken)&&void 0!==s?s:this.getRefreshToken()}}createSSOCredentials(e){var t;return{type:S.G.SSO,ssoToken:null!==(t=null==e?void 0:e.ssoToken)&&void 0!==t?t:this.getSSOToken()}}validateBasicCredentials(e){return e&&!!e.username&&!!e.password}validateRefreshCredentials(e){return e&&!!e.refreshToken&&!!e.username}validateSSOCredentials(e){return e&&!!e.ssoToken}validateUserCredentialData(e,t){const s=e&&!!e.id&&!!e.name&&!e.name.includes(p)&&A(e.id)<=1;return t?s&&!!e.password:s}normaliseLegacyCredentialData(e,t){if(this.validateUserCredentialData(e,!0))return[e,!0];if(this.validateUserCredentialData(t))return[t,!1];if(e)try{const t=e,[s]=m(t.name||t.id),[i,r]=m(I([t.id,t.name]));return[{id:f(t.id||t.name,s,r),name:s,password:t.password||""},!0]}catch(e){M("PasswordCredential")}if(t)try{const e=t,[s]=m(e.name||e.username||e.organisation),[i,r]=m(I([e.organisation||e.username||e.name]));return[{id:f(e.id||e.username||e.name,s,r),name:s,password:e.password||""},!1]}catch(e){M("cookie")}return[void 0,!1]}storeCredentialsInContainer(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(!v())return;const t=new PasswordCredential(e);return T.k.debug("Storing credentials in CredentialsContainer"),navigator.credentials.store(t)}))}getCredentialsFromContainer(e=N){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(v())return T.k.debug("Getting credentials from CredentialsContainer"),yield navigator.credentials.get(e)}))}storeCredentialsInCookie(e){const{password:t}=e,s=(0,i.__rest)(e,["password"]),r=this.config.cookie.storePasswords?e:s;return T.k.debug("Storing credentials in cookie"),!!g.Z.set(this.config.cookie.name,JSON.stringify(r),{expires:this.config.cookie.expires,domain:location.hostname,path:this.config.cookie.path,secure:!0})}getCredentialsFromCookie(){T.k.debug("Getting credentials from cookie");const e=g.Z.get(this.config.cookie.name);return e?JSON.parse(e):void 0}storeCredentials(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(v()){const t=yield this.storeCredentialsInContainer(e);return Promise.resolve(!!t)}return Promise.resolve(this.storeCredentialsInCookie(e))}))}getCredentials(e){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return v()?this.getCredentialsFromContainer(e):Promise.resolve(this.getCredentialsFromCookie())}))}getSSOToken(){return this.session.getSessionStorageItem("ssoToken")}getUsername(){return this.session.getSessionStorageItem("username")}getRefreshToken(){return this.session.getSessionStorageItem("refreshToken")}removeCookie(){g.Z.remove(this.config.cookie.name,{domain:location.hostname,path:this.config.cookie.path})}removeSSOToken(){this.session.removeSessionStorageItem("ssoToken")}removeUsername(){this.session.removeSessionStorageItem("username")}removeRefreshToken(){this.session.removeSessionStorageItem("refreshToken")}removeAll(){this.removeCookie(),this.removeSSOToken(),this.removeUsername(),this.removeRefreshToken()}preventSilentAccess(){return v()&&navigator.credentials.preventSilentAccess()}};C=(0,i.__decorate)([(0,i.__param)(0,_.z),(0,i.__param)(1,(0,o.optional)(R))],C);const L=o.DI.createInterface((e=>e.singleton(C)));class U{constructor(e){Object.assign(this,e)}hasAdminProfile(){return this.hasProfile("ADMIN")}hasPermission(e){return this.hasKey(this.permissions,e)}hasProfile(e){return this.hasKey(this.profiles,e)}hasKey(e,t){return!!(e&&e.length&&t)&&(Array.isArray(t)||(t=[t]),t.some((t=>e.includes(t))))}}(0,i.__decorate)([r.observable],U.prototype,"permissions",void 0),(0,i.__decorate)([r.observable],U.prototype,"profiles",void 0),(0,i.__decorate)([r.observable],U.prototype,"username",void 0);let k=class{loggedUserResultChanged(e,t){var s;null===(s=this.isLoggedInSubject)||void 0===s||s.next(this.isLoggedIn)}get isLoggedIn$(){return this.isLoggedInSubject.asObservable()}get isLoggedIn(){return!!this.loggedUserResult&&!(!this.loggedUserResult.authToken||!this.loggedUserResult.sessionId)}constructor(e,t,s,i){this.session=e,this.connect=t,this.messageBuilder=s,this.credentialManager=i,this.isWorking=!1,this.isLoggedInSubject=new E.X(!1)}login(e){var t;return(0,i.__awaiter)(this,void 0,void 0,(function*(){this.isWorking=!0;try{const s=this.messageBuilder.createLoginMessage(e),i=yield this.connect.send(s);if(!i||i.ERROR||(null===(t=i.DETAILS)||void 0===t?void 0:t.ERROR))throw new S.l(s,i);this.applyAuthResults({authToken:i.SESSION_AUTH_TOKEN,refreshToken:i.REFRESH_AUTH_TOKEN,profiles:i.PROFILE,username:i.USER_NAME,permissions:i.PERMISSION,sessionId:i.SESSION_ID}),this.session.setAuthResult(i),T.k.debug("Login Authentication Result:",i)}catch(e){if(T.k.error("Login Authentication Error:",e),!(e instanceof S.l&&e.isIgnorableError()))throw this.removeAuthResults(),e;T.k.warn("Ignoring authentication error as it is a known edge case.")}finally{this.isWorking=!1}return this.loggedUserResult}))}logout(){var e;return(0,i.__awaiter)(this,void 0,void 0,(function*(){this.isWorking=!0;let t={success:!1};try{const s=this.messageBuilder.createLogoutMessage(this.loggedUserResult);this.session.deleteUserFromSessionStorage(),this.connect.setValidSession(!1);const{CODE:i,DETAILS:r,ERROR:o,MESSAGE_TYPE:n,OIDC_LOGOUT_URL:a}=yield this.connect.send(s),c=null!==(e=null==r?void 0:r.ERROR)&&void 0!==e?e:o,d=n===u.Cs.LOGOUT_NACK;d&&T.k.warn("Unexpected Logout NACK received during logout.",c),t={success:n===u.Cs.LOGOUT_ACK||i===u.QT.SESSION_NOT_FOUND||d,error:c},a&&window.open(a,"_self")}catch(e){const s=new S.l(e.sentMessage,e.receivedMessage);if(T.k.error("Logout Authentication Error:",s),!s.isIgnorableError())throw e;T.k.warn("Ignoring authentication error as it is a known edge case."),t.success=!0}finally{this.removeAuthResults(),this.isWorking=!1}return t}))}reAuthFromSession(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(yield this.ensureConnection()){const e=this.messageBuilder.createRefreshTokenMessage(),t=yield this.connect.send(e);if((null==t?void 0:t.MESSAGE_TYPE)===u.N$.EVENT_LOGIN_AUTH_ACK)return this.session.setAuthResult(t),this.connect.setValidSession(!0),this.applyAuthResults(this.getLoggedUserFromMessage(t)),!0}return this.session.deleteUserFromSessionStorage(),this.connect.setValidSession(!1),!1}))}ensureConnection(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(this.connect.isConnected)return!0;const e=this.session.getSessionStorageItem("hostUrl");return!!e&&this.connect.connect(e)}))}getLoggedUserFromMessage(e){const t=e.USER_NAME,s=e.SESSION_AUTH_TOKEN,i=e.REFRESH_AUTH_TOKEN;return t&&s&&i?{username:t,authToken:s,refreshToken:i,profiles:e.PROFILE,permissions:e.PERMISSION,sessionId:e.SESSION_ID}:null}applyAuthResults(e){e?(this.loggedUserResult={authToken:e.authToken,refreshToken:e.refreshToken,profiles:e.profiles,username:e.username,permissions:e.permissions,sessionId:e.sessionId},this.currentUser=new U({permissions:e.permissions,profiles:e.profiles,username:e.username})):this.removeAuthResults()}removeAuthResults(){this.loggedUserResult=null,this.currentUser=null}};(0,i.__decorate)([r.observable],k.prototype,"isWorking",void 0),(0,i.__decorate)([r.observable],k.prototype,"currentUser",void 0),(0,i.__decorate)([r.observable],k.prototype,"loggedUserResult",void 0),(0,i.__decorate)([r.volatile],k.prototype,"isLoggedIn",null),k=(0,i.__decorate)([(0,i.__param)(0,_.z),(0,i.__param)(1,l.lj),(0,i.__param)(2,u.sW),(0,i.__param)(3,L)],k);const w=o.DI.createInterface((e=>e.singleton(k)));var P=s(66306);var y=s(5127),D=s(82940);const G={options:{criteria:"",isSnapshot:!1,maxRows:D.WJ.MAX_ROWS_250,maxView:D.WJ.MAX_VIEW_1000,pollingInterval:D.WJ.REQ_REP_POLLING_INTERVAL_MS,movingView:!1,orderBy:"",resourceName:"",reverse:!1},criteriaToFields:function(e){const t=e.split("&&").map((e=>e.trim())),s={};return t.forEach((e=>{const t=e.substr(0,e.indexOf("=")).trim().replace(/["']/g,""),i=e.substr(e.lastIndexOf("=")+1,e.length).trim().replace(/["']/g,"");s[t]=i})),s},dataServerResultFilter:y.$};let F=class{constructor(e,t,s=G){this.connect=e,this.auth=t,this.config=s,this.initialized=!1,this.readOnly=!0,this.originalFieldDef=[],this.requestFields=[],this.fieldMetadata=[],this.availableIndexes=[]}validResourceName(e){return!!e&&!!e.trim().length}init(e,t=!0){var s;return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(!this.validResourceName(null==e?void 0:e.resourceName))return!1;if(this.options=Object.assign(Object.assign({},this.config.options),e),t){T.k.debug(`Initializing ${this.options.resourceName} Datasource`);const t=yield this.connect.getMetadata(this.options.resourceName).catch((t=>T.k.error(`Metadata Fetch failed for ${e.resourceName}:`,t)));if(!t)return this.deinit(),!1;this.resourceType=t.TYPE,this.availableIndexes=null!==(s=t.INDEXES)&&void 0!==s?s:[],this.originalFieldDef=(0,P.C)(t),this.fieldMetadata=(0,P.i)(this.originalFieldDef),this.requestFields=t.REQUEST_FIELD||[],T.k.debug(`Datasource for ${this.options.resourceName} is ready`)}return this.options.isSnapshot||(this._stream=yield this.createStream()),this.initialized=!0,this.initialized}))}deinit(){this.initialized=!1,this.options=void 0,this.resourceType=void 0,this.availableIndexes=[],this.originalFieldDef=[],this.fieldMetadata=[],this.requestFields=[]}get stream(){return this._stream}get params(){const e={CRITERIA_MATCH:this.options.criteria,FIELDS:this.options.fields,MAX_ROWS:this.options.maxRows,MAX_VIEW:this.options.maxView,MOVING_VIEW:this.options.movingView,POLLING_INTERVAL:this.options.pollingInterval,REQUEST:this.options.request,REVERSE:this.options.reverse};if(this.options.orderBy)if(this.availableIndexes.findIndex((e=>e.NAME===this.options.orderBy))>-1)e.ORDER_BY=this.options.orderBy;else{const e=this.availableIndexes.map((e=>e.NAME));T.k.warn("Specified [orderBy] index is not valid and will not be used. See https://learn.genesis.global/docs/database/data-types/index-entities/ - Available indexes:",e)}return T.k.debug("Getting configured params:",e),e}snapshot(){var e;return(0,i.__awaiter)(this,void 0,void 0,(function*(){switch(T.k.debug(`Requesting snapshot for ${this.options.resourceName} (${this.resourceType}).`),this.resourceType){case D._g.DATASERVER:return this.connect.snapshot(this.options.resourceName,this.params);case D._g.REQUEST_SERVER:{const t=this.params,{REQUEST:s,CRITERIA_MATCH:r}=t,o={DETAILS:(0,i.__rest)(t,["REQUEST","CRITERIA_MATCH"]),REQUEST:Object.assign(Object.assign(Object.assign({},Object.fromEntries(this.requestFields.map((e=>[e.NAME,"*"])))),this.params.REQUEST),(null===(e=null==this?void 0:this.options)||void 0===e?void 0:e.criteria)?this.config.criteriaToFields(this.options.criteria):{})};return this.connect.request(this.options.resourceName,o)}default:throw new Error(`Snapshot not supported for selected resource type: ${this.resourceType}`)}}))}snapshotFiltered(e="ROW_REF"){return(0,i.__awaiter)(this,void 0,void 0,(function*(){const t=yield this.snapshot();return Array.isArray(t)?t:t.REPLY?t.REPLY:t.ROW?this.config.dataServerResultFilter(t,e).inserts:void 0}))}createStream(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){if(![D._g.DATASERVER,D._g.REQUEST_SERVER].includes(this.resourceType))throw new Error(`Streaming not supported for selected resource type: ${this.resourceType}`);return this.resourceType===D._g.DATASERVER?this.createDataserverStream():(T.k.debug(`Creating fake stream by polling ${this.options.resourceName} REQUEST_SERVER`),this.createReqRepStream())}))}createDataserverStream(){return(0,i.__awaiter)(this,void 0,void 0,(function*(){return this.connect.stream(this.options.resourceName,(e=>{}),(e=>T.k.error(e)),this.params)}))}createReqRepStream(){return(0,n.H)(0,this.params.POLLING_INTERVAL).pipe((0,d.w)((()=>(0,a.a)([this.connect.isConnected$,this.auth.isLoggedIn$]).pipe((0,h.o)((()=>this.connect.isConnected&&this.auth.isLoggedIn)),(0,d.w)((()=>(0,c.D)(this.snapshot())))))))}};(0,i.__decorate)([r.observable],F.prototype,"initialized",void 0),(0,i.__decorate)([r.observable],F.prototype,"readOnly",void 0),(0,i.__decorate)([r.volatile],F.prototype,"stream",null),F=(0,i.__decorate)([(0,i.__param)(0,l.lj),(0,i.__param)(1,w),(0,i.__param)(2,(0,o.optional)(D.tt))],F);const H=o.DI.createInterface((e=>e.transient(F)))},82940:(e,t,s)=>{s.d(t,{WJ:()=>o,_g:()=>i,tt:()=>n});var i,r=s(75951);!function(e){e.DATASERVER="DATASERVER",e.EVENT_HANDLER="EVENT_HANDLER",e.REQUEST_SERVER="REQUEST_SERVER"}(i||(i={}));class o{}o.MAX_ROWS_250=250,o.MAX_VIEW_1000=1e3,o.REQ_REP_POLLING_INTERVAL_MS=1e4;const n=r.DI.createInterface()},32449:(e,t,s)=>{function i(e,t=";"){return e?e.split(t).map((e=>e.trim())).sort(((e,t)=>e.localeCompare(t))).join(t):e}s.d(t,{p:()=>i})},83123:(e,t,s)=>{var i;s.d(t,{E:()=>r,r:()=>i}),function(e){e.STRING="STRING",e.NUMBER="NUMBER",e.BOOLEAN="BOOLEAN",e.ENUM="ENUM",e.DATE="DATE",e.DATETIME="DATETIME",e.CUSTOM="CUSTOM"}(i||(i={}));const r={STRING:i.STRING,ENUM:i.ENUM,BOOLEAN:i.BOOLEAN,INT:i.NUMBER,DOUBLE:i.NUMBER,BIGDECIMAL:i.NUMBER,DATE:i.DATE,DATETIME:i.DATETIME}},66306:(e,t,s)=>{s.d(t,{C:()=>a,i:()=>n});var i=s(82940),r=s(22296),o=s(83123);const n=e=>e?e.map((e=>{const t={name:e.NAME,type:o.E[e.TYPE]||o.r.STRING};if(e.TYPE===o.r.ENUM&&e.VALID_VALUES)try{t.enumOptions=Array.isArray(e.VALID_VALUES)?e.VALID_VALUES:e.VALID_VALUES.split("|")}catch(e){r.k.error(e),t.enumOptions=[]}return t})):null,a=e=>{const t=null==e?void 0:e.TYPE;if(t===i._g.DATASERVER)return e.FIELD||[];if(t===i._g.REQUEST_SERVER)return e.REPLY_FIELD||[];throw new Error(`Unsupported resource type: ${t}`)}},75527:(e,t,s)=>{s.d(t,{z:()=>o});var i=s(75951);class r{constructor(){this.storageKeyPrefix="",this.returnUrl=this.getSessionStorageItem("returnUrl")||""}deleteUserFromSessionStorage(){["authToken","refreshToken","sessionId","ssoToken"].forEach((e=>this.removeSessionStorageItem(e)))}setStorageKeyPrefix(e){this.storageKeyPrefix=`${e.replace(/\s/g,"")}/`}setAuthResult(e){this.setSessionStorageItem("authToken",e.SESSION_AUTH_TOKEN),this.setSessionStorageItem("refreshToken",e.REFRESH_AUTH_TOKEN),this.setSessionStorageItem("username",e.USER_NAME),this.setSessionStorageItem("sessionId",e.SESSION_ID)}captureReturnUrl(){const{pathname:e,search:t,hash:s}=location;if("/login"===e)return;const i=`${"/"!==e?e:""}`;this.returnUrl=`${i}${t}${s}`,this.setSessionStorageItem("returnUrl",this.returnUrl)}setItem(e,t,s){"local"===s?localStorage.setItem(this.storageKeyPrefix+e,t):sessionStorage.setItem(this.storageKeyPrefix+e,t)}getItem(e,t){return"local"===t?localStorage.getItem(this.storageKeyPrefix+e):sessionStorage.getItem(this.storageKeyPrefix+e)}removeItem(e,t){"local"===t?localStorage.removeItem(this.storageKeyPrefix+e):sessionStorage.removeItem(this.storageKeyPrefix+e)}setLocalStorageItem(e,t){this.setItem(e,t,"local")}setSessionStorageItem(e,t){this.setItem(e,t,"session")}getLocalStorageItem(e){return this.getItem(e,"local")}getSessionStorageItem(e){return this.getItem(e,"session")}removeLocalStorageItem(e){this.removeItem(e,"local")}removeSessionStorageItem(e){this.removeItem(e,"session")}}const o=i.DI.createInterface((e=>e.singleton(r)))},22296:(e,t,s)=>{s.d(t,{k:()=>r});var i=s(59557);const r=(0,i.createLogger)("foundation-comms")}}]);
|
|
2
2
|
//# sourceMappingURL=430.1b3fdba8b48e5e31c2807fa9d1d652c9.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[661],{58661:(e,a,r)=>{r.r(a),r.d(a,{ColorPalette:()=>Gn,ColorToken:()=>Vn,ColorTokens:()=>Jn,DesignSystemEditor:()=>Fn,DesignSystemExport:()=>Un,DesignSystemPreview:()=>rl,EventName:()=>wn,PreviewComponents:()=>jn,PreviewForm:()=>dl,PreviewGrid:()=>pl,TypographyTokens:()=>Xn,defaultBodyFont:()=>zn,fontFamilies:()=>xn});var t={};r.r(t),r.d(t,{accentFillActive:()=>p.accentFillActive,accentFillActiveDelta:()=>p.accentFillActiveDelta,accentFillFocus:()=>p.accentFillFocus,accentFillFocusDelta:()=>p.accentFillFocusDelta,accentFillHover:()=>p.accentFillHover,accentFillHoverDelta:()=>p.accentFillHoverDelta,accentFillRest:()=>p.accentFillRest,accentFillRestDelta:()=>p.accentFillRestDelta,accentForegroundActive:()=>p.accentForegroundActive,accentForegroundActiveDelta:()=>p.accentForegroundActiveDelta,accentForegroundFocus:()=>p.accentForegroundFocus,accentForegroundFocusDelta:()=>p.accentForegroundFocusDelta,accentForegroundHover:()=>p.accentForegroundHover,accentForegroundHoverDelta:()=>p.accentForegroundHoverDelta,accentForegroundRest:()=>p.accentForegroundRest,accentForegroundRestDelta:()=>p.accentForegroundRestDelta,accentPalette:()=>p.accentPalette,baseHeightMultiplier:()=>p.baseHeightMultiplier,baseLayerLuminance:()=>p.baseLayerLuminance,bodyFont:()=>p.bodyFont,controlCornerRadius:()=>p.controlCornerRadius,density:()=>p.density,designUnit:()=>p.designUnit,direction:()=>p.direction,disabledOpacity:()=>p.disabledOpacity,fillColor:()=>p.fillColor,focusStrokeInner:()=>p.focusStrokeInner,focusStrokeOuter:()=>p.focusStrokeOuter,focusStrokeWidth:()=>p.focusStrokeWidth,foregroundOnAccentActive:()=>p.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>p.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>p.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>p.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>p.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>p.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>p.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>p.foregroundOnAccentRestLarge,neutralFillActive:()=>p.neutralFillActive,neutralFillActiveDelta:()=>p.neutralFillActiveDelta,neutralFillFocus:()=>p.neutralFillFocus,neutralFillFocusDelta:()=>p.neutralFillFocusDelta,neutralFillHover:()=>p.neutralFillHover,neutralFillHoverDelta:()=>p.neutralFillHoverDelta,neutralFillInputActive:()=>p.neutralFillInputActive,neutralFillInputActiveDelta:()=>p.neutralFillInputActiveDelta,neutralFillInputFocus:()=>p.neutralFillInputFocus,neutralFillInputFocusDelta:()=>p.neutralFillInputFocusDelta,neutralFillInputHover:()=>p.neutralFillInputHover,neutralFillInputHoverDelta:()=>p.neutralFillInputHoverDelta,neutralFillInputRest:()=>p.neutralFillInputRest,neutralFillInputRestDelta:()=>p.neutralFillInputRestDelta,neutralFillLayerRest:()=>p.neutralFillLayerRest,neutralFillLayerRestDelta:()=>p.neutralFillLayerRestDelta,neutralFillRest:()=>p.neutralFillRest,neutralFillRestDelta:()=>p.neutralFillRestDelta,neutralFillStealthActive:()=>p.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>p.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>p.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>p.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>p.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>p.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>p.neutralFillStealthRest,neutralFillStealthRestDelta:()=>p.neutralFillStealthRestDelta,neutralFillStrongActive:()=>p.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>p.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>p.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>p.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>p.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>p.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>p.neutralFillStrongRest,neutralFillStrongRestDelta:()=>p.neutralFillStrongRestDelta,neutralForegroundHint:()=>p.neutralForegroundHint,neutralForegroundRest:()=>p.neutralForegroundRest,neutralLayer1:()=>p.neutralLayer1,neutralLayer2:()=>p.neutralLayer2,neutralLayer3:()=>p.neutralLayer3,neutralLayer4:()=>p.neutralLayer4,neutralLayerCardContainer:()=>p.neutralLayerCardContainer,neutralLayerFloating:()=>p.neutralLayerFloating,neutralPalette:()=>p.neutralPalette,neutralStrokeActive:()=>p.neutralStrokeActive,neutralStrokeActiveDelta:()=>p.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>p.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>p.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>p.neutralStrokeFocus,neutralStrokeFocusDelta:()=>p.neutralStrokeFocusDelta,neutralStrokeHover:()=>p.neutralStrokeHover,neutralStrokeHoverDelta:()=>p.neutralStrokeHoverDelta,neutralStrokeRest:()=>p.neutralStrokeRest,neutralStrokeRestDelta:()=>p.neutralStrokeRestDelta,strokeWidth:()=>p.strokeWidth,typeRampBaseFontSize:()=>p.typeRampBaseFontSize,typeRampBaseLineHeight:()=>p.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>p.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>p.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>p.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>p.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>p.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>p.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>p.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>p.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>p.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>p.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>p.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>p.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>p.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>p.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>p.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>p.typeRampPlus6LineHeight});var o={};r.r(o),r.d(o,{accentPaletteValue:()=>se,baseLayerLuminanceValue:()=>pe,bodyFontValue:()=>xe,controlCornerRadiusValue:()=>me,densityValue:()=>ve,designTokens:()=>Se,designUnitValue:()=>be,directionValue:()=>ue,neutralPaletteValue:()=>ce,strokeWidthValue:()=>he,typeRampBaseFontSizeValue:()=>ze,typeRampBaseLineHeightValue:()=>ke});var i=r(
|
|
1
|
+
"use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[661],{58661:(e,a,r)=>{r.r(a),r.d(a,{ColorPalette:()=>Gn,ColorToken:()=>Vn,ColorTokens:()=>Jn,DesignSystemEditor:()=>Fn,DesignSystemExport:()=>Un,DesignSystemPreview:()=>rl,EventName:()=>wn,PreviewComponents:()=>jn,PreviewForm:()=>dl,PreviewGrid:()=>pl,TypographyTokens:()=>Xn,defaultBodyFont:()=>zn,fontFamilies:()=>xn});var t={};r.r(t),r.d(t,{accentFillActive:()=>p.accentFillActive,accentFillActiveDelta:()=>p.accentFillActiveDelta,accentFillFocus:()=>p.accentFillFocus,accentFillFocusDelta:()=>p.accentFillFocusDelta,accentFillHover:()=>p.accentFillHover,accentFillHoverDelta:()=>p.accentFillHoverDelta,accentFillRest:()=>p.accentFillRest,accentFillRestDelta:()=>p.accentFillRestDelta,accentForegroundActive:()=>p.accentForegroundActive,accentForegroundActiveDelta:()=>p.accentForegroundActiveDelta,accentForegroundFocus:()=>p.accentForegroundFocus,accentForegroundFocusDelta:()=>p.accentForegroundFocusDelta,accentForegroundHover:()=>p.accentForegroundHover,accentForegroundHoverDelta:()=>p.accentForegroundHoverDelta,accentForegroundRest:()=>p.accentForegroundRest,accentForegroundRestDelta:()=>p.accentForegroundRestDelta,accentPalette:()=>p.accentPalette,baseHeightMultiplier:()=>p.baseHeightMultiplier,baseLayerLuminance:()=>p.baseLayerLuminance,bodyFont:()=>p.bodyFont,controlCornerRadius:()=>p.controlCornerRadius,density:()=>p.density,designUnit:()=>p.designUnit,direction:()=>p.direction,disabledOpacity:()=>p.disabledOpacity,fillColor:()=>p.fillColor,focusStrokeInner:()=>p.focusStrokeInner,focusStrokeOuter:()=>p.focusStrokeOuter,focusStrokeWidth:()=>p.focusStrokeWidth,foregroundOnAccentActive:()=>p.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>p.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>p.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>p.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>p.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>p.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>p.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>p.foregroundOnAccentRestLarge,neutralFillActive:()=>p.neutralFillActive,neutralFillActiveDelta:()=>p.neutralFillActiveDelta,neutralFillFocus:()=>p.neutralFillFocus,neutralFillFocusDelta:()=>p.neutralFillFocusDelta,neutralFillHover:()=>p.neutralFillHover,neutralFillHoverDelta:()=>p.neutralFillHoverDelta,neutralFillInputActive:()=>p.neutralFillInputActive,neutralFillInputActiveDelta:()=>p.neutralFillInputActiveDelta,neutralFillInputFocus:()=>p.neutralFillInputFocus,neutralFillInputFocusDelta:()=>p.neutralFillInputFocusDelta,neutralFillInputHover:()=>p.neutralFillInputHover,neutralFillInputHoverDelta:()=>p.neutralFillInputHoverDelta,neutralFillInputRest:()=>p.neutralFillInputRest,neutralFillInputRestDelta:()=>p.neutralFillInputRestDelta,neutralFillLayerRest:()=>p.neutralFillLayerRest,neutralFillLayerRestDelta:()=>p.neutralFillLayerRestDelta,neutralFillRest:()=>p.neutralFillRest,neutralFillRestDelta:()=>p.neutralFillRestDelta,neutralFillStealthActive:()=>p.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>p.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>p.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>p.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>p.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>p.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>p.neutralFillStealthRest,neutralFillStealthRestDelta:()=>p.neutralFillStealthRestDelta,neutralFillStrongActive:()=>p.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>p.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>p.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>p.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>p.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>p.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>p.neutralFillStrongRest,neutralFillStrongRestDelta:()=>p.neutralFillStrongRestDelta,neutralForegroundHint:()=>p.neutralForegroundHint,neutralForegroundRest:()=>p.neutralForegroundRest,neutralLayer1:()=>p.neutralLayer1,neutralLayer2:()=>p.neutralLayer2,neutralLayer3:()=>p.neutralLayer3,neutralLayer4:()=>p.neutralLayer4,neutralLayerCardContainer:()=>p.neutralLayerCardContainer,neutralLayerFloating:()=>p.neutralLayerFloating,neutralPalette:()=>p.neutralPalette,neutralStrokeActive:()=>p.neutralStrokeActive,neutralStrokeActiveDelta:()=>p.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>p.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>p.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>p.neutralStrokeFocus,neutralStrokeFocusDelta:()=>p.neutralStrokeFocusDelta,neutralStrokeHover:()=>p.neutralStrokeHover,neutralStrokeHoverDelta:()=>p.neutralStrokeHoverDelta,neutralStrokeRest:()=>p.neutralStrokeRest,neutralStrokeRestDelta:()=>p.neutralStrokeRestDelta,strokeWidth:()=>p.strokeWidth,typeRampBaseFontSize:()=>p.typeRampBaseFontSize,typeRampBaseLineHeight:()=>p.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>p.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>p.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>p.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>p.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>p.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>p.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>p.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>p.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>p.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>p.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>p.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>p.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>p.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>p.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>p.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>p.typeRampPlus6LineHeight});var o={};r.r(o),r.d(o,{accentPaletteValue:()=>se,baseLayerLuminanceValue:()=>pe,bodyFontValue:()=>xe,controlCornerRadiusValue:()=>me,densityValue:()=>ve,designTokens:()=>Se,designUnitValue:()=>be,directionValue:()=>ue,neutralPaletteValue:()=>ce,strokeWidthValue:()=>he,typeRampBaseFontSizeValue:()=>ze,typeRampBaseLineHeightValue:()=>ke});var i=r(65280),n=r(92592),l=r(62646),g=r(59557),d=r(60724),s=r(83147),c=r(75951),p=r(13896),u=r(67973);const h=s.css`
|
|
2
2
|
:host {
|
|
3
3
|
border: calc(${p.strokeWidth} * 1px) solid transparent;
|
|
4
4
|
margin: 0;
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
</control-wrapper>
|
|
231
231
|
</template>
|
|
232
232
|
`)(e.prefix)}
|
|
233
|
-
`,tester:(0,d.yMz)(3,O),mapper:d.xq9};var $=r(
|
|
233
|
+
`,tester:(0,d.yMz)(3,O),mapper:d.xq9};var $=r(29445);const R=e=>a=>{if(!a||!(0,d.DRl)(a))return!1;const r=a.options;return!(!r||!r[e])},j=(0,d.xDy)(R("allOptionsResourceName"),(0,d.or)((0,d.wcO)((e=>(0,d.ndu)(e,"array"))),(0,d.wcO)((e=>e.hasOwnProperty("oneOf")&&e.oneOf.some((e=>(0,d.ndu)(e,"array")))))));$.MultiselectDatasource;const I={renderer:s.html`
|
|
234
234
|
${e=>((e="zero")=>s.html`
|
|
235
235
|
<template>
|
|
236
236
|
<control-wrapper
|
|
@@ -11718,4 +11718,4 @@
|
|
|
11718
11718
|
</template>
|
|
11719
11719
|
`;var a}}
|
|
11720
11720
|
`;let pl=class extends s.FASTElement{constructor(){super(...arguments),this.prefix="zero",this.rowData=[{make:"Toyota",model:"Celica",price:35e3,creationDate:1617624494293,isCool:!0},{make:"Ford",model:"Mondeo",price:32e3,creationDate:1617624494295,isCool:!1},{make:"Porsche",model:"Boxter",price:72e3,creationDate:1619637452397,isCool:!1},{make:"Audi",model:"A6",price:8e4,creationDate:1617624494293,isCool:!0},{make:"Renault",model:"Clio",price:2e4,creationDate:1617624494295,isCool:!0},{make:"Chevrolet",model:"Camaro",price:4e4,creationDate:1619637452397,isCool:!1},{make:"BMW",model:"Z8",price:9e4,creationDate:1617624494293,isCool:!1},{make:"Suzuki",model:"Jimny",price:23e3,creationDate:1617624494295,isCool:!1},{make:"Toyota",model:"Celica",price:35e3,creationDate:1619637452397,isCool:!0},{make:"Ford",model:"Mondeo",price:32e3,creationDate:1617624494293,isCool:!1},{make:"Porsche",model:"Boxter",price:72e3,creationDate:1617624494295,isCool:!0},{make:"Audi",model:"A6",price:8e4,creationDate:1619637452397,isCool:!1},{make:"Renault",model:"Clio",price:2e4,creationDate:1617624494293,isCool:!1},{make:"Chevrolet",model:"Camaro",price:4e4,creationDate:1617624494295,isCool:!0},{make:"BMW",model:"Z8",price:9e4,creationDate:1619637452397,isCool:!0},{make:"Suzuki",model:"Jimny",price:23e3,creationDate:1617624494293,isCool:!0}],this.columnDefs=[{field:"make"},{field:"model"},{field:"price"},{field:"creationDate"},{field:"isCool"}],this.gridOptions={defaultColDef:{resizable:!0,filter:!0},debug:!1,columnDefs:this.columnDefs,rowData:this.rowData}}setGridOptions(){this.grid.gridOptions=this.gridOptions}connectedCallback(){super.connectedCallback(),document.body.addEventListener(wn.STYLES_CHANGED,(e=>{this.handleStyleChanges(e)})),document.body.addEventListener(wn.DS_CHANGED,(e=>{this.handleDSChanges(e)})),s.DOM.queueUpdate((()=>{this.setGridOptions(),p.bodyFont.withDefault(zn)}))}handleStyleChanges(e){const a=e.detail;a&&s.DOM.queueUpdate((()=>{Nn(a,this.provider)}))}handleDSChanges(e){this.prefix=e.detail.prefix,s.DOM.queueUpdate((()=>{this.setGridOptions()}))}};(0,yn.__decorate)([s.observable],pl.prototype,"grid",void 0),(0,yn.__decorate)([s.attr],pl.prototype,"prefix",void 0),(0,yn.__decorate)([s.observable],pl.prototype,"provider",void 0),(0,yn.__decorate)([s.observable],pl.prototype,"rowData",void 0),(0,yn.__decorate)([s.observable],pl.prototype,"columnDefs",void 0),(0,yn.__decorate)([s.observable],pl.prototype,"gridOptions",void 0),pl=(0,yn.__decorate)([(0,s.customElement)({name:"preview-grid",template:cl,styles:sl})],pl),((e,a="zero")=>{e&&(0,$.provideTokens)(t,o,e);const r=c.DesignSystem.getOrCreate(e).withPrefix(a);return(0,$.createDesignSystemProxy)(r)})().register(Do,bn),(0,i.provideDesignSystem)().register(i.baseComponents,fn)}}]);
|
|
11721
|
-
//# sourceMappingURL=661.
|
|
11721
|
+
//# sourceMappingURL=661.955b15ff5536a44d8697ecee9a7fd06d.js.map
|