@genesislcap/design-system-configurator 15.50.0 → 15.50.2
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/{100.100.d8a47e882fab4690e300.js → 277.277.e288b540d1e49d10a65d.js} +2 -2
- package/dist/277.a04c275664fe25f4a3a45fc9a9564613.js.map +1 -0
- package/dist/470.039ab766f5f6987015ac5ef16ed15f32.js.map +1 -0
- package/dist/{470.470.c742e59a2763d4c8936b.js → 470.470.971d1e011d9b19aeb8a3.js} +55 -55
- package/dist/947.2f75b6c4569cc61b6b2158c23e7e7c1e.js.map +1 -0
- package/dist/{947.947.b4ab82764c6c7aec6d67.js → 947.947.782f7b14cc8f9cef9595.js} +38 -38
- package/dist/966.5c5e6b2015b369f801658cc91153a3e8.js.map +1 -0
- package/dist/{966.966.c2009200a7eb6783653d.js → 966.966.2a5f383c83b3651c55cf.js} +368 -368
- package/dist/{designSystemConfigurator.f34396f016eeb5602ad0071336afe935.js.map → designSystemConfigurator.79becf745897eaaf2d396e557aefda95.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/{main.9163e96e4131b17cad87580b4661fe99.js.map → main.c53dbbe622fddf0cbabee3ceb3ead662.js.map} +1 -1
- package/dist/{main.9eff85b509e4e3242ec2.js → main.e3383572aa2b7053f895.js} +2 -2
- package/dist/remoteEntry.js +2 -2
- package/package.json +11 -11
- package/dist/100.bf63c3f6087a5374ff7e41a03ae914f7.js.map +0 -1
- package/dist/470.57cd512241563c5735da75cc1e6677a8.js.map +0 -1
- package/dist/947.8ab58ff587c80d1eee1e568032c17765.js.map +0 -1
- package/dist/966.95b00070047dd82fc3890c45595aa2cf.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[966],{8420(e,t,i){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e),o={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}};return i.default.locale(o,null,!0),o}(i(94343))},58915(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,n=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,a={},r=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),i=60*t[1]+(+t[2]||0);return 0===i?0:"+"===t[0]?-i:i}(e)}],c=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var i,o=a.meridiem;if(o){for(var n=1;n<=24;n+=1)if(e.indexOf(o(n,0,t))>-1){i=n>12;break}}else i=e===(t?"pm":"PM");return i},h={A:[s,function(e){this.afternoon=u(e,!1)}],a:[s,function(e){this.afternoon=u(e,!0)}],Q:[i,function(e){this.month=3*(e-1)+1}],S:[i,function(e){this.milliseconds=100*+e}],SS:[o,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[n,l("seconds")],ss:[n,l("seconds")],m:[n,l("minutes")],mm:[n,l("minutes")],H:[n,l("hours")],h:[n,l("hours")],HH:[n,l("hours")],hh:[n,l("hours")],D:[n,l("day")],DD:[o,l("day")],Do:[s,function(e){var t=a.ordinal,i=e.match(/\d+/);if(this.day=i[0],t)for(var o=1;o<=31;o+=1)t(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],w:[n,l("week")],ww:[o,l("week")],M:[n,l("month")],MM:[o,l("month")],MMM:[s,function(e){var t=c("months"),i=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(i<1)throw new Error;this.month=i%12||i}],MMMM:[s,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[o,function(e){this.year=r(e)}],YYYY:[/\d{4}/,l("year")],Z:d,ZZ:d};function p(i){var o,n;o=i,n=a&&a.formats;for(var s=(i=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,i,o){var s=o&&o.toUpperCase();return i||n[o]||e[o]||n[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})).match(t),r=s.length,l=0;l<r;l+=1){var d=s[l],c=h[d],u=c&&c[0],p=c&&c[1];s[l]=p?{regex:u,parser:p}:d.replace(/^\[|\]$/g,"")}return function(e){for(var t={},i=0,o=0;i<r;i+=1){var n=s[i];if("string"==typeof n)o+=n.length;else{var a=n.regex,l=n.parser,d=e.slice(o),c=a.exec(d)[0];l.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var i=e.hours;t?i<12&&(e.hours+=12):12===i&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,i){i.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(r=e.parseTwoDigitYear);var o=t.prototype,n=o.parse;o.parse=function(e){var t=e.date,o=e.utc,s=e.args;this.$u=o;var r=s[1];if("string"==typeof r){var l=!0===s[2],d=!0===s[3],c=l||d,u=s[2];d&&(u=s[2]),a=this.$locale(),!l&&u&&(a=i.Ls[u]),this.$d=function(e,t,i,o){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var n=p(t)(e),s=n.year,a=n.month,r=n.day,l=n.hours,d=n.minutes,c=n.seconds,u=n.milliseconds,h=n.zone,m=n.week,g=new Date,v=r||(s||a?1:g.getDate()),f=s||g.getFullYear(),b=0;s&&!a||(b=a>0?a-1:g.getMonth());var y,w=l||0,C=d||0,x=c||0,$=u||0;return h?new Date(Date.UTC(f,b,v,w,C,x,$+60*h.offset*1e3)):i?new Date(Date.UTC(f,b,v,w,C,x,$)):(y=new Date(f,b,v,w,C,x,$),m&&(y=o(y).week(m).toDate()),y)}catch(e){return new Date("")}}(t,r,o,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),c&&t!=this.format(r)&&(this.$d=new Date("")),a={}}else if(r instanceof Array)for(var h=r.length,m=1;m<=h;m+=1){s[1]=r[m-1];var g=i.apply(this,s);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}m===h&&(this.$d=new Date(""))}else n.call(this,e)}}}()},33839(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}}}()},7554(e){e.exports=function(){"use strict";return function(e,t,i){var o=t.prototype,n=function(e){return e&&(e.indexOf?e:e.s)},s=function(e,t,i,o,s){var a=e.name?e:e.$locale(),r=n(a[t]),l=n(a[i]),d=r||l.map(function(e){return e.slice(0,o)});if(!s)return d;var c=a.weekStart;return d.map(function(e,t){return d[(t+(c||0))%7]})},a=function(){return i.Ls[i.locale()]},r=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})}(e.formats[t.toUpperCase()])},l=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):s(e,"months")},monthsShort:function(t){return t?t.format("MMM"):s(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):s(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):s(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):s(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return r(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return l.bind(this)()},i.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(t){return r(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},i.months=function(){return s(a(),"months")},i.monthsShort=function(){return s(a(),"monthsShort","months",3)},i.weekdays=function(e){return s(a(),"weekdays",null,null,e)},i.weekdaysShort=function(e){return s(a(),"weekdaysShort","weekdays",3,e)},i.weekdaysMin=function(e){return s(a(),"weekdaysMin","weekdays",2,e)}}}()},49916(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,i,o){var n=i.prototype,s=n.format;o.en.formats=e,n.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var i=this.$locale().formats,o=function(t,i){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,o,n){var s=n&&n.toUpperCase();return o||i[n]||e[n]||i[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})}(t,void 0===i?{}:i);return s.call(this,o)}}}()},57565(e){e.exports=a,a.default=a,a.stable=c,a.stableStringify=c;var t="[...]",i="[Circular]",o=[],n=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,t,i,a){var r;void 0===a&&(a=s()),l(e,"",0,[],void 0,0,a);try{r=0===n.length?JSON.stringify(e,t,i):JSON.stringify(e,h(t),i)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var d=o.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return r}function r(e,t,i,s){var a=Object.getOwnPropertyDescriptor(s,i);void 0!==a.get?a.configurable?(Object.defineProperty(s,i,{value:e}),o.push([s,i,t,a])):n.push([t,i,e]):(s[i]=e,o.push([s,i,t]))}function l(e,o,n,s,a,d,c){var u;if(d+=1,"object"==typeof e&&null!==e){for(u=0;u<s.length;u++)if(s[u]===e)return void r(i,e,o,a);if(void 0!==c.depthLimit&&d>c.depthLimit)return void r(t,e,o,a);if(void 0!==c.edgesLimit&&n+1>c.edgesLimit)return void r(t,e,o,a);if(s.push(e),Array.isArray(e))for(u=0;u<e.length;u++)l(e[u],u,u,s,e,d,c);else{var h=Object.keys(e);for(u=0;u<h.length;u++){var p=h[u];l(e[p],p,u,s,e,d,c)}}s.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function c(e,t,i,a){void 0===a&&(a=s());var r,l=u(e,"",0,[],void 0,0,a)||e;try{r=0===n.length?JSON.stringify(l,t,i):JSON.stringify(l,h(t),i)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var d=o.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return r}function u(e,n,s,a,l,c,h){var p;if(c+=1,"object"==typeof e&&null!==e){for(p=0;p<a.length;p++)if(a[p]===e)return void r(i,e,n,l);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==h.depthLimit&&c>h.depthLimit)return void r(t,e,n,l);if(void 0!==h.edgesLimit&&s+1>h.edgesLimit)return void r(t,e,n,l);if(a.push(e),Array.isArray(e))for(p=0;p<e.length;p++)u(e[p],p,p,a,e,c,h);else{var m={},g=Object.keys(e).sort(d);for(p=0;p<g.length;p++){var v=g[p];u(e[v],v,p,a,e,c,h),m[v]=e[v]}if(void 0===l)return m;o.push([l,n,e]),l[n]=m}a.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,i){if(n.length>0)for(var o=0;o<n.length;o++){var s=n[o];if(s[1]===t&&s[0]===i){i=s[2],n.splice(o,1);break}}return e.call(this,t,i)}}},93678(e){"use strict";function t(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){if((e=e||{}).circles)return function(e){const i=[],o=[],n=new Map;if(n.set(Date,e=>new Date(e)),n.set(Map,(e,t)=>new Map(a(Array.from(e),t))),n.set(Set,(e,t)=>new Set(a(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)n.set(t[0],t[1]);let s=null;return e.proto?l:r;function a(e,a){const r=Object.keys(e),l=new Array(r.length);for(let d=0;d<r.length;d++){const c=r[d],u=e[c];if("object"!=typeof u||null===u)l[c]=u;else if(u.constructor!==Object&&(s=n.get(u.constructor)))l[c]=s(u,a);else if(ArrayBuffer.isView(u))l[c]=t(u);else{const e=i.indexOf(u);l[c]=-1!==e?o[e]:a(u)}}return l}function r(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,r);if(e.constructor!==Object&&(s=n.get(e.constructor)))return s(e,r);const l={};i.push(e),o.push(l);for(const a in e){if(!1===Object.hasOwnProperty.call(e,a))continue;const d=e[a];if("object"!=typeof d||null===d)l[a]=d;else if(d.constructor!==Object&&(s=n.get(d.constructor)))l[a]=s(d,r);else if(ArrayBuffer.isView(d))l[a]=t(d);else{const e=i.indexOf(d);l[a]=-1!==e?o[e]:r(d)}}return i.pop(),o.pop(),l}function l(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,l);if(e.constructor!==Object&&(s=n.get(e.constructor)))return s(e,l);const r={};i.push(e),o.push(r);for(const a in e){const d=e[a];if("object"!=typeof d||null===d)r[a]=d;else if(d.constructor!==Object&&(s=n.get(d.constructor)))r[a]=s(d,l);else if(ArrayBuffer.isView(d))r[a]=t(d);else{const e=i.indexOf(d);r[a]=-1!==e?o[e]:l(d)}}return i.pop(),o.pop(),r}}(e);const i=new Map;if(i.set(Date,e=>new Date(e)),i.set(Map,(e,t)=>new Map(n(Array.from(e),t))),i.set(Set,(e,t)=>new Set(n(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)i.set(t[0],t[1]);let o=null;return e.proto?function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(o=i.get(s.constructor)))return o(s,e);const a={};for(const n in s){const r=s[n];"object"!=typeof r||null===r?a[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?a[n]=o(r,e):ArrayBuffer.isView(r)?a[n]=t(r):a[n]=e(r)}return a}:function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(o=i.get(s.constructor)))return o(s,e);const a={};for(const n in s){if(!1===Object.hasOwnProperty.call(s,n))continue;const r=s[n];"object"!=typeof r||null===r?a[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?a[n]=o(r,e):ArrayBuffer.isView(r)?a[n]=t(r):a[n]=e(r)}return a};function n(e,n){const s=Object.keys(e),a=new Array(s.length);for(let r=0;r<s.length;r++){const l=s[r],d=e[l];"object"!=typeof d||null===d?a[l]=d:d.constructor!==Object&&(o=i.get(d.constructor))?a[l]=o(d,n):ArrayBuffer.isView(d)?a[l]=t(d):a[l]=n(d)}return a}}},31274(e,t,i){"use strict";i.d(t,{u:()=>n});var o=i(60416);const n=(e,t,i)=>{(0,o.u_)(e);const n=t.split("-")[0],s=document.createElement(`${n}-dialog`),a=i?(e=>{let t=e.querySelector("#dialog-container");return t||(t=document.createElement("div"),t.setAttribute("id","dialog-container"),t.style.position="relative",e.appendChild(t)),t})(i):(0,o.jE)("dialog-container",t);a.appendChild(s),s.notification=e,s.show()}},60416(e,t,i){"use strict";i.d(t,{cL:()=>h,jE:()=>u,uP:()=>d,u_:()=>c});var o=i(66506),n=i(52945),s=i(68424);const a=(0,o.createLogger)("foundation-notifications");let r=null;const l=new Map,d=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.body)&&void 0!==i?i:"Something went wrong"}`},c=e=>{var t,i;a.log({message:d(e),level:(t=e,(null==t?void 0:t.logLevel)||(null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.logLevel)||o.LogLevels.debug)})},u=(e,t)=>{let i=document.querySelector(`#${e}`);if(!i)if(l.has(e))i=l.get(e);else{const t=(0,n.fI)(document).find(t=>t.id===e);t&&(i=t,l.set(e,t))}if(!i){i=document.createElement("div"),i.setAttribute("id",e),i.style.zIndex="9999";const{element:t,prefix:o}=(0,s.DW)(document.body,"rapid");if(t)t.appendChild(i),r=t;else if(r)r.appendChild(i);else{const e=document.createElement(`${o}-design-system-provider`);e.appendChild(i),document.body.appendChild(e),r=e}}return i},h=e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return p()},p=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e}},78966(e,t,i){"use strict";i.r(t),i.d(t,{Accordion:()=>u,AccordionItem:()=>f,ActionsMenu:()=>R,AffixMixin:()=>wl,AiCriteriaSearch:()=>$e,AiIndicator:()=>De,Anchor:()=>Le,AnchoredRegion:()=>Pe,Avatar:()=>Ye,BASE_EDITABLE_ELEMENT_SELECTORS:()=>Lf,Badge:()=>Qe,Banner:()=>lt,BaseDatasource:()=>gi,BaseFileComponent:()=>Hs,Breadcrumb:()=>ht,BreadcrumbItem:()=>bt,Button:()=>St,COMBO_INPUT_MIN_LENGTH:()=>Du,CRON_LENGTH:()=>Ec,CSSVarsTokenMapper:()=>Qm,Calendar:()=>It,Card:()=>Mt,CategorizedMultiselect:()=>Wt,Checkbox:()=>Jt,Combobox:()=>$i,ConnectionIndicator:()=>Ii,CronBuilderEvents:()=>Rc,DATETIME_OPERATORS:()=>ee,DATE_OPERATORS:()=>Z,DATE_PICKER_VALUE_FORMAT:()=>fo,DEFUALT_FILTER_BAR_COLUMNS:()=>Sa,DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS:()=>Nf,DataGrid:()=>Fi,DataGridCell:()=>Pi,DataGridDatasource:()=>Zm,DataGridRow:()=>Gi,DateOrDay:()=>yc,DatePicker:()=>So,DefaultRouter:()=>nf,DesignTokensObservable:()=>Ko,Dialog:()=>An,DialogElement:()=>Rn,Disclosure:()=>Mn,Divider:()=>Bn,DropdownMenu:()=>Jn,EnvironmentIndicator:()=>us,ErrorBanner:()=>vs,ErrorBoundary:()=>Is,ErrorBoundaryEvent:()=>bs,ErrorDialog:()=>Ms,ExpressionBuilderConfig:()=>s,ExpressionBuilderCore:()=>fv,FaPrefixFromStyle:()=>Or,FileReader:()=>Vs,FileUpload:()=>oa,Filter:()=>va,FilterBar:()=>Ea,FilterEvents:()=>ga,FlexLayout:()=>La,FlexMediaQueriesEnum:()=>Ta,Flipper:()=>_a,Flyout:()=>ja,FoundationDesignSystemProvider:()=>Cn,FoundationExpressionBuilder:()=>iv,FoundationRouteCollection:()=>bf,FoundationRouteNav:()=>mf,FoundationRouter:()=>xf,FoundationRouterConfiguration:()=>yf,FoundationRuleExpressionBuilder:()=>Lv,FoundationValueExpressionBuilder:()=>Pv,GenerateNavigationPathEventType:()=>Cf,GridLayout:()=>ir,GridLayoutItem:()=>rr,GridMediaQueriesEnum:()=>Ka,HorizontalScroll:()=>ur,INPUT_MIN_LENGTH:()=>ku,Icon:()=>Dr,Listbox:()=>Lr,ListboxOption:()=>Pr,MAX_DAYS:()=>Sc,MAX_HOURS:()=>Tc,MAX_MINS_SEC:()=>kc,MAX_MINUTE_RECURRENCE:()=>Ic,MAX_MONTHS:()=>$c,MAX_WEEK_DAYS:()=>Oc,MAX_WEEK_NUMBER:()=>Dc,Menu:()=>jr,MenuItem:()=>Jr,Modal:()=>sl,Multiselect:()=>ml,MultiselectDatasource:()=>dl,NUMERIC_OPERATORS:()=>Q,NavigateToEventType:()=>wf,NotificationListener:()=>Bv,NumberField:()=>Vl,OPERATOR_DISPLAY_LABEL:()=>te,Optgroup:()=>Kl,OptionsDatasource:()=>bi,Pill:()=>_d,Popper:()=>Ud,Position:()=>zt,Progress:()=>bd,ProgressRing:()=>Wd,Radio:()=>Zd,RadioGroup:()=>sc,RecurrenceType:()=>fc,Router:()=>of,RuleExpression:()=>bv,SCROLL_TIMEOUT:()=>Tu,SECTION_NAVIGATOR_EVENTS:()=>Yu,SNACKBAR_CLOSE_TIMEOUT:()=>Ph,SNACKBAR_EVENTS_NAMES:()=>zh,SNACKBAR_TYPES:()=>Hh,SNACKBAR_TYPE_DEFAULT:()=>_h,STRING_OPERATORS:()=>J,Scheduler:()=>hc,SchedulerCronBuilder:()=>uu,SchedulerTimezone:()=>bu,SearchBar:()=>Ru,SearchBarCombobox:()=>Hu,SectionNavigator:()=>Ku,SegmentedControl:()=>th,SegmentedItem:()=>rh,Select:()=>ph,Skeleton:()=>yh,Slider:()=>Th,SliderLabel:()=>Lh,Snackbar:()=>jh,StackingIcons:()=>Kh,StatusPill:()=>ep,Stepper:()=>kf,StepperTab:()=>rp,StepperTabPanel:()=>hp,Switch:()=>bp,SystemHealthOverlay:()=>Od,Tab:()=>Dp,TabPanel:()=>Np,Tabs:()=>Up,TextArea:()=>Wp,TextField:()=>tm,Toast:()=>cm,Toolbar:()=>mm,Tooltip:()=>wm,TreeItem:()=>Om,TreeView:()=>Am,UrlInput:()=>Um,VerificationCodeInput:()=>Km,WeekType:()=>bc,accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,accentPaletteValue:()=>cn,actionsMenuBaseStyles:()=>$,alertFlashDurationProperty:()=>$p,alertFlashPhaseProperty:()=>xp,applyCustomTokens:()=>tn,baseComponents:()=>Jm,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>hn,black:()=>ko,bodyFont:()=>r.bodyFont,buildEditableElementSelector:()=>Mf,categorizedMultiselectStyles:()=>Bt,categorizedMultiselectTemplate:()=>Gt,clientOperators:()=>wv,closeIcon:()=>la,configureDesignSystem:()=>dn,configureEnvironmentIndicator:()=>ds,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>mn,createDesignSystemProxy:()=>xd,createFormData:()=>Xs,crossIcon:()=>$u,daysOfWeek:()=>wc,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>Ee,defaultAnchorConfig:()=>Ne,defaultAnchoredRegionConfig:()=>Ue,defaultAvatarConfig:()=>qe,defaultBadgeConfig:()=>et,defaultBreadcrumbConfig:()=>mt,defaultBreadcrumbItemConfig:()=>wt,defaultButtonConfig:()=>Ot,defaultCalendarConfig:()=>At,defaultCardConfig:()=>Ht,defaultCategorizedMultiselectConfig:()=>Yt,defaultCheckboxConfig:()=>Zt,defaultComboboxConfig:()=>Ei,defaultConfig:()=>mc,defaultCronBuilderConfig:()=>pu,defaultDataGridCellConfig:()=>Ui,defaultDataGridConfig:()=>Mi,defaultDataGridRowConfig:()=>Yi,defaultDatePickerConfig:()=>$o,defaultDialogConfig:()=>In,defaultDisclosureConfig:()=>Hn,defaultDividerConfig:()=>Gn,defaultFileUploadConfig:()=>sa,defaultFillColor:()=>Io,defaultFlexLayoutConfig:()=>Aa,defaultFlipperConfig:()=>Pa,defaultFlyoutConfig:()=>Wa,defaultGridLayoutConfig:()=>er,defaultGridLayoutItemConfig:()=>ar,defaultHorizontalScrollConfig:()=>pr,defaultIconConfig:()=>Er,defaultListboxConfig:()=>Nr,defaultListboxOptionConfig:()=>Ur,defaultMenuConfig:()=>Wr,defaultMenuItemConfig:()=>Zr,defaultModalConfig:()=>nl,defaultMultiselectConfig:()=>pl,defaultNavItemPredicate:()=>gf,defaultNeutralForegroundContrast:()=>Vo,defaultNumberFieldConfig:()=>jl,defaultPillConfig:()=>Md,defaultPlacementIndexPadding:()=>vf,defaultProgressConfig:()=>wd,defaultProgressRingConfig:()=>Kd,defaultRadioConfig:()=>tc,defaultRadioGroupConfig:()=>rc,defaultSearchBarComboboxConfig:()=>zu,defaultSearchBarConfig:()=>Lu,defaultSectionNavigatorConfig:()=>Ju,defaultSegmentedControlConfig:()=>oh,defaultSegmentedItemConfig:()=>dh,defaultSelectConfig:()=>gh,defaultSkeletonConfig:()=>Ch,defaultSliderConfig:()=>Dh,defaultSliderLabelConfig:()=>Nh,defaultStepperConfig:()=>If,defaultStepperTabConfig:()=>dp,defaultStepperTabPanelConfig:()=>mp,defaultSwitchConfig:()=>wp,defaultSystemHealthOverlayConfig:()=>Id,defaultTabConfig:()=>Rp,defaultTabPanelConfig:()=>_p,defaultTabsConfig:()=>Vp,defaultTextAreaConfig:()=>Kp,defaultTextFieldConfig:()=>om,defaultTimezoneConfig:()=>wu,defaultToastConfig:()=>dm,defaultToolbarConfig:()=>vm,defaultTooltipConfig:()=>xm,defaultTreeItemConfig:()=>km,defaultTreeViewConfig:()=>Fm,defaultUrlInputConfig:()=>zm,defaultVerificationCodeInputConfig:()=>Ym,defineFactory:()=>Gv,density:()=>r.density,designToken:()=>Qo,designTokensMap:()=>rn,designUnit:()=>r.designUnit,designUnitValue:()=>gn,direction:()=>r.direction,directionValue:()=>pn,disabledOpacity:()=>r.disabledOpacity,downloadFile:()=>Qs,dropdownMenuBaseStyles:()=>Yn,environmentIndicatorStyles:()=>es,errorDialogTemplate:()=>Fs,extractMenuItems:()=>qn,faSizeValueDefault:()=>Tr,faSizeValues:()=>kr,fileReaderStyles:()=>Ps,fileReaderTemplate:()=>Bs,fillColor:()=>r.fillColor,filterBarTemplate:()=>xa,findParentRouter:()=>lf,findRouter:()=>rf,findTopLevelRouter:()=>df,flyoutAnimationTime:()=>Ua,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,formatTimeForCountDown:()=>Zh,formatToPlaceholder:()=>go,foundationAccordion:()=>m,foundationAccordionItem:()=>w,foundationAccordionItemShadowOptions:()=>b,foundationAccordionItemStyles:()=>g,foundationAccordionItemTemplate:()=>v,foundationAccordionShadowOptions:()=>h,foundationAccordionStyles:()=>d,foundationAccordionTemplate:()=>c,foundationActionsMenu:()=>A,foundationActionsMenuStyles:()=>S,foundationActionsMenuTemplate:()=>I,foundationAiCriteriaSearch:()=>Oe,foundationAiCriteriaSearchShadowOptions:()=>Se,foundationAiCriteriaSearchStyles:()=>_,foundationAiCriteriaSearchTemplate:()=>B,foundationAiIndicator:()=>Ie,foundationAiIndicatorStyles:()=>Te,foundationAiIndicatorTemplate:()=>ke,foundationAnchor:()=>Me,foundationAnchorShadowOptions:()=>Fe,foundationAnchorStyles:()=>Re,foundationAnchorTemplate:()=>Ae,foundationAnchoredRegion:()=>Be,foundationAnchoredRegionShadowOptions:()=>ze,foundationAnchoredRegionStyles:()=>He,foundationAnchoredRegionTemplate:()=>_e,foundationAvatar:()=>Ke,foundationAvatarShadowOptions:()=>We,foundationAvatarStyles:()=>Ve,foundationAvatarTemplate:()=>Ge,foundationBadge:()=>tt,foundationBadgeShadowOptions:()=>Ze,foundationBadgeStyles:()=>Xe,foundationBadgeTemplate:()=>Je,foundationBanner:()=>dt,foundationBannerShadowOptions:()=>rt,foundationBannerStyles:()=>nt,foundationBannerTemplate:()=>at,foundationBreadcrumb:()=>gt,foundationBreadcrumbItem:()=>Ct,foundationBreadcrumbItemShadowOptions:()=>yt,foundationBreadcrumbItemStyles:()=>vt,foundationBreadcrumbItemTemplate:()=>ft,foundationBreadcrumbShadowOptions:()=>pt,foundationBreadcrumbStyles:()=>ct,foundationBreadcrumbTemplate:()=>ut,foundationButton:()=>Tt,foundationButtonShadowOptions:()=>Et,foundationButtonStyles:()=>xt,foundationButtonTemplate:()=>$t,foundationCalendar:()=>Lt,foundationCalendarShadowOptions:()=>Rt,foundationCalendarStyles:()=>kt,foundationCalendarTemplate:()=>Dt,foundationCard:()=>Pt,foundationCardShadowOptions:()=>_t,foundationCardStyles:()=>Ft,foundationCardTemplate:()=>Nt,foundationCategorizedMultiselect:()=>qt,foundationCategorizedMultiselectShadowOptions:()=>jt,foundationCheckbox:()=>ei,foundationCheckboxShadowOptions:()=>Qt,foundationCheckboxStyles:()=>Kt,foundationCheckboxTemplate:()=>Xt,foundationCombobox:()=>Oi,foundationComboboxShadowOptions:()=>Si,foundationComboboxStyles:()=>yi,foundationComboboxTemplate:()=>wi,foundationConnectionIndicator:()=>Ri,foundationConnectionIndicatorStyles:()=>ki,foundationConnectionIndicatorTemplate:()=>Di,foundationDataGrid:()=>_i,foundationDataGridCell:()=>Bi,foundationDataGridCellShadowOptions:()=>zi,foundationDataGridCellStyles:()=>Hi,foundationDataGridCellTemplate:()=>a.dataGridCellTemplate,foundationDataGridRow:()=>Wi,foundationDataGridRowShadowOptions:()=>ji,foundationDataGridRowStyles:()=>Vi,foundationDataGridRowTemplate:()=>a.dataGridRowTemplate,foundationDataGridShadowOptions:()=>Ni,foundationDataGridStyles:()=>Ai,foundationDataGridTemplate:()=>Li,foundationDatePicker:()=>Eo,foundationDatePickerShadowOptions:()=>xo,foundationDatePickerStyles:()=>ro,foundationDatePickerTemplate:()=>uo,foundationDesignSystemProvider:()=>xn,foundationDialog:()=>Ln,foundationDialogShadowOptions:()=>Dn,foundationDialogStyles:()=>Sn,foundationDialogTemplate:()=>kn,foundationDisclosure:()=>Pn,foundationDisclosureShadowOptions:()=>_n,foundationDisclosureStyles:()=>Fn,foundationDisclosureTemplate:()=>Nn,foundationDivider:()=>jn,foundationDividerShadowOptions:()=>Vn,foundationDividerStyles:()=>zn,foundationDividerTemplate:()=>Un,foundationDropdownMenu:()=>Qn,foundationDropdownMenuStyles:()=>Wn,foundationDropdownMenuTemplate:()=>Xn,foundationEnvironmentIndicator:()=>hs,foundationEnvironmentIndicatorTemplate:()=>ts,foundationErrorBanner:()=>fs,foundationErrorBannerShadowOptions:()=>gs,foundationErrorBannerTemplate:()=>ms,foundationErrorBoundary:()=>Rs,foundationErrorBoundaryShadowOptions:()=>Ds,foundationErrorBoundaryTemplate:()=>ks,foundationErrorDialog:()=>_s,foundationErrorDialogShadowOptions:()=>Ns,foundationErrorDialogStyles:()=>As,foundationFileReader:()=>Gs,foundationFileReaderStyles:()=>zs,foundationFileUpload:()=>aa,foundationFileUploadShadowOptions:()=>na,foundationFileUploadStyles:()=>Ws,foundationFileUploadTemplate:()=>Ks,foundationFilter:()=>fa,foundationFilterBar:()=>Oa,foundationFilterBarStyles:()=>ya,foundationFilterBarTemplate:()=>$a,foundationFilterStyles:()=>ra,foundationFilterTemplate:()=>ma,foundationFlexLayout:()=>Fa,foundationFlexLayoutShadowOptions:()=>Ra,foundationFlexLayoutStyles:()=>Da,foundationFlexLayoutTemplate:()=>Ia,foundationFlipper:()=>za,foundationFlipperShadowOptions:()=>Ha,foundationFlipperStyles:()=>Na,foundationFlipperTemplate:()=>Ma,foundationFlyout:()=>qa,foundationFlyoutShadowOptions:()=>Ya,foundationFlyoutStyles:()=>Ba,foundationFlyoutTemplate:()=>Ga,foundationGridLayout:()=>or,foundationGridLayoutItem:()=>lr,foundationGridLayoutItemShadowOptions:()=>sr,foundationGridLayoutItemTemplate:()=>nr,foundationGridLayoutShadowOptions:()=>Za,foundationGridLayoutStyles:()=>Ja,foundationGridLayoutTemplate:()=>Qa,foundationHorizontalScroll:()=>mr,foundationHorizontalScrollShadowOptions:()=>hr,foundationHorizontalScrollStyles:()=>dr,foundationHorizontalScrollTemplate:()=>cr,foundationIcon:()=>Ir,foundationIconShadowOptions:()=>Sr,foundationIconStyles:()=>Cr,foundationIconTemplate:()=>$r,foundationListbox:()=>Mr,foundationListboxOption:()=>Br,foundationListboxOptionShadowOptions:()=>zr,foundationListboxOptionStyles:()=>_r,foundationListboxOptionTemplate:()=>Hr,foundationListboxShadowOptions:()=>Fr,foundationListboxStyles:()=>Rr,foundationListboxTemplate:()=>Ar,foundationMenu:()=>qr,foundationMenuItem:()=>el,foundationMenuItemShadowOptions:()=>Qr,foundationMenuItemStyles:()=>Kr,foundationMenuItemTemplate:()=>Xr,foundationMenuShadowOptions:()=>Yr,foundationMenuStyles:()=>Vr,foundationMenuTemplate:()=>Gr,foundationModal:()=>al,foundationModalShadowOptions:()=>ol,foundationModalStyles:()=>tl,foundationModalTemplate:()=>il,foundationMultiselect:()=>gl,foundationMultiselectShadowOptions:()=>hl,foundationNotificationListener:()=>Vv,foundationNotificationListenerShadowOptions:()=>Uv,foundationNotificationListenerTemplate:()=>zv,foundationNumberField:()=>Yl,foundationNumberFieldShadowOptions:()=>Gl,foundationNumberFieldStyles:()=>xl,foundationNumberFieldTemplate:()=>$l,foundationOptgroup:()=>Xl,foundationOptgroupStyles:()=>Wl,foundationOptgroupTemplate:()=>ql,foundationPill:()=>Hd,foundationPillShadowOptions:()=>Nd,foundationPillTemplate:()=>Fd,foundationPopper:()=>Gd,foundationProgress:()=>Cd,foundationProgressRing:()=>Xd,foundationProgressRingShadowOptions:()=>qd,foundationProgressRingStyles:()=>jd,foundationProgressRingTemplate:()=>Yd,foundationProgressShadowOptions:()=>yd,foundationProgressStyles:()=>vd,foundationProgressTemplate:()=>fd,foundationRadio:()=>ic,foundationRadioGroup:()=>lc,foundationRadioGroupShadowOptions:()=>ac,foundationRadioGroupStyles:()=>oc,foundationRadioGroupTemplate:()=>nc,foundationRadioShadowOptions:()=>ec,foundationRadioStyles:()=>Jd,foundationRadioTemplate:()=>Qd,foundationScheduler:()=>gc,foundationSchedulerCronBuilder:()=>mu,foundationSchedulerCronBuilderShadowOptions:()=>hu,foundationSchedulerCronBuilderTemplate:()=>cu,foundationSchedulerShadowOptions:()=>pc,foundationSchedulerTemplate:()=>uc,foundationSchedulerTimezone:()=>Cu,foundationSchedulerTimezoneShadowOptions:()=>yu,foundationSchedulerTimezoneTemplate:()=>fu,foundationSearchBar:()=>Fu,foundationSearchBarCombobox:()=>Uu,foundationSearchBarComboboxShadowOptions:()=>Pu,foundationSearchBarComboboxStyles:()=>Nu,foundationSearchBarComboboxTemplate:()=>Mu,foundationSearchBarShadowOptions:()=>Au,foundationSearchBarStyles:()=>xu,foundationSearchBarTemplate:()=>Ou,foundationSectionNavigator:()=>Qu,foundationSectionNavigatorShadowOptions:()=>Xu,foundationSectionNavigatorStyles:()=>Bu,foundationSectionNavigatorTemplate:()=>Vu,foundationSegmentedControl:()=>nh,foundationSegmentedControlShadowOptions:()=>ih,foundationSegmentedControlStyles:()=>Zu,foundationSegmentedControlTemplate:()=>eh,foundationSegmentedItem:()=>ch,foundationSegmentedItemShadowOptions:()=>lh,foundationSegmentedItemStyles:()=>sh,foundationSegmentedItemTemplate:()=>ah,foundationSelect:()=>vh,foundationSelectShadowOptions:()=>mh,foundationSelectStyles:()=>uh,foundationSelectTemplate:()=>hh,foundationSkeleton:()=>xh,foundationSkeletonShadowOptions:()=>wh,foundationSkeletonStyles:()=>fh,foundationSkeletonTemplate:()=>bh,foundationSlider:()=>Ih,foundationSliderLabel:()=>Mh,foundationSliderLabelShadowOptions:()=>Fh,foundationSliderLabelStyles:()=>Rh,foundationSliderLabelTemplate:()=>Ah,foundationSliderShadowOptions:()=>kh,foundationSliderStyles:()=>$h,foundationSliderTemplate:()=>Oh,foundationSnackbar:()=>Yh,foundationSnackbarShadowOptions:()=>Gh,foundationSnackbarStyles:()=>Uh,foundationSnackbarTemplate:()=>Vh,foundationStackingIcons:()=>Xh,foundationStackingIconsStyles:()=>Wh,foundationStackingIconsTemplate:()=>qh,foundationStatusPill:()=>tp,foundationStatusPillTemplate:()=>Qh,foundationStepper:()=>Rf,foundationStepperShadowOptions:()=>Df,foundationStepperStyles:()=>Tf,foundationStepperTab:()=>cp,foundationStepperTabPanel:()=>gp,foundationStepperTabPanelShadowOptions:()=>pp,foundationStepperTabPanelTemplate:()=>up,foundationStepperTabShadowOptions:()=>lp,foundationStepperTabStyles:()=>ip,foundationStepperTabTemplate:()=>ap,foundationStepperTemplate:()=>Of,foundationSwitch:()=>Cp,foundationSwitchShadowOptions:()=>yp,foundationSwitchStyles:()=>vp,foundationSwitchTemplate:()=>fp,foundationSystemHealthOverlay:()=>Rd,foundationSystemHealthOverlayShadowOptions:()=>Dd,foundationSystemHealthOverlayStyles:()=>kd,foundationSystemHealthOverlayTemplate:()=>Td,foundationTab:()=>Ap,foundationTabPanel:()=>Hp,foundationTabPanelShadowOptions:()=>Mp,foundationTabPanelStyles:()=>Lp,foundationTabPanelTemplate:()=>Fp,foundationTabShadowOptions:()=>Ip,foundationTabStyles:()=>Tp,foundationTabTemplate:()=>kp,foundationTabs:()=>Gp,foundationTabsShadowOptions:()=>Bp,foundationTabsStyles:()=>Pp,foundationTabsTemplate:()=>zp,foundationTextArea:()=>Xp,foundationTextAreaShadowOptions:()=>qp,foundationTextAreaStyles:()=>jp,foundationTextAreaTemplate:()=>Yp,foundationTextField:()=>nm,foundationTextFieldShadowOptions:()=>im,foundationTextFieldStyles:()=>Zp,foundationTextFieldTemplate:()=>em,foundationToast:()=>um,foundationToastShadowOptions:()=>lm,foundationToastStyles:()=>sm,foundationToastTemplate:()=>rm,foundationToolbar:()=>fm,foundationToolbarShadowOptions:()=>gm,foundationToolbarStyles:()=>hm,foundationToolbarTemplate:()=>pm,foundationTooltip:()=>$m,foundationTooltipShadowOptions:()=>Cm,foundationTooltipStyles:()=>bm,foundationTooltipTemplate:()=>ym,foundationTreeItem:()=>Dm,foundationTreeItemShadowOptions:()=>Tm,foundationTreeItemStyles:()=>Sm,foundationTreeItemTemplate:()=>Em,foundationTreeView:()=>Nm,foundationTreeViewShadowOptions:()=>Lm,foundationTreeViewStyles:()=>Im,foundationTreeViewTemplate:()=>Rm,foundationUrlInput:()=>Bm,foundationUrlInputShadowOptions:()=>Pm,foundationUrlInputStyles:()=>Mm,foundationUrlInputTemplate:()=>Hm,foundationVerificationCodeInput:()=>Xm,foundationVerificationCodeInputShadowOptions:()=>jm,foundationVerificationCodeInputStyles:()=>Vm,foundationVerificationCodeInputTemplate:()=>Gm,fromBinaryExpression:()=>Iv,fromMethodExpression:()=>Rv,fuiAccentPalette:()=>Po,fuiAccentSwatch:()=>Ho,fuiCardFillColor:()=>Bo,fuiCardForegroundColor:()=>jo,fuiDefaultCardFillColor:()=>Ao,fuiDefaultCardPalette:()=>Lo,fuiFillColor:()=>Uo,fuiNeutralPalette:()=>Mo,fuiNeutralSwatch:()=>No,getBannerTemplate:()=>st,getBrowserLocale:()=>po,getCriteriaBuilder:()=>Iu,getDefaultConfig:()=>nn,getDesignSystemPrefix:()=>T,getDialogTemplate:()=>Tn,getDisplayFormatForLang:()=>mo,getDropdownMenuTemplate:()=>Kn,getErrorDialogTemplate:()=>Ls,getExports:()=>sn,getFontawesomeIconsCss:()=>wr,getNavItems:()=>ff,getPrefixedCategorizedMultiselect:()=>Vt,getPrefixedCronBuilder:()=>du,getPrefixedDatePicker:()=>co,getPrefixedErrorBanner:()=>ps,getPrefixedFileReader:()=>Us,getPrefixedFileUpload:()=>qs,getPrefixedFilterTemplate:()=>pa,getPrefixedFlyout:()=>Va,getPrefixedIcon:()=>xr,getPrefixedMultiselect:()=>cl,getPrefixedScheduler:()=>cc,getPrefixedSchedulerTimezone:()=>vu,getPrefixedSearchBar:()=>Eu,getPrefixedSnackbar:()=>Bh,getPrefixedStepper:()=>Ef,getPrefixedStepperTab:()=>sp,getPrefixedToast:()=>am,getPrefixedUrlInput:()=>_m,getTypeRampValue:()=>an,groupsToCriteria:()=>X,hasDateValue:()=>vo,inputControls:()=>Bc,installAlertFlashClock:()=>Op,isAbsoluteUrl:()=>af,jsonConverter:()=>zd,mapType:()=>wa,maxheight:()=>rl,media:()=>je,menuTemplate:()=>k,mixinFoundationFontFamily:()=>fn,months:()=>xc,multiselectStyles:()=>ll,multiselectTemplate:()=>ul,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>Go,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralPaletteValue:()=>un,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,optionsMaxheight:()=>Ut,paletteFromHex:()=>en,parseDatePickerValue:()=>bo,pathJoin:()=>cf,pillStyles:()=>Ad,plusIcon:()=>Su,provideDesignSystem:()=>$d,provideTokens:()=>Jo,rebuildOperator:()=>Dv,registerFoundationDesignSystem:()=>_f,removeChildRouteParameter:()=>hf,removeLastPathSegment:()=>uf,resolveDayjsLocale:()=>ho,routerLogger:()=>Jv,routerProperty:()=>tf,ruleExpressionToGroup:()=>Av,ruleToRuleExpression:()=>Tv,ruleToRuleMethodExpression:()=>Ov,schedulerCronBuilderStyles:()=>Vc,schedulerStyles:()=>dc,schedulerTimezoneStyles:()=>gu,selectCustomToken:()=>ln,sharedFieldStyles:()=>Cl,singleOptionTemplate:()=>D,statusPillStyles:()=>Jh,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>Zo,tagFor:()=>jv,toIntlNumberFormat:()=>_l,transformOperatorNameToServerName:()=>Ev,transformServerNameToOperatorName:()=>kv,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight,uploadFiles:()=>Js,validateClauses:()=>ce,validateGroups:()=>ue,weekNumber:()=>Cc,white:()=>To});var o={};i.r(o),i.d(o,{accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,bodyFont:()=>r.bodyFont,controlCornerRadius:()=>r.controlCornerRadius,defaultNeutralForegroundContrast:()=>Vo,density:()=>r.density,designUnit:()=>r.designUnit,direction:()=>r.direction,disabledOpacity:()=>r.disabledOpacity,fillColor:()=>r.fillColor,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,fuiCardFillColor:()=>Bo,fuiCardForegroundColor:()=>jo,fuiFillColor:()=>Uo,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>Go,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,strokeWidth:()=>r.strokeWidth,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight});var n={};i.r(n),i.d(n,{accentPaletteValue:()=>cn,baseLayerLuminanceValue:()=>hn,controlCornerRadiusValue:()=>mn,designUnitValue:()=>gn,directionValue:()=>pn,neutralPaletteValue:()=>un});var s={};i.r(s),i.d(s,{BASE_LOGICAL_COMBINATORS:()=>eg,BASE_OPERATORS:()=>ag,LOGICAL_COMBINATORS:()=>tg,NULL_COMBINATOR:()=>ig});var a=i(38370),r=i(54634),l=i(33681);const d=(e,t)=>l.css`
|
|
1
|
+
(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[966],{8420(e,t,i){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e),o={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}};return i.default.locale(o,null,!0),o}(i(94343))},58915(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,n=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,a={},r=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),i=60*t[1]+(+t[2]||0);return 0===i?0:"+"===t[0]?-i:i}(e)}],c=function(e){var t=a[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var i,o=a.meridiem;if(o){for(var n=1;n<=24;n+=1)if(e.indexOf(o(n,0,t))>-1){i=n>12;break}}else i=e===(t?"pm":"PM");return i},h={A:[s,function(e){this.afternoon=u(e,!1)}],a:[s,function(e){this.afternoon=u(e,!0)}],Q:[i,function(e){this.month=3*(e-1)+1}],S:[i,function(e){this.milliseconds=100*+e}],SS:[o,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[n,l("seconds")],ss:[n,l("seconds")],m:[n,l("minutes")],mm:[n,l("minutes")],H:[n,l("hours")],h:[n,l("hours")],HH:[n,l("hours")],hh:[n,l("hours")],D:[n,l("day")],DD:[o,l("day")],Do:[s,function(e){var t=a.ordinal,i=e.match(/\d+/);if(this.day=i[0],t)for(var o=1;o<=31;o+=1)t(o).replace(/\[|\]/g,"")===e&&(this.day=o)}],w:[n,l("week")],ww:[o,l("week")],M:[n,l("month")],MM:[o,l("month")],MMM:[s,function(e){var t=c("months"),i=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(i<1)throw new Error;this.month=i%12||i}],MMMM:[s,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,l("year")],YY:[o,function(e){this.year=r(e)}],YYYY:[/\d{4}/,l("year")],Z:d,ZZ:d};function p(i){var o,n;o=i,n=a&&a.formats;for(var s=(i=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,i,o){var s=o&&o.toUpperCase();return i||n[o]||e[o]||n[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})).match(t),r=s.length,l=0;l<r;l+=1){var d=s[l],c=h[d],u=c&&c[0],p=c&&c[1];s[l]=p?{regex:u,parser:p}:d.replace(/^\[|\]$/g,"")}return function(e){for(var t={},i=0,o=0;i<r;i+=1){var n=s[i];if("string"==typeof n)o+=n.length;else{var a=n.regex,l=n.parser,d=e.slice(o),c=a.exec(d)[0];l.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var i=e.hours;t?i<12&&(e.hours+=12):12===i&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,i){i.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(r=e.parseTwoDigitYear);var o=t.prototype,n=o.parse;o.parse=function(e){var t=e.date,o=e.utc,s=e.args;this.$u=o;var r=s[1];if("string"==typeof r){var l=!0===s[2],d=!0===s[3],c=l||d,u=s[2];d&&(u=s[2]),a=this.$locale(),!l&&u&&(a=i.Ls[u]),this.$d=function(e,t,i,o){try{if(["x","X"].indexOf(t)>-1)return new Date(("X"===t?1e3:1)*e);var n=p(t)(e),s=n.year,a=n.month,r=n.day,l=n.hours,d=n.minutes,c=n.seconds,u=n.milliseconds,h=n.zone,m=n.week,g=new Date,v=r||(s||a?1:g.getDate()),f=s||g.getFullYear(),b=0;s&&!a||(b=a>0?a-1:g.getMonth());var y,w=l||0,C=d||0,x=c||0,$=u||0;return h?new Date(Date.UTC(f,b,v,w,C,x,$+60*h.offset*1e3)):i?new Date(Date.UTC(f,b,v,w,C,x,$)):(y=new Date(f,b,v,w,C,x,$),m&&(y=o(y).week(m).toDate()),y)}catch(e){return new Date("")}}(t,r,o,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),c&&t!=this.format(r)&&(this.$d=new Date("")),a={}}else if(r instanceof Array)for(var h=r.length,m=1;m<=h;m+=1){s[1]=r[m-1];var g=i.apply(this,s);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}m===h&&(this.$d=new Date(""))}else n.call(this,e)}}}()},33839(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}}}()},7554(e){e.exports=function(){"use strict";return function(e,t,i){var o=t.prototype,n=function(e){return e&&(e.indexOf?e:e.s)},s=function(e,t,i,o,s){var a=e.name?e:e.$locale(),r=n(a[t]),l=n(a[i]),d=r||l.map(function(e){return e.slice(0,o)});if(!s)return d;var c=a.weekStart;return d.map(function(e,t){return d[(t+(c||0))%7]})},a=function(){return i.Ls[i.locale()]},r=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})}(e.formats[t.toUpperCase()])},l=function(){var e=this;return{months:function(t){return t?t.format("MMMM"):s(e,"months")},monthsShort:function(t){return t?t.format("MMM"):s(e,"monthsShort","months",3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format("dddd"):s(e,"weekdays")},weekdaysMin:function(t){return t?t.format("dd"):s(e,"weekdaysMin","weekdays",2)},weekdaysShort:function(t){return t?t.format("ddd"):s(e,"weekdaysShort","weekdays",3)},longDateFormat:function(t){return r(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return l.bind(this)()},i.localeData=function(){var e=a();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(t){return r(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},i.months=function(){return s(a(),"months")},i.monthsShort=function(){return s(a(),"monthsShort","months",3)},i.weekdays=function(e){return s(a(),"weekdays",null,null,e)},i.weekdaysShort=function(e){return s(a(),"weekdaysShort","weekdays",3,e)},i.weekdaysMin=function(e){return s(a(),"weekdaysMin","weekdays",2,e)}}}()},49916(e){e.exports=function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,i,o){var n=i.prototype,s=n.format;o.en.formats=e,n.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var i=this.$locale().formats,o=function(t,i){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,o,n){var s=n&&n.toUpperCase();return o||i[n]||e[n]||i[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,i){return t||i.slice(1)})})}(t,void 0===i?{}:i);return s.call(this,o)}}}()},57565(e){e.exports=a,a.default=a,a.stable=c,a.stableStringify=c;var t="[...]",i="[Circular]",o=[],n=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,t,i,a){var r;void 0===a&&(a=s()),l(e,"",0,[],void 0,0,a);try{r=0===n.length?JSON.stringify(e,t,i):JSON.stringify(e,h(t),i)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var d=o.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return r}function r(e,t,i,s){var a=Object.getOwnPropertyDescriptor(s,i);void 0!==a.get?a.configurable?(Object.defineProperty(s,i,{value:e}),o.push([s,i,t,a])):n.push([t,i,e]):(s[i]=e,o.push([s,i,t]))}function l(e,o,n,s,a,d,c){var u;if(d+=1,"object"==typeof e&&null!==e){for(u=0;u<s.length;u++)if(s[u]===e)return void r(i,e,o,a);if(void 0!==c.depthLimit&&d>c.depthLimit)return void r(t,e,o,a);if(void 0!==c.edgesLimit&&n+1>c.edgesLimit)return void r(t,e,o,a);if(s.push(e),Array.isArray(e))for(u=0;u<e.length;u++)l(e[u],u,u,s,e,d,c);else{var h=Object.keys(e);for(u=0;u<h.length;u++){var p=h[u];l(e[p],p,u,s,e,d,c)}}s.pop()}}function d(e,t){return e<t?-1:e>t?1:0}function c(e,t,i,a){void 0===a&&(a=s());var r,l=u(e,"",0,[],void 0,0,a)||e;try{r=0===n.length?JSON.stringify(l,t,i):JSON.stringify(l,h(t),i)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var d=o.pop();4===d.length?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return r}function u(e,n,s,a,l,c,h){var p;if(c+=1,"object"==typeof e&&null!==e){for(p=0;p<a.length;p++)if(a[p]===e)return void r(i,e,n,l);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==h.depthLimit&&c>h.depthLimit)return void r(t,e,n,l);if(void 0!==h.edgesLimit&&s+1>h.edgesLimit)return void r(t,e,n,l);if(a.push(e),Array.isArray(e))for(p=0;p<e.length;p++)u(e[p],p,p,a,e,c,h);else{var m={},g=Object.keys(e).sort(d);for(p=0;p<g.length;p++){var v=g[p];u(e[v],v,p,a,e,c,h),m[v]=e[v]}if(void 0===l)return m;o.push([l,n,e]),l[n]=m}a.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,i){if(n.length>0)for(var o=0;o<n.length;o++){var s=n[o];if(s[1]===t&&s[0]===i){i=s[2],n.splice(o,1);break}}return e.call(this,t,i)}}},93678(e){"use strict";function t(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}e.exports=function(e){if((e=e||{}).circles)return function(e){const i=[],o=[],n=new Map;if(n.set(Date,e=>new Date(e)),n.set(Map,(e,t)=>new Map(a(Array.from(e),t))),n.set(Set,(e,t)=>new Set(a(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)n.set(t[0],t[1]);let s=null;return e.proto?l:r;function a(e,a){const r=Object.keys(e),l=new Array(r.length);for(let d=0;d<r.length;d++){const c=r[d],u=e[c];if("object"!=typeof u||null===u)l[c]=u;else if(u.constructor!==Object&&(s=n.get(u.constructor)))l[c]=s(u,a);else if(ArrayBuffer.isView(u))l[c]=t(u);else{const e=i.indexOf(u);l[c]=-1!==e?o[e]:a(u)}}return l}function r(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,r);if(e.constructor!==Object&&(s=n.get(e.constructor)))return s(e,r);const l={};i.push(e),o.push(l);for(const a in e){if(!1===Object.hasOwnProperty.call(e,a))continue;const d=e[a];if("object"!=typeof d||null===d)l[a]=d;else if(d.constructor!==Object&&(s=n.get(d.constructor)))l[a]=s(d,r);else if(ArrayBuffer.isView(d))l[a]=t(d);else{const e=i.indexOf(d);l[a]=-1!==e?o[e]:r(d)}}return i.pop(),o.pop(),l}function l(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e))return a(e,l);if(e.constructor!==Object&&(s=n.get(e.constructor)))return s(e,l);const r={};i.push(e),o.push(r);for(const a in e){const d=e[a];if("object"!=typeof d||null===d)r[a]=d;else if(d.constructor!==Object&&(s=n.get(d.constructor)))r[a]=s(d,l);else if(ArrayBuffer.isView(d))r[a]=t(d);else{const e=i.indexOf(d);r[a]=-1!==e?o[e]:l(d)}}return i.pop(),o.pop(),r}}(e);const i=new Map;if(i.set(Date,e=>new Date(e)),i.set(Map,(e,t)=>new Map(n(Array.from(e),t))),i.set(Set,(e,t)=>new Set(n(Array.from(e),t))),e.constructorHandlers)for(const t of e.constructorHandlers)i.set(t[0],t[1]);let o=null;return e.proto?function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(o=i.get(s.constructor)))return o(s,e);const a={};for(const n in s){const r=s[n];"object"!=typeof r||null===r?a[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?a[n]=o(r,e):ArrayBuffer.isView(r)?a[n]=t(r):a[n]=e(r)}return a}:function e(s){if("object"!=typeof s||null===s)return s;if(Array.isArray(s))return n(s,e);if(s.constructor!==Object&&(o=i.get(s.constructor)))return o(s,e);const a={};for(const n in s){if(!1===Object.hasOwnProperty.call(s,n))continue;const r=s[n];"object"!=typeof r||null===r?a[n]=r:r.constructor!==Object&&(o=i.get(r.constructor))?a[n]=o(r,e):ArrayBuffer.isView(r)?a[n]=t(r):a[n]=e(r)}return a};function n(e,n){const s=Object.keys(e),a=new Array(s.length);for(let r=0;r<s.length;r++){const l=s[r],d=e[l];"object"!=typeof d||null===d?a[l]=d:d.constructor!==Object&&(o=i.get(d.constructor))?a[l]=o(d,n):ArrayBuffer.isView(d)?a[l]=t(d):a[l]=n(d)}return a}}},31274(e,t,i){"use strict";i.d(t,{u:()=>n});var o=i(60416);const n=(e,t,i)=>{(0,o.u_)(e);const n=t.split("-")[0],s=document.createElement(`${n}-dialog`),a=i?(e=>{let t=e.querySelector("#dialog-container");return t||(t=document.createElement("div"),t.setAttribute("id","dialog-container"),t.style.position="relative",e.appendChild(t)),t})(i):(0,o.jE)("dialog-container",t);a.appendChild(s),s.notification=e,s.show()}},60416(e,t,i){"use strict";i.d(t,{cL:()=>h,jE:()=>u,uP:()=>d,u_:()=>c});var o=i(66506),n=i(52945),s=i(68424);const a=(0,o.createLogger)("foundation-notifications");let r=null;const l=new Map,d=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.body)&&void 0!==i?i:"Something went wrong"}`},c=e=>{var t,i;a.log({message:d(e),level:(t=e,(null==t?void 0:t.logLevel)||(null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.logLevel)||o.LogLevels.debug)})},u=(e,t)=>{let i=document.querySelector(`#${e}`);if(!i)if(l.has(e))i=l.get(e);else{const t=(0,n.fI)(document).find(t=>t.id===e);t&&(i=t,l.set(e,t))}if(!i){i=document.createElement("div"),i.setAttribute("id",e),i.style.zIndex="9999";const{element:t,prefix:o}=(0,s.DW)(document.body,"rapid");if(t)t.appendChild(i),r=t;else if(r)r.appendChild(i);else{const e=document.createElement(`${o}-design-system-provider`);e.appendChild(i),document.body.appendChild(e),r=e}}return i},h=e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return p()},p=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e}},78966(e,t,i){"use strict";i.r(t),i.d(t,{Accordion:()=>u,AccordionItem:()=>f,ActionsMenu:()=>R,AffixMixin:()=>Cl,AiCriteriaSearch:()=>$e,AiIndicator:()=>De,Anchor:()=>Le,AnchoredRegion:()=>Pe,Avatar:()=>Ye,BASE_EDITABLE_ELEMENT_SELECTORS:()=>Nf,Badge:()=>Qe,Banner:()=>lt,BaseDatasource:()=>vi,BaseFileComponent:()=>Ps,Breadcrumb:()=>ht,BreadcrumbItem:()=>bt,Button:()=>St,COMBO_INPUT_MIN_LENGTH:()=>Iu,CRON_LENGTH:()=>Oc,CSSVarsTokenMapper:()=>Zm,Calendar:()=>It,Card:()=>Mt,CategorizedMultiselect:()=>Wt,Checkbox:()=>Jt,Combobox:()=>Si,ConnectionIndicator:()=>Ri,CronBuilderEvents:()=>Ac,DATETIME_OPERATORS:()=>ee,DATE_OPERATORS:()=>Z,DATE_PICKER_VALUE_FORMAT:()=>bo,DEFUALT_FILTER_BAR_COLUMNS:()=>Ea,DESIGN_SYSTEM_EDITABLE_ELEMENT_SELECTORS:()=>Mf,DataGrid:()=>Fi,DataGridCell:()=>zi,DataGridDatasource:()=>eg,DataGridRow:()=>ji,DateOrDay:()=>wc,DatePicker:()=>Eo,DefaultRouter:()=>sf,DesignTokensObservable:()=>Xo,Dialog:()=>Ln,DialogElement:()=>An,Disclosure:()=>_n,Divider:()=>Vn,DropdownMenu:()=>Qn,EnvironmentIndicator:()=>hs,ErrorBanner:()=>fs,ErrorBoundary:()=>Rs,ErrorBoundaryEvent:()=>ys,ErrorDialog:()=>_s,ExpressionBuilderConfig:()=>s,ExpressionBuilderCore:()=>bv,FaPrefixFromStyle:()=>Tr,FileReader:()=>Gs,FileUpload:()=>na,Filter:()=>fa,FilterBar:()=>Oa,FilterEvents:()=>va,FlexLayout:()=>Na,FlexMediaQueriesEnum:()=>ka,Flipper:()=>Ha,Flyout:()=>Ya,FoundationDesignSystemProvider:()=>xn,FoundationExpressionBuilder:()=>ov,FoundationRouteCollection:()=>yf,FoundationRouteNav:()=>gf,FoundationRouter:()=>$f,FoundationRouterConfiguration:()=>wf,FoundationRuleExpressionBuilder:()=>Nv,FoundationValueExpressionBuilder:()=>zv,GenerateNavigationPathEventType:()=>xf,GridLayout:()=>or,GridLayoutItem:()=>lr,GridMediaQueriesEnum:()=>Xa,HorizontalScroll:()=>hr,INPUT_MIN_LENGTH:()=>Du,Icon:()=>Ir,Listbox:()=>Nr,ListboxOption:()=>zr,MAX_DAYS:()=>Ec,MAX_HOURS:()=>kc,MAX_MINS_SEC:()=>Dc,MAX_MINUTE_RECURRENCE:()=>Rc,MAX_MONTHS:()=>Sc,MAX_WEEK_DAYS:()=>Tc,MAX_WEEK_NUMBER:()=>Ic,Menu:()=>Yr,MenuItem:()=>Qr,Modal:()=>al,Multiselect:()=>gl,MultiselectDatasource:()=>cl,NUMERIC_OPERATORS:()=>Q,NavigateToEventType:()=>Cf,NotificationListener:()=>Vv,NumberField:()=>Gl,OPERATOR_DISPLAY_LABEL:()=>te,Optgroup:()=>Xl,OptionsDatasource:()=>yi,Pill:()=>Hd,Popper:()=>Bd,Position:()=>zt,Progress:()=>yd,ProgressRing:()=>qd,Radio:()=>ec,RadioGroup:()=>ac,RecurrenceType:()=>bc,Router:()=>nf,RuleExpression:()=>yv,SCROLL_TIMEOUT:()=>ku,SECTION_NAVIGATOR_EVENTS:()=>Wu,SNACKBAR_CLOSE_TIMEOUT:()=>zh,SNACKBAR_EVENTS_NAMES:()=>Uh,SNACKBAR_TYPES:()=>Ph,SNACKBAR_TYPE_DEFAULT:()=>Hh,STRING_OPERATORS:()=>J,Scheduler:()=>pc,SchedulerCronBuilder:()=>hu,SchedulerTimezone:()=>yu,SearchBar:()=>Au,SearchBarCombobox:()=>Pu,SectionNavigator:()=>Xu,SegmentedControl:()=>ih,SegmentedItem:()=>lh,Select:()=>mh,Skeleton:()=>wh,Slider:()=>kh,SliderLabel:()=>Nh,Snackbar:()=>Yh,StackingIcons:()=>Xh,StatusPill:()=>tp,Stepper:()=>Df,StepperTab:()=>lp,StepperTabPanel:()=>pp,Switch:()=>yp,SystemHealthOverlay:()=>Td,Tab:()=>Ip,TabPanel:()=>Mp,Tabs:()=>Bp,TextArea:()=>qp,TextField:()=>im,Toast:()=>um,Toolbar:()=>gm,Tooltip:()=>Cm,TreeItem:()=>Tm,TreeView:()=>Lm,UrlInput:()=>Bm,VerificationCodeInput:()=>Xm,WeekType:()=>yc,accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,accentPaletteValue:()=>un,actionsMenuBaseStyles:()=>$,alertFlashDurationProperty:()=>Sp,alertFlashPhaseProperty:()=>$p,applyCustomTokens:()=>on,baseComponents:()=>Qm,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>pn,black:()=>Do,bodyFont:()=>r.bodyFont,buildEditableElementSelector:()=>_f,categorizedMultiselectStyles:()=>Bt,categorizedMultiselectTemplate:()=>Gt,clientOperators:()=>Cv,closeIcon:()=>da,configureDesignSystem:()=>cn,configureEnvironmentIndicator:()=>cs,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>gn,createDesignSystemProxy:()=>$d,createFormData:()=>Js,crossIcon:()=>Su,daysOfWeek:()=>Cc,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>Ee,defaultAnchorConfig:()=>Fe,defaultAnchoredRegionConfig:()=>Ue,defaultAvatarConfig:()=>qe,defaultBadgeConfig:()=>et,defaultBreadcrumbConfig:()=>mt,defaultBreadcrumbItemConfig:()=>wt,defaultButtonConfig:()=>Ot,defaultCalendarConfig:()=>At,defaultCardConfig:()=>Ht,defaultCategorizedMultiselectConfig:()=>Yt,defaultCheckboxConfig:()=>Zt,defaultComboboxConfig:()=>Oi,defaultConfig:()=>gc,defaultCronBuilderConfig:()=>mu,defaultDataGridCellConfig:()=>Bi,defaultDataGridConfig:()=>_i,defaultDataGridRowConfig:()=>Wi,defaultDatePickerConfig:()=>So,defaultDialogConfig:()=>Rn,defaultDisclosureConfig:()=>Pn,defaultDividerConfig:()=>jn,defaultFileUploadConfig:()=>aa,defaultFillColor:()=>Ro,defaultFlexLayoutConfig:()=>La,defaultFlipperConfig:()=>za,defaultFlyoutConfig:()=>qa,defaultGridLayoutConfig:()=>tr,defaultGridLayoutItemConfig:()=>rr,defaultHorizontalScrollConfig:()=>mr,defaultIconConfig:()=>Or,defaultListboxConfig:()=>Mr,defaultListboxOptionConfig:()=>Br,defaultMenuConfig:()=>qr,defaultMenuItemConfig:()=>el,defaultModalConfig:()=>sl,defaultMultiselectConfig:()=>ml,defaultNavItemPredicate:()=>vf,defaultNeutralForegroundContrast:()=>Go,defaultNumberFieldConfig:()=>Yl,defaultPillConfig:()=>_d,defaultPlacementIndexPadding:()=>ff,defaultProgressConfig:()=>Cd,defaultProgressRingConfig:()=>Xd,defaultRadioConfig:()=>ic,defaultRadioGroupConfig:()=>lc,defaultSearchBarComboboxConfig:()=>Uu,defaultSearchBarConfig:()=>Nu,defaultSectionNavigatorConfig:()=>Qu,defaultSegmentedControlConfig:()=>nh,defaultSegmentedItemConfig:()=>ch,defaultSelectConfig:()=>vh,defaultSkeletonConfig:()=>xh,defaultSliderConfig:()=>Ih,defaultSliderLabelConfig:()=>Mh,defaultStepperConfig:()=>Rf,defaultStepperTabConfig:()=>cp,defaultStepperTabPanelConfig:()=>gp,defaultSwitchConfig:()=>Cp,defaultSystemHealthOverlayConfig:()=>Rd,defaultTabConfig:()=>Ap,defaultTabPanelConfig:()=>Hp,defaultTabsConfig:()=>Gp,defaultTextAreaConfig:()=>Xp,defaultTextFieldConfig:()=>nm,defaultTimezoneConfig:()=>Cu,defaultToastConfig:()=>cm,defaultToolbarConfig:()=>fm,defaultTooltipConfig:()=>$m,defaultTreeItemConfig:()=>Dm,defaultTreeViewConfig:()=>Fm,defaultUrlInputConfig:()=>Um,defaultVerificationCodeInputConfig:()=>Wm,defineFactory:()=>jv,density:()=>r.density,designToken:()=>Zo,designTokensMap:()=>ln,designUnit:()=>r.designUnit,designUnitValue:()=>vn,direction:()=>r.direction,directionValue:()=>mn,disabledOpacity:()=>r.disabledOpacity,downloadFile:()=>Zs,dropdownMenuBaseStyles:()=>Wn,environmentIndicatorStyles:()=>ts,errorDialogTemplate:()=>Fs,extractMenuItems:()=>Kn,faSizeValueDefault:()=>kr,faSizeValues:()=>Dr,fileReaderStyles:()=>zs,fileReaderTemplate:()=>Vs,fillColor:()=>r.fillColor,filterBarTemplate:()=>$a,findParentRouter:()=>df,findRouter:()=>lf,findTopLevelRouter:()=>cf,flyoutAnimationTime:()=>Ba,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,formatTimeForCountDown:()=>ep,formatToPlaceholder:()=>vo,foundationAccordion:()=>m,foundationAccordionItem:()=>w,foundationAccordionItemShadowOptions:()=>b,foundationAccordionItemStyles:()=>g,foundationAccordionItemTemplate:()=>v,foundationAccordionShadowOptions:()=>h,foundationAccordionStyles:()=>d,foundationAccordionTemplate:()=>c,foundationActionsMenu:()=>A,foundationActionsMenuStyles:()=>S,foundationActionsMenuTemplate:()=>I,foundationAiCriteriaSearch:()=>Oe,foundationAiCriteriaSearchShadowOptions:()=>Se,foundationAiCriteriaSearchStyles:()=>_,foundationAiCriteriaSearchTemplate:()=>B,foundationAiIndicator:()=>Ie,foundationAiIndicatorStyles:()=>Te,foundationAiIndicatorTemplate:()=>ke,foundationAnchor:()=>Me,foundationAnchorShadowOptions:()=>Ne,foundationAnchorStyles:()=>Re,foundationAnchorTemplate:()=>Ae,foundationAnchoredRegion:()=>Be,foundationAnchoredRegionShadowOptions:()=>ze,foundationAnchoredRegionStyles:()=>He,foundationAnchoredRegionTemplate:()=>_e,foundationAvatar:()=>Ke,foundationAvatarShadowOptions:()=>We,foundationAvatarStyles:()=>Ve,foundationAvatarTemplate:()=>Ge,foundationBadge:()=>tt,foundationBadgeShadowOptions:()=>Ze,foundationBadgeStyles:()=>Xe,foundationBadgeTemplate:()=>Je,foundationBanner:()=>dt,foundationBannerShadowOptions:()=>rt,foundationBannerStyles:()=>nt,foundationBannerTemplate:()=>at,foundationBreadcrumb:()=>gt,foundationBreadcrumbItem:()=>Ct,foundationBreadcrumbItemShadowOptions:()=>yt,foundationBreadcrumbItemStyles:()=>vt,foundationBreadcrumbItemTemplate:()=>ft,foundationBreadcrumbShadowOptions:()=>pt,foundationBreadcrumbStyles:()=>ct,foundationBreadcrumbTemplate:()=>ut,foundationButton:()=>Tt,foundationButtonShadowOptions:()=>Et,foundationButtonStyles:()=>xt,foundationButtonTemplate:()=>$t,foundationCalendar:()=>Lt,foundationCalendarShadowOptions:()=>Rt,foundationCalendarStyles:()=>kt,foundationCalendarTemplate:()=>Dt,foundationCard:()=>Pt,foundationCardShadowOptions:()=>_t,foundationCardStyles:()=>Nt,foundationCardTemplate:()=>Ft,foundationCategorizedMultiselect:()=>qt,foundationCategorizedMultiselectShadowOptions:()=>jt,foundationCheckbox:()=>ei,foundationCheckboxShadowOptions:()=>Qt,foundationCheckboxStyles:()=>Kt,foundationCheckboxTemplate:()=>Xt,foundationCombobox:()=>Ti,foundationComboboxShadowOptions:()=>Ei,foundationComboboxStyles:()=>wi,foundationComboboxTemplate:()=>Ci,foundationConnectionIndicator:()=>Ai,foundationConnectionIndicatorStyles:()=>Di,foundationConnectionIndicatorTemplate:()=>Ii,foundationDataGrid:()=>Hi,foundationDataGridCell:()=>Vi,foundationDataGridCellShadowOptions:()=>Ui,foundationDataGridCellStyles:()=>Pi,foundationDataGridCellTemplate:()=>a.dataGridCellTemplate,foundationDataGridRow:()=>qi,foundationDataGridRowShadowOptions:()=>Yi,foundationDataGridRowStyles:()=>Gi,foundationDataGridRowTemplate:()=>a.dataGridRowTemplate,foundationDataGridShadowOptions:()=>Mi,foundationDataGridStyles:()=>Li,foundationDataGridTemplate:()=>Ni,foundationDatePicker:()=>Oo,foundationDatePickerShadowOptions:()=>$o,foundationDatePickerStyles:()=>lo,foundationDatePickerTemplate:()=>ho,foundationDesignSystemProvider:()=>$n,foundationDialog:()=>Nn,foundationDialogShadowOptions:()=>In,foundationDialogStyles:()=>En,foundationDialogTemplate:()=>Dn,foundationDisclosure:()=>zn,foundationDisclosureShadowOptions:()=>Hn,foundationDisclosureStyles:()=>Fn,foundationDisclosureTemplate:()=>Mn,foundationDivider:()=>Yn,foundationDividerShadowOptions:()=>Gn,foundationDividerStyles:()=>Un,foundationDividerTemplate:()=>Bn,foundationDropdownMenu:()=>Zn,foundationDropdownMenuStyles:()=>qn,foundationDropdownMenuTemplate:()=>Jn,foundationEnvironmentIndicator:()=>ps,foundationEnvironmentIndicatorTemplate:()=>is,foundationErrorBanner:()=>bs,foundationErrorBannerShadowOptions:()=>vs,foundationErrorBannerTemplate:()=>gs,foundationErrorBoundary:()=>As,foundationErrorBoundaryShadowOptions:()=>Is,foundationErrorBoundaryTemplate:()=>Ds,foundationErrorDialog:()=>Hs,foundationErrorDialogShadowOptions:()=>Ms,foundationErrorDialogStyles:()=>Ls,foundationFileReader:()=>js,foundationFileReaderStyles:()=>Us,foundationFileUpload:()=>ra,foundationFileUploadShadowOptions:()=>sa,foundationFileUploadStyles:()=>qs,foundationFileUploadTemplate:()=>Xs,foundationFilter:()=>ba,foundationFilterBar:()=>Ta,foundationFilterBarStyles:()=>wa,foundationFilterBarTemplate:()=>Sa,foundationFilterStyles:()=>la,foundationFilterTemplate:()=>ga,foundationFlexLayout:()=>Fa,foundationFlexLayoutShadowOptions:()=>Aa,foundationFlexLayoutStyles:()=>Ia,foundationFlexLayoutTemplate:()=>Ra,foundationFlipper:()=>Ua,foundationFlipperShadowOptions:()=>Pa,foundationFlipperStyles:()=>Ma,foundationFlipperTemplate:()=>_a,foundationFlyout:()=>Ka,foundationFlyoutShadowOptions:()=>Wa,foundationFlyoutStyles:()=>Va,foundationFlyoutTemplate:()=>ja,foundationGridLayout:()=>nr,foundationGridLayoutItem:()=>dr,foundationGridLayoutItemShadowOptions:()=>ar,foundationGridLayoutItemTemplate:()=>sr,foundationGridLayoutShadowOptions:()=>er,foundationGridLayoutStyles:()=>Qa,foundationGridLayoutTemplate:()=>Za,foundationHorizontalScroll:()=>gr,foundationHorizontalScrollShadowOptions:()=>pr,foundationHorizontalScrollStyles:()=>cr,foundationHorizontalScrollTemplate:()=>ur,foundationIcon:()=>Rr,foundationIconShadowOptions:()=>Er,foundationIconStyles:()=>xr,foundationIconTemplate:()=>Sr,foundationListbox:()=>_r,foundationListboxOption:()=>Vr,foundationListboxOptionShadowOptions:()=>Ur,foundationListboxOptionStyles:()=>Hr,foundationListboxOptionTemplate:()=>Pr,foundationListboxShadowOptions:()=>Fr,foundationListboxStyles:()=>Ar,foundationListboxTemplate:()=>Lr,foundationMenu:()=>Kr,foundationMenuItem:()=>tl,foundationMenuItemShadowOptions:()=>Zr,foundationMenuItemStyles:()=>Xr,foundationMenuItemTemplate:()=>Jr,foundationMenuShadowOptions:()=>Wr,foundationMenuStyles:()=>Gr,foundationMenuTemplate:()=>jr,foundationModal:()=>rl,foundationModalShadowOptions:()=>nl,foundationModalStyles:()=>il,foundationModalTemplate:()=>ol,foundationMultiselect:()=>vl,foundationMultiselectShadowOptions:()=>pl,foundationNotificationListener:()=>Gv,foundationNotificationListenerShadowOptions:()=>Bv,foundationNotificationListenerTemplate:()=>Uv,foundationNumberField:()=>Wl,foundationNumberFieldShadowOptions:()=>jl,foundationNumberFieldStyles:()=>$l,foundationNumberFieldTemplate:()=>Sl,foundationOptgroup:()=>Jl,foundationOptgroupStyles:()=>ql,foundationOptgroupTemplate:()=>Kl,foundationPill:()=>Pd,foundationPillShadowOptions:()=>Md,foundationPillTemplate:()=>Fd,foundationPopper:()=>jd,foundationProgress:()=>xd,foundationProgressRing:()=>Jd,foundationProgressRingShadowOptions:()=>Kd,foundationProgressRingStyles:()=>Yd,foundationProgressRingTemplate:()=>Wd,foundationProgressShadowOptions:()=>wd,foundationProgressStyles:()=>fd,foundationProgressTemplate:()=>bd,foundationRadio:()=>oc,foundationRadioGroup:()=>dc,foundationRadioGroupShadowOptions:()=>rc,foundationRadioGroupStyles:()=>nc,foundationRadioGroupTemplate:()=>sc,foundationRadioShadowOptions:()=>tc,foundationRadioStyles:()=>Qd,foundationRadioTemplate:()=>Zd,foundationScheduler:()=>vc,foundationSchedulerCronBuilder:()=>gu,foundationSchedulerCronBuilderShadowOptions:()=>pu,foundationSchedulerCronBuilderTemplate:()=>uu,foundationSchedulerShadowOptions:()=>mc,foundationSchedulerTemplate:()=>hc,foundationSchedulerTimezone:()=>xu,foundationSchedulerTimezoneShadowOptions:()=>wu,foundationSchedulerTimezoneTemplate:()=>bu,foundationSearchBar:()=>Fu,foundationSearchBarCombobox:()=>Bu,foundationSearchBarComboboxShadowOptions:()=>zu,foundationSearchBarComboboxStyles:()=>Mu,foundationSearchBarComboboxTemplate:()=>_u,foundationSearchBarShadowOptions:()=>Lu,foundationSearchBarStyles:()=>$u,foundationSearchBarTemplate:()=>Tu,foundationSectionNavigator:()=>Zu,foundationSectionNavigatorShadowOptions:()=>Ju,foundationSectionNavigatorStyles:()=>Vu,foundationSectionNavigatorTemplate:()=>Gu,foundationSegmentedControl:()=>sh,foundationSegmentedControlShadowOptions:()=>oh,foundationSegmentedControlStyles:()=>eh,foundationSegmentedControlTemplate:()=>th,foundationSegmentedItem:()=>uh,foundationSegmentedItemShadowOptions:()=>dh,foundationSegmentedItemStyles:()=>ah,foundationSegmentedItemTemplate:()=>rh,foundationSelect:()=>fh,foundationSelectShadowOptions:()=>gh,foundationSelectStyles:()=>hh,foundationSelectTemplate:()=>ph,foundationSkeleton:()=>$h,foundationSkeletonShadowOptions:()=>Ch,foundationSkeletonStyles:()=>bh,foundationSkeletonTemplate:()=>yh,foundationSlider:()=>Rh,foundationSliderLabel:()=>_h,foundationSliderLabelShadowOptions:()=>Fh,foundationSliderLabelStyles:()=>Ah,foundationSliderLabelTemplate:()=>Lh,foundationSliderShadowOptions:()=>Dh,foundationSliderStyles:()=>Sh,foundationSliderTemplate:()=>Th,foundationSnackbar:()=>Wh,foundationSnackbarShadowOptions:()=>jh,foundationSnackbarStyles:()=>Bh,foundationSnackbarTemplate:()=>Gh,foundationStackingIcons:()=>Jh,foundationStackingIconsStyles:()=>qh,foundationStackingIconsTemplate:()=>Kh,foundationStatusPill:()=>ip,foundationStatusPillTemplate:()=>Zh,foundationStepper:()=>Af,foundationStepperShadowOptions:()=>If,foundationStepperStyles:()=>kf,foundationStepperTab:()=>up,foundationStepperTabPanel:()=>vp,foundationStepperTabPanelShadowOptions:()=>mp,foundationStepperTabPanelTemplate:()=>hp,foundationStepperTabShadowOptions:()=>dp,foundationStepperTabStyles:()=>op,foundationStepperTabTemplate:()=>rp,foundationStepperTemplate:()=>Tf,foundationSwitch:()=>xp,foundationSwitchShadowOptions:()=>wp,foundationSwitchStyles:()=>fp,foundationSwitchTemplate:()=>bp,foundationSystemHealthOverlay:()=>Ad,foundationSystemHealthOverlayShadowOptions:()=>Id,foundationSystemHealthOverlayStyles:()=>Dd,foundationSystemHealthOverlayTemplate:()=>kd,foundationTab:()=>Lp,foundationTabPanel:()=>Pp,foundationTabPanelShadowOptions:()=>_p,foundationTabPanelStyles:()=>Np,foundationTabPanelTemplate:()=>Fp,foundationTabShadowOptions:()=>Rp,foundationTabStyles:()=>kp,foundationTabTemplate:()=>Dp,foundationTabs:()=>jp,foundationTabsShadowOptions:()=>Vp,foundationTabsStyles:()=>zp,foundationTabsTemplate:()=>Up,foundationTextArea:()=>Jp,foundationTextAreaShadowOptions:()=>Kp,foundationTextAreaStyles:()=>Yp,foundationTextAreaTemplate:()=>Wp,foundationTextField:()=>sm,foundationTextFieldShadowOptions:()=>om,foundationTextFieldStyles:()=>em,foundationTextFieldTemplate:()=>tm,foundationToast:()=>hm,foundationToastShadowOptions:()=>dm,foundationToastStyles:()=>am,foundationToastTemplate:()=>lm,foundationToolbar:()=>bm,foundationToolbarShadowOptions:()=>vm,foundationToolbarStyles:()=>pm,foundationToolbarTemplate:()=>mm,foundationTooltip:()=>Sm,foundationTooltipShadowOptions:()=>xm,foundationTooltipStyles:()=>ym,foundationTooltipTemplate:()=>wm,foundationTreeItem:()=>Im,foundationTreeItemShadowOptions:()=>km,foundationTreeItemStyles:()=>Em,foundationTreeItemTemplate:()=>Om,foundationTreeView:()=>Mm,foundationTreeViewShadowOptions:()=>Nm,foundationTreeViewStyles:()=>Rm,foundationTreeViewTemplate:()=>Am,foundationUrlInput:()=>Vm,foundationUrlInputShadowOptions:()=>zm,foundationUrlInputStyles:()=>_m,foundationUrlInputTemplate:()=>Pm,foundationVerificationCodeInput:()=>Jm,foundationVerificationCodeInputShadowOptions:()=>Ym,foundationVerificationCodeInputStyles:()=>Gm,foundationVerificationCodeInputTemplate:()=>jm,fromBinaryExpression:()=>Rv,fromMethodExpression:()=>Av,fuiAccentPalette:()=>zo,fuiAccentSwatch:()=>Po,fuiCardFillColor:()=>Vo,fuiCardForegroundColor:()=>Yo,fuiDefaultCardFillColor:()=>Lo,fuiDefaultCardPalette:()=>No,fuiFillColor:()=>Bo,fuiNeutralPalette:()=>_o,fuiNeutralSwatch:()=>Mo,getBannerTemplate:()=>st,getBrowserLocale:()=>mo,getCriteriaBuilder:()=>Ru,getDefaultConfig:()=>sn,getDesignSystemPrefix:()=>T,getDialogTemplate:()=>kn,getDisplayFormatForLang:()=>go,getDropdownMenuTemplate:()=>Xn,getErrorDialogTemplate:()=>Ns,getExports:()=>an,getFontawesomeIconsCss:()=>Cr,getNavItems:()=>bf,getPrefixedCategorizedMultiselect:()=>Vt,getPrefixedCronBuilder:()=>cu,getPrefixedDatePicker:()=>uo,getPrefixedErrorBanner:()=>ms,getPrefixedFileReader:()=>Bs,getPrefixedFileUpload:()=>Ks,getPrefixedFilterTemplate:()=>ma,getPrefixedFlyout:()=>Ga,getPrefixedIcon:()=>$r,getPrefixedMultiselect:()=>ul,getPrefixedScheduler:()=>uc,getPrefixedSchedulerTimezone:()=>fu,getPrefixedSearchBar:()=>Ou,getPrefixedSnackbar:()=>Vh,getPrefixedStepper:()=>Of,getPrefixedStepperTab:()=>ap,getPrefixedToast:()=>rm,getPrefixedUrlInput:()=>Hm,getTypeRampValue:()=>rn,groupsToCriteria:()=>X,hasDateValue:()=>fo,inputControls:()=>Vc,installAlertFlashClock:()=>Tp,isAbsoluteUrl:()=>rf,jsonConverter:()=>Ud,mapType:()=>Ca,maxheight:()=>ll,media:()=>je,menuTemplate:()=>k,mixinFoundationFontFamily:()=>bn,months:()=>$c,multiselectStyles:()=>dl,multiselectTemplate:()=>hl,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>jo,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralPaletteValue:()=>hn,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,optionsMaxheight:()=>Ut,paletteFromHex:()=>tn,parseDatePickerValue:()=>yo,pathJoin:()=>uf,pillStyles:()=>Ld,plusIcon:()=>Eu,provideDesignSystem:()=>Sd,provideTokens:()=>Qo,rebuildOperator:()=>Iv,registerFoundationDesignSystem:()=>Hf,removeChildRouteParameter:()=>pf,removeLastPathSegment:()=>hf,resolveDayjsLocale:()=>po,routerLogger:()=>Qv,routerProperty:()=>of,ruleExpressionToGroup:()=>Lv,ruleToRuleExpression:()=>kv,ruleToRuleMethodExpression:()=>Tv,schedulerCronBuilderStyles:()=>Gc,schedulerStyles:()=>cc,schedulerTimezoneStyles:()=>vu,selectCustomToken:()=>dn,sharedFieldStyles:()=>xl,singleOptionTemplate:()=>D,statusPillStyles:()=>Qh,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>en,tagFor:()=>Yv,toIntlNumberFormat:()=>Hl,transformOperatorNameToServerName:()=>Ov,transformServerNameToOperatorName:()=>Dv,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight,uploadFiles:()=>Qs,validateClauses:()=>ce,validateGroups:()=>ue,weekNumber:()=>xc,white:()=>ko});var o={};i.r(o),i.d(o,{accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,bodyFont:()=>r.bodyFont,controlCornerRadius:()=>r.controlCornerRadius,defaultNeutralForegroundContrast:()=>Go,density:()=>r.density,designUnit:()=>r.designUnit,direction:()=>r.direction,disabledOpacity:()=>r.disabledOpacity,fillColor:()=>r.fillColor,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,fuiCardFillColor:()=>Vo,fuiCardForegroundColor:()=>Yo,fuiFillColor:()=>Bo,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>jo,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,strokeWidth:()=>r.strokeWidth,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight});var n={};i.r(n),i.d(n,{accentPaletteValue:()=>un,baseLayerLuminanceValue:()=>pn,controlCornerRadiusValue:()=>gn,designUnitValue:()=>vn,directionValue:()=>mn,neutralPaletteValue:()=>hn});var s={};i.r(s),i.d(s,{BASE_LOGICAL_COMBINATORS:()=>tg,BASE_OPERATORS:()=>rg,LOGICAL_COMBINATORS:()=>ig,NULL_COMBINATOR:()=>og});var a=i(38370),r=i(54634),l=i(33681);const d=(e,t)=>l.css`
|
|
2
2
|
${(0,r.accordionStyles)(e,t)}
|
|
3
3
|
`,c=(e,t)=>(0,a.accordionTemplate)(e,t);class u extends a.Accordion{}const h={delegatesFocus:!0,mode:"open"},p={},m=u.compose(Object.assign({baseName:"accordion",template:c,styles:d,shadowOptions:h},p)),g=(e,t)=>l.css`
|
|
4
4
|
${(0,r.accordionItemStyles)(e,t)}
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
>
|
|
163
163
|
${e=>e.getTemplate(T(e))}
|
|
164
164
|
</div>
|
|
165
|
-
`;class R extends a.FoundationElement{constructor(){super(...arguments),this.isVertical=!1,this.addDefaultActions=!0,this.autoCloseOnAction=!0,this.name="Actions",this.open=!1,this.hideDisabled=!1,this.hideMenuSingleOption=!1}disconnectedCallback(){var e;(null===(e=this.actionsMenu)||void 0===e?void 0:e.matches(":popover-open"))&&this.actionsMenu.hidePopover(),super.disconnectedCallback()}updateMenuPosition(){const e=this.actionsOpener.getBoundingClientRect();this.actionsMenu.style.position="fixed",this.actionsMenu.style.top=`${e.top}px`,this.actionsMenu.style.left="auto",this.actionsMenu.style.right=window.innerWidth-e.right+"px"}definitionChanged(e,t){var i;this.actions=null!==(i=null==t?void 0:t.actions)&&void 0!==i?i:[],delete this.definition.actions,t.buttonText&&(this.name=t.buttonText,delete this.definition.customButtonText),t.isVertical&&(this.isVertical=t.isVertical,delete this.definition.isVertical),t.buttonAppearance&&(this.buttonAppearance=t.buttonAppearance,delete this.definition.buttonAppearance),t.hideMenuSingleOption&&(this.hideMenuSingleOption=t.hideMenuSingleOption,delete this.definition.hideMenuSingleOption)}openChanged(){var e;this.classNames=(0,x.x)(["visible",this.open],["hidden",!this.open]),this.open?(this.updateMenuPosition(),this.actionsMenu.showPopover()):(null===(e=this.actionsMenu)||void 0===e?void 0:e.matches(":popover-open"))&&this.actionsMenu.hidePopover()}toggleActionsMenuVisibility(){this.open=!this.open}onActionMenuItemClick(e){this.autoCloseOnAction&&(this.open=!1),e(this.rowData)}get allActions(){var e;const t=[{name:"✖",callback:()=>this.open=!1}];return this.addDefaultActions?[...null!==(e=this.actions)&&void 0!==e?e:[],...t]:this.actions}get rowData(){if(!this.definition)return;const{node:e,data:t}=this.definition;return(null==e?void 0:e.data)||t}getLabel(e){return"function"==typeof e?e(this.rowData):e}getTemplate(e){if(!this.hideMenuSingleOption)return k(e);const t=this.actions.filter(e=>!e.isDisabled||!e.isDisabled(this.rowData));return this.singleOption=null,0!==t.length?1===t.length?(this.singleOption=t[0],D(e)):k(e):void 0}}(0,C.Cg)([l.observable],R.prototype,"actions",void 0),(0,C.Cg)([(0,l.attr)({attribute:"is-vertical",mode:"boolean"})],R.prototype,"isVertical",void 0),(0,C.Cg)([(0,l.attr)({attribute:"add-default-actions",mode:"boolean"})],R.prototype,"addDefaultActions",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close-on-action",mode:"boolean"})],R.prototype,"autoCloseOnAction",void 0),(0,C.Cg)([l.observable],R.prototype,"classNames",void 0),(0,C.Cg)([l.observable],R.prototype,"definition",void 0),(0,C.Cg)([l.attr],R.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],R.prototype,"open",void 0),(0,C.Cg)([l.attr],R.prototype,"buttonAppearance",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-disabled",mode:"boolean"})],R.prototype,"hideDisabled",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-menu-single-option",mode:"boolean"})],R.prototype,"hideMenuSingleOption",void 0),(0,C.Cg)([l.observable],R.prototype,"singleOption",void 0);const A=R.compose({baseName:"actions-menu",styles:S,template:I});function L(){return"undefined"!=typeof window&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)}class
|
|
165
|
+
`;class R extends a.FoundationElement{constructor(){super(...arguments),this.isVertical=!1,this.addDefaultActions=!0,this.autoCloseOnAction=!0,this.name="Actions",this.open=!1,this.hideDisabled=!1,this.hideMenuSingleOption=!1}disconnectedCallback(){var e;(null===(e=this.actionsMenu)||void 0===e?void 0:e.matches(":popover-open"))&&this.actionsMenu.hidePopover(),super.disconnectedCallback()}updateMenuPosition(){const e=this.actionsOpener.getBoundingClientRect();this.actionsMenu.style.position="fixed",this.actionsMenu.style.top=`${e.top}px`,this.actionsMenu.style.left="auto",this.actionsMenu.style.right=window.innerWidth-e.right+"px"}definitionChanged(e,t){var i;this.actions=null!==(i=null==t?void 0:t.actions)&&void 0!==i?i:[],delete this.definition.actions,t.buttonText&&(this.name=t.buttonText,delete this.definition.customButtonText),t.isVertical&&(this.isVertical=t.isVertical,delete this.definition.isVertical),t.buttonAppearance&&(this.buttonAppearance=t.buttonAppearance,delete this.definition.buttonAppearance),t.hideMenuSingleOption&&(this.hideMenuSingleOption=t.hideMenuSingleOption,delete this.definition.hideMenuSingleOption)}openChanged(){var e;this.classNames=(0,x.x)(["visible",this.open],["hidden",!this.open]),this.open?(this.updateMenuPosition(),this.actionsMenu.showPopover()):(null===(e=this.actionsMenu)||void 0===e?void 0:e.matches(":popover-open"))&&this.actionsMenu.hidePopover()}toggleActionsMenuVisibility(){this.open=!this.open}onActionMenuItemClick(e){this.autoCloseOnAction&&(this.open=!1),e(this.rowData)}get allActions(){var e;const t=[{name:"✖",callback:()=>this.open=!1}];return this.addDefaultActions?[...null!==(e=this.actions)&&void 0!==e?e:[],...t]:this.actions}get rowData(){if(!this.definition)return;const{node:e,data:t}=this.definition;return(null==e?void 0:e.data)||t}getLabel(e){return"function"==typeof e?e(this.rowData):e}getTemplate(e){if(!this.hideMenuSingleOption)return k(e);const t=this.actions.filter(e=>!e.isDisabled||!e.isDisabled(this.rowData));return this.singleOption=null,0!==t.length?1===t.length?(this.singleOption=t[0],D(e)):k(e):void 0}}(0,C.Cg)([l.observable],R.prototype,"actions",void 0),(0,C.Cg)([(0,l.attr)({attribute:"is-vertical",mode:"boolean"})],R.prototype,"isVertical",void 0),(0,C.Cg)([(0,l.attr)({attribute:"add-default-actions",mode:"boolean"})],R.prototype,"addDefaultActions",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close-on-action",mode:"boolean"})],R.prototype,"autoCloseOnAction",void 0),(0,C.Cg)([l.observable],R.prototype,"classNames",void 0),(0,C.Cg)([l.observable],R.prototype,"definition",void 0),(0,C.Cg)([l.attr],R.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],R.prototype,"open",void 0),(0,C.Cg)([l.attr],R.prototype,"buttonAppearance",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-disabled",mode:"boolean"})],R.prototype,"hideDisabled",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-menu-single-option",mode:"boolean"})],R.prototype,"hideMenuSingleOption",void 0),(0,C.Cg)([l.observable],R.prototype,"singleOption",void 0);const A=R.compose({baseName:"actions-menu",styles:S,template:I});function L(){return"undefined"!=typeof window&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)}class N{getStatus(){return(0,C.sH)(this,void 0,void 0,function*(){return{provider:"none",model:""}})}interpretCriteria(e,t){return(0,C.sH)(this,void 0,void 0,function*(){return null})}}class F{constructor(){this.noopProvider=new N}get(e){return e===F.DEFAULT_NAME?this.noopProvider:void 0}default(){return this.noopProvider}defaultName(){return F.DEFAULT_NAME}names(){return[F.DEFAULT_NAME]}getStatus(e){return(0,C.sH)(this,void 0,void 0,function*(){var t,i,o;return void 0!==e&&e!==F.DEFAULT_NAME?null:null!==(o=yield null===(i=(t=this.noopProvider).getStatus)||void 0===i?void 0:i.call(t))&&void 0!==o?o:null})}listStatuses(){return(0,C.sH)(this,void 0,void 0,function*(){var e,t,i;const o=null!==(i=yield null===(t=(e=this.noopProvider).getStatus)||void 0===t?void 0:t.call(e))&&void 0!==i?i:null;return[{name:F.DEFAULT_NAME,isDefault:!0,status:o}]})}}F.DEFAULT_NAME="default";const M=a.DI.createInterface(e=>e.singleton(F));const _=l.css`
|
|
166
166
|
:host {
|
|
167
167
|
display: block;
|
|
168
168
|
width: 800px;
|
|
@@ -260,7 +260,7 @@
|
|
|
260
260
|
background: var(--neutral-fill-hover);
|
|
261
261
|
color: var(--neutral-foreground-rest);
|
|
262
262
|
}
|
|
263
|
-
`;var H=i(77679);let P=!1;try{"undefined"!=typeof GENX_ENABLE_AI&&(P="true"===GENX_ENABLE_AI)}catch(
|
|
263
|
+
`;var H=i(77679);let P=!1;try{"undefined"!=typeof GENX_ENABLE_AI&&(P="true"===GENX_ENABLE_AI)}catch(cd){}const z=()=>P||(0,H.m4)("ai");var U=i(40729);const B=l.html`
|
|
264
264
|
${e=>{return t=T(e),l.html`
|
|
265
265
|
${(0,l.when)(()=>z(),l.html`
|
|
266
266
|
<div class="ai-criteria-search">
|
|
@@ -523,7 +523,7 @@
|
|
|
523
523
|
`;var t}}
|
|
524
524
|
`;class De extends a.FoundationElement{constructor(){super(...arguments),this.status=null,this.open=!1,this.state="none",this.isInstalling=!1,this.pollTimer=null,this.clickOutside=e=>this.handleClickOutside(e)}get aiProvider(){var e;return null===(e=this.providerRegistry)||void 0===e?void 0:e.default()}get chromeStatusLabel(){var e,t;if("chrome"!==(null===(e=this.status)||void 0===e?void 0:e.provider))return null;const i=null===(t=this.status)||void 0===t?void 0:t.chromeAvailability;return"available"===i?"Installed":"downloading"===i||this.isInstalling?"Downloading…":"downloadable"===i?"Downloadable":"unavailable"===i?"Unavailable":null}get canInstall(){var e,t,i;return!!(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)&&"chrome"===(null===(t=this.status)||void 0===t?void 0:t.provider)&&"downloadable"===(null===(i=this.status)||void 0===i?void 0:i.chromeAvailability)&&!this.isInstalling}get isDownloading(){var e;return"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),yield this.refreshStatus(),this.maybeStartPolling()})}disconnectedCallback(){this.stopPolling(),document.removeEventListener("mousedown",this.clickOutside)}openChanged(){this.open?(document.addEventListener("mousedown",this.clickOutside),this.refreshStatus()):document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){E(e,this)&&(this.open=!1)}toggleDropdown(){this.open=!this.open}refreshStatus(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(!(null===(e=this.aiProvider)||void 0===e?void 0:e.getStatus))return this.status=null,void(this.state="none");try{const e=yield this.aiProvider.getStatus();this.status=e,this.state=this.deriveState(e),"available"===this.state&&(this.isInstalling=!1)}catch(e){this.status=null,this.state="none",this.isInstalling=!1}})}deriveState(e){if(!e||"none"===e.provider)return"none";if("chrome"===e.provider){const t=e.chromeAvailability;return"available"===t?"available":"downloading"===t?"downloading":"downloadable"===t?"downloadable":"unavailable"}return"server"}maybeStartPolling(){var e;"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling?this.startPolling():this.stopPolling()}startPolling(){this.pollTimer||(this.pollTimer=setInterval(()=>{this.refreshStatus().then(()=>{this.maybeStartPolling()})},2500))}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}onInstall(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(this.canInstall&&(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)){this.isInstalling=!0;try{yield this.aiProvider.triggerDownload(),this.startPolling()}catch(e){this.isInstalling=!1}finally{yield this.refreshStatus()}}})}}(0,C.Cg)([M],De.prototype,"providerRegistry",void 0),(0,C.Cg)([l.observable],De.prototype,"status",void 0),(0,C.Cg)([l.observable],De.prototype,"open",void 0),(0,C.Cg)([l.observable],De.prototype,"state",void 0),(0,C.Cg)([l.observable],De.prototype,"isInstalling",void 0),(0,C.Cg)([l.volatile],De.prototype,"chromeStatusLabel",null),(0,C.Cg)([l.volatile],De.prototype,"canInstall",null),(0,C.Cg)([l.volatile],De.prototype,"isDownloading",null);const Ie=De.compose({baseName:"ai-indicator",template:ke,styles:Te}),Re=(e,t)=>l.css`
|
|
525
525
|
${(0,r.anchorStyles)(e,t)}
|
|
526
|
-
`,Ae=(e,t)=>(0,a.anchorTemplate)(e,t);class Le extends r.Anchor{}const
|
|
526
|
+
`,Ae=(e,t)=>(0,a.anchorTemplate)(e,t);class Le extends r.Anchor{}const Ne={delegatesFocus:!0,mode:"open"},Fe={},Me=Le.compose(Object.assign({baseName:"anchor",template:Ae,styles:Re,shadowOptions:Ne},Fe)),_e=(e,t)=>(0,a.anchoredRegionTemplate)(e,t),He=(e,t)=>l.css`
|
|
527
527
|
${(0,r.anchoredRegionStyles)(e,t)}
|
|
528
528
|
`;class Pe extends r.AnchoredRegion{}const ze={delegatesFocus:!0,mode:"open"},Ue={},Be=Pe.compose(Object.assign({baseName:"anchored-region",template:_e,styles:He,shadowOptions:ze},Ue)),Ve=(e,t)=>l.css`
|
|
529
529
|
${(0,r.avatarStyles)(e,t)}
|
|
@@ -644,13 +644,13 @@
|
|
|
644
644
|
${(0,r.buttonStyles)(e,t)}
|
|
645
645
|
`,$t=(e,t)=>(0,a.buttonTemplate)(e,t);class St extends r.Button{}const Et={delegatesFocus:!0,mode:"open"},Ot={},Tt=St.compose(Object.assign({baseName:"button",template:$t,styles:xt,shadowOptions:Et},Ot)),kt=()=>l.css`
|
|
646
646
|
${r.CalendarStyles}
|
|
647
|
-
`,Dt=(e,t)=>(0,a.calendarTemplate)(e,t);class It extends r.Calendar{}const Rt={delegatesFocus:!0,mode:"open"},At={},Lt=It.compose(Object.assign({baseName:"calendar",template:Dt,styles:kt,shadowOptions:Rt},At)),
|
|
647
|
+
`,Dt=(e,t)=>(0,a.calendarTemplate)(e,t);class It extends r.Calendar{}const Rt={delegatesFocus:!0,mode:"open"},At={},Lt=It.compose(Object.assign({baseName:"calendar",template:Dt,styles:kt,shadowOptions:Rt},At)),Nt=(e,t)=>l.css`
|
|
648
648
|
${(0,r.cardStyles)(e,t)}
|
|
649
649
|
:host {
|
|
650
650
|
background-color: var(--fui-card-fill-color);
|
|
651
651
|
color: var(--fui-card-foreground-color);
|
|
652
652
|
}
|
|
653
|
-
`,
|
|
653
|
+
`,Ft=(e,t)=>(0,a.cardTemplate)(e,t);class Mt extends r.Card{}const _t=void 0,Ht={},Pt=Mt.compose(Object.assign({baseName:"card",template:Ft,styles:Nt,shadowOptions:_t},Ht));var zt;!function(e){e.BELOW="below",e.ABOVE="above"}(zt||(zt={}));const Ut=450,Bt=l.css`
|
|
654
654
|
.root {
|
|
655
655
|
position: relative;
|
|
656
656
|
width: 100%;
|
|
@@ -913,7 +913,7 @@
|
|
|
913
913
|
${Vt()}
|
|
914
914
|
`,jt=void 0,Yt={};class Wt extends a.FoundationElement{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=zt.BELOW}openChanged(e,t){var i,o;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.optionsElement)||void 0===i||i.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(o=this.optionsElement)||void 0===o||o.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===zt.ABOVE&&(null===(e=this.optionsElement)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}sortFilteredOptions(e){const t=(null!=e?e:this.options).reduce((e,t)=>{const i=t.type||"Other";return e[i]?e[i].options.push(t):e[i]={type:i,options:[t]},e},{});return Object.values(t)}optionsChanged(){this.filteredAvailableOptions=this.sortFilteredOptions()}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains("content-wrapper");)t=t.parentElement;if(t){const i=t.getBoundingClientRect(),o=this.getBoundingClientRect(),n=i.top+i.height/2;e=o.top<n?zt.BELOW:zt.ABOVE}else{const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<t.height&&o>n?zt.ABOVE:zt.BELOW}}e===zt.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===zt.BELOW&&(this.optionsElement.classList.add("position-below"),this.optionsElement.classList.remove("position-above"))}optionGetter(e){return e.value}getItemLabel(e){let t;return e?(t=e.label||e.value||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){const t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}setFilter(){const e=this.options.filter(e=>{var t;const i=e.description,o=null!==(t=e.label)&&void 0!==t?t:e.value;return(null==i?void 0:i.toLowerCase().includes(this.filterSearchValue.toLowerCase()))||o.toLowerCase().includes(this.filterSearchValue.toLowerCase())?e:void 0});this.filteredAvailableOptions=this.sortFilteredOptions(e)}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){E(e,this)&&(this.open=!1)}}(0,C.Cg)([l.attr],Wt.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],Wt.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Wt.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Wt.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Wt.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Wt.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],Wt.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],Wt.prototype,"open",void 0),(0,C.Cg)([l.observable],Wt.prototype,"options",void 0),(0,C.Cg)([l.observable],Wt.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Wt.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],Wt.prototype,"position",void 0),(0,C.Cg)([l.volatile],Wt.prototype,"getPlaceholder",null);const qt=Wt.compose(Object.assign({baseName:"categorized-multiselect",template:Gt,styles:Bt,shadowOptions:jt},Yt)),Kt=(e,t)=>l.css`
|
|
915
915
|
${(0,r.checkboxStyles)(e,t)}
|
|
916
|
-
`,Xt=(e,t)=>(0,a.checkboxTemplate)(e,t);class Jt extends r.Checkbox{}const Qt=void 0,Zt={checkedIndicator:'\n <svg\n aria-hidden="true"\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '},ei=Jt.compose(Object.assign({baseName:"checkbox",template:Xt,styles:Kt,shadowOptions:Qt},Zt));var ti=i(62051),ii=i.n(ti),oi=i(39087),ni=i(87917),si=i(40370),ai=i(6884),ri=i(96730),li=i(21281),di=i(34193),ci=i(41119),ui=i(57963),hi=i(49964),pi=i(12066),mi=i(97156);class gi extends((0,si.C)(a.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=ai.OD.MAX_ROWS_250,this.maxView=ai.OD.MAX_VIEW_1000,this.resourceName="",this.reverse=!1,this.withTimestampFormatting=!0,this.requiresFullDataRefresh=!0,this.moreRowsAvailable=!1,this.nextRequestOffset=0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new mi.t(new Map),this.fetchGeneration=0}criteriaChanged(e,t){const i=e!==(0,ri.Q)(t,";");this.refetchIfInitializedAndChanged(i)}dataChanged(e){e&&(this.clearData(),this.reset())}requestChanged(e,t){const i=JSON.stringify(e)!==JSON.stringify(t);this.refetchIfInitializedAndChanged(i)}refetchIfInitializedAndChanged(e){this.datasource.initialized&&e&&this.fetchGenesisData(null)}set datasourceConfig(e){e&&Object.keys(e).forEach(t=>{void 0!==e[t]&&(this[t]=e[t])})}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.clearData(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),null===(t=this.update)||void 0===t||t.unsubscribe(),delete this.dataSub,delete this.update,this.datasource.destroy(),delete this.datasource}get effectiveRowId(){var e;return this.rowId?this.rowId:(null===(e=this.datasource)||void 0===e?void 0:e.resourceType)===oi.v.REQUEST_SERVER?ai.OD.REQUEST_SERVER_ROW_ID:ai.OD.DATASERVER_ROW_ID}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(){return(0,C.sH)(this,arguments,void 0,function*(e=!0){var t,i;null===(t=this.dataSub)||void 0===t||t.unsubscribe(),this.dataSub=void 0,this.moreRowsAvailable=!1,this.nextRequestOffset=0,this.fetchGeneration+=1;const o=this.fetchGeneration,n=()=>o!==this.fetchGeneration;if(this.data)return void this.syncComponentData(this.data);const s=e||!this.datasource.initialized;s||(this.connect.dataLogoff(this.sourceRef),this.clearData()),this.sourceRef=void 0;const a=yield this.datasource.init(this.datasourceOptions(),s);if(!n())if(a){if(this.isSnapshot){const e=yield this.datasource.snapshot();if(n())return;const t=this.filterSnapshotResult(e);return this.updateRequestPagingState(e,null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0,this.initialRequestOffset()),void this.syncComponentData(t)}ot.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{if(n())return;e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:"error"}),this.sourceRef=e.SOURCE_REF,"boolean"==typeof e.MORE_ROWS&&(this.moreRowsAvailable=e.MORE_ROWS);const t=e.MESSAGE_TYPE;if(t&&t===li.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,di.d)(e);this.handleStreamUpdate(t)}else this.handleStreamUpdate(e)})}else this.handleError({message:`Genesis Datasource init failed for ${this.resourceName}`,loggerType:"error"})})}initDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){yield this.datasource.init(this.datasourceOptions(),!0)})}canRequestMoreRows(){if(!this.isConnected||!this.datasource||!this.moreRowsAvailable)return!1;switch(this.datasource.resourceType){case oi.v.REQUEST_SERVER:return!0;case oi.v.DATASERVER:return!!this.sourceRef&&!this.dataSubWasLoggedOff;default:return!1}}requestMoreRows(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(this.canRequestMoreRows())try{if(this.datasource.resourceType===oi.v.DATASERVER)return void(yield this.connect.getMoreRows(this.sourceRef));const t=this.fetchGeneration,i=this.nextRequestOffset;this.moreRowsAvailable=!1;const o=yield this.datasource.snapshot({DETAILS:Object.assign(Object.assign({},null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS),{OFFSET:i})});if(t!==this.fetchGeneration)return;const n=Array.isArray(null==o?void 0:o.REPLY)?o.REPLY:[];this.updateRequestPagingState(o,n.length,i),n.length>0&&this.handleStreamInserts(n)}catch(e){throw this.moreRowsAvailable=!0,this.handleError({message:`Failed to request more rows for ${this.resourceName}`,loggerType:"error",loggerArgs:[e]}),e}})}filterSnapshotResult(e){if(e)return Array.isArray(e)?e:e.REPLY?e.REPLY:e.ROW?(0,di.d)(e).inserts:void 0}updateRequestPagingState(e,t,i){if(Array.isArray(e)||!e)return void(this.moreRowsAvailable=!1);const o=e,n=o.NEXT_OFFSET,s="number"==typeof n&&n>i,a=Number(this.maxRows)||0,r=t>0&&a>0&&t>=a;this.moreRowsAvailable="boolean"==typeof o.MORE_ROWS?o.MORE_ROWS:-1!==n&&(s||r),this.nextRequestOffset=s?n:i+t}initialRequestOffset(){var e,t;return Number(null===(t=null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.OFFSET)||0}datasourceOptions(){return{criteria:this.buildCriteria(),fields:this.fields,isSnapshot:this.isSnapshot,orderBy:this.orderBy,resourceName:this.resourceName,request:this.request,reverse:this.reverse,maxRows:this.maxRows,maxView:this.maxView}}handleStreamUpdate(e){if(!e)return;e.hasOwnProperty("REPLY")?this.applyRequestServerData(e):this.applyDataserverData(e)}applyRequestServerData(e){var t,i;if(!Array.isArray(e.REPLY)||!(null===(t=e.MESSAGE_TYPE)||void 0===t?void 0:t.startsWith("REP_")))return void this.handleError({message:"received invalid RequestServerResult",loggerType:"error",loggerArgs:[e]});if(this.requiresFullDataRefresh)return null===(i=e.REPLY)||void 0===i||i.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)}),void this.syncComponentData(Array.from(this.rowsSyncedWithStream.values()));this.handleStreamInserts(e.REPLY);const o=Array.from(this.rowsSyncedWithStream.values()).filter(t=>!e.REPLY.includes(t));this.handleStreamDeletes(o)}applyDataserverData(e){var t,i,o,n;if(this.requiresFullDataRefresh){null===(t=e.inserts)||void 0===t||t.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)});const i=Array.from(this.rowsSyncedWithStream.values());return void this.syncComponentData(i)}(null===(i=e.inserts)||void 0===i?void 0:i.length)>0&&this.handleStreamInserts(e.inserts),(null===(o=e.deletes)||void 0===o?void 0:o.length)>0&&this.handleStreamDeletes(e.deletes),(null===(n=e.updates)||void 0===n?void 0:n.length)>0&&this.handleStreamUpdates(e.updates)}buildCriteria(){var e;const t=(null===(e=this.criteria)||void 0===e?void 0:e.split(";"))||[];return(0,ri.Q)(t.join(" && "),";")}setFilter(e,t){this.criteriaFromFilters.set(e,t),this.update.next(this.criteriaFromFilters)}removeFilter(e){this.criteriaFromFilters.delete(e),this.update.next(this.criteriaFromFilters)}handleError(e={}){const{message:t,loggerType:i,loggerArgs:o=[]}=e;t&&ot[i](t,...o)}getFieldMetadata(e){var t;return null===(t=this.datasource.fieldMetadata)||void 0===t?void 0:t.find(t=>t.name===e)}getDefaultLabelFormat(e,t){return t===ci.w.DATE||t===ci.w.DATETIME?(0,pi.Ey)(e,t===ci.w.DATETIME):e}}function vi(e,t){var i;const o=new j.b;o.withExpression((new G.K).withField(null!==(i=e.labelField)&&void 0!==i?i:e.valueField).withValue(t).withSerialiser(V.n.containsIgnoreCase).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${o.build()}`:e.criteria=o.build()}var fi;(0,C.Cg)([ui.dm],gi.prototype,"connect",void 0),(0,C.Cg)([hi.yW],gi.prototype,"datasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gi.prototype,"withGridInit",void 0),(0,C.Cg)([l.attr],gi.prototype,"criteria",void 0),(0,C.Cg)([l.observable],gi.prototype,"data",void 0),(0,C.Cg)([l.attr],gi.prototype,"fields",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gi.prototype,"isSnapshot",void 0),(0,C.Cg)([l.attr],gi.prototype,"maxRows",void 0),(0,C.Cg)([l.attr],gi.prototype,"maxView",void 0),(0,C.Cg)([l.attr],gi.prototype,"orderBy",void 0),(0,C.Cg)([l.attr],gi.prototype,"request",void 0),(0,C.Cg)([l.attr],gi.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gi.prototype,"reverse",void 0),(0,C.Cg)([l.attr],gi.prototype,"rowId",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],gi.prototype,"withTimestampFormatting",void 0);let bi=fi=class extends gi{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=fi.defaultPageSize,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria="",this.listboxElement=null,this.loadingMoreRows=!1,this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.selectOpenChangeHandler=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.open)&&(this.listboxElement||this.attachListboxScrollListener(),this.topUpVisibleListbox())},this.listboxScrollHandler=()=>{const e=this.listboxElement;e&&this.isNearListboxBottom(e)&&this.loadNextPage()},this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{var t;const i=e.target.value,o=null===(t=this.options)||void 0===t?void 0:t.find(e=>String(e.label)===i);!o&&this.allowCustomOptions&&this.select instanceof r.Combobox?this.select.$emit("value-change",{label:i,value:i}):this.select.$emit("value-change",o)}}initialSelectedValueChanged(e,t){t!==e&&(t?this.select&&this.getDisplayForValue(t)===String(this.select.value||"")||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData()):this.select&&(this.initalSelectedValueInitialized=!1,this.clearData(),this.resetCombobox(),this.fetchData()))}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t,i;if(e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=null!==(i=this.optionElement)&&void 0!==i?i:`${T(this.select)}-option`,this.select.addEventListener("change",this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.infiniteScroll){if(this.isSnapshot=!0,this.maxRows=this.pageSize>0?this.pageSize:fi.defaultPageSize,this.select.addEventListener("open-change",this.selectOpenChangeHandler),yield this.applyInfiniteScrollFetchMode(),!this.isConnected)return;l.DOM.queueUpdate(()=>this.attachListboxScrollListener())}this.fetchData(),this.valueField||ot.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')})}disconnectedCallback(){var e;super.disconnectedCallback(),this.resizeObserver.disconnect(),null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null,this.select.removeEventListener("open-change",this.selectOpenChangeHandler),this.select.removeEventListener("change",this.selectChangeHandler)}applyInfiniteScrollFetchMode(){return(0,C.sH)(this,void 0,void 0,function*(){if(this.resourceName&&this.connect.isConnected)try{const e=yield this.resources.getResourceTypeFor(this.resourceName);this.isSnapshot=e!==oi.v.DATASERVER}catch(e){ot.warn(`Unable to determine the resource type for ${this.resourceName}`,e)}})}attachListboxScrollListener(){var e,t,i,o,n,s,a;this.isConnected&&(null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null!==(n=null!==(i=null===(t=this.select)||void 0===t?void 0:t.scrollableListbox)&&void 0!==i?i:null===(o=this.select)||void 0===o?void 0:o.listbox)&&void 0!==n?n:null===(a=null===(s=this.select)||void 0===s?void 0:s.shadowRoot)||void 0===a?void 0:a.querySelector(".listbox"),this.listboxElement?this.listboxElement.addEventListener("scroll",this.listboxScrollHandler):ot.warn("Unable to locate listbox element, infinite scroll will not be available."))}isNearListboxBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-fi.scrollLoadThresholdPx}loadNextPage(){return(0,C.sH)(this,void 0,void 0,function*(){if(this.loadingMoreRows||!this.canRequestMoreRows())return;this.loadingMoreRows=!0;const e=this.datasource.resourceType===oi.v.REQUEST_SERVER;try{yield this.requestMoreRows()}catch(e){return void(this.loadingMoreRows=!1)}e&&(this.loadingMoreRows=!1)})}topUpVisibleListbox(){this.infiniteScroll&&requestAnimationFrame(()=>{if(!this.isConnected)return;const e=this.listboxElement;e&&0!==e.clientHeight&&this.isNearListboxBottom(e)&&e.scrollHeight!==this.lastTopUpScrollHeight&&(this.lastTopUpScrollHeight=e.scrollHeight,this.loadNextPage())})}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof r.Combobox&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return(0,C.sH)(this,void 0,void 0,function*(){(yield this.datasource.init(this.datasourceOptions(),!0))?function(e,t){const i=new j.b;i.withExpression((new G.K).withField(e.valueField).withValue(t).withSerialiser(V.n.equals).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${i.build()}`:e.criteria=i.build()}(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.rowsSyncedWithStream.clear(),this.options=[],this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.loadingMoreRows=!1,this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof fi||this.select.removeChild(e)}),this.select.value="",this.select.initialValue="")}checkOverflow(e){const t=e.shadowRoot.querySelector(".content");t&&(t.scrollWidth>t.clientWidth?e.setAttribute("title",e.textContent):e.removeAttribute("title"))}rowToOption(e){var t;return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}}renderListboxOptions(e){e.forEach(({value:e,label:t})=>{const i=document.createElement(this.optionElement);i.textContent=t||e,i.value=e,this.select.appendChild(i),this.resizeObserver.observe(i)})}removeEmptyDataOption(){this.emptyDataOption&&(this.emptyDataOption.remove(),this.emptyDataOption=null)}syncComponentData(e){this.loadingMoreRows=!1;const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.removeEmptyDataOption(),this.options=t.map(e=>this.rowToOption(e));const e=0===this.renderedOptionsCount;if(this.renderListboxOptions(this.options.slice(this.renderedOptionsCount)),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox(),!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async&&e){this.resetCombobox();const e=this.getInitialLabel();l.DOM.queueUpdate(()=>{this.select.value=String(e),e&&this.select instanceof r.Combobox&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else if(this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async)&&(this.resetCombobox(),l.DOM.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0),this.select&&!this.emptyDataOption){const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(e),this.emptyDataOption=e}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){var t;if(null==e||0!==e&&!e)return"";const i=null===(t=this.options)||void 0===t?void 0:t.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof r.Combobox?String(i?i.label:e):i?String(i.label):""}resetCombobox(){this.select&&this.select instanceof r.Combobox&&this.select.resetCombobox()}handleStreamInserts(e){var t,i;if(this.loadingMoreRows=!1,!(null==e?void 0:e.length))return;this.removeEmptyDataOption();const o=new Set((null!==(t=this.options)&&void 0!==t?t:[]).map(e=>String(e.value))),n=e.filter(e=>!o.has(String(e[this.valueField])));if(!n.length)return ot.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`),void(this.moreRowsAvailable=!1);const s=n.map(e=>this.rowToOption(e));this.options=[...null!==(i=this.options)&&void 0!==i?i:[],...s],this.renderListboxOptions(s),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox()}handleStreamDeletes(e){ot.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ot.debug("handleStreamUpdates - Method not implemented.")}};bi.defaultPageSize=20,bi.scrollLoadThresholdPx=32,(0,C.Cg)([ni.ME],bi.prototype,"resources",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],bi.prototype,"labelField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"option-element"})],bi.prototype,"optionElement",void 0),(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],bi.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"empty-data-label"})],bi.prototype,"emptyDataLabel",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"allow-custom-options"})],bi.prototype,"allowCustomOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"infinite-scroll"})],bi.prototype,"infiniteScroll",void 0),(0,C.Cg)([(0,l.attr)({attribute:"page-size",converter:l.nullableNumberConverter})],bi.prototype,"pageSize",void 0),(0,C.Cg)([l.observable],bi.prototype,"labelFormatter",void 0),(0,C.Cg)([l.observable],bi.prototype,"labelRowFormatter",void 0),(0,C.Cg)([l.observable],bi.prototype,"initialSelectedValue",void 0),bi=fi=(0,C.Cg)([(0,l.customElement)({name:"options-datasource"})],bi);const yi=(e,t)=>l.css`
|
|
916
|
+
`,Xt=(e,t)=>(0,a.checkboxTemplate)(e,t);class Jt extends r.Checkbox{}const Qt=void 0,Zt={checkedIndicator:'\n <svg\n aria-hidden="true"\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '},ei=Jt.compose(Object.assign({baseName:"checkbox",template:Xt,styles:Kt,shadowOptions:Qt},Zt));var ti=i(62051),ii=i.n(ti),oi=i(39087),ni=i(87917),si=i(40370),ai=i(6884),ri=i(96730),li=i(34193),di=i(21281),ci=i(70002),ui=i(41119),hi=i(57963),pi=i(49964),mi=i(12066),gi=i(97156);class vi extends((0,si.C)(a.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=ai.OD.MAX_ROWS_250,this.maxView=ai.OD.MAX_VIEW_1000,this.resourceName="",this.reverse=!1,this.withTimestampFormatting=!0,this.requiresFullDataRefresh=!0,this.moreRowsAvailable=!1,this.pendingMoreRows=0,this.viewRowCount=0,this.nextRequestOffset=0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new gi.t(new Map),this.fetchGeneration=0}criteriaChanged(e,t){const i=e!==(0,ri.Q)(t,";");this.refetchIfInitializedAndChanged(i)}dataChanged(e){e&&(this.clearData(),this.reset())}requestChanged(e,t){const i=JSON.stringify(e)!==JSON.stringify(t);this.refetchIfInitializedAndChanged(i)}refetchIfInitializedAndChanged(e){this.datasource.initialized&&e&&this.fetchGenesisData(null)}set datasourceConfig(e){e&&Object.keys(e).forEach(t=>{void 0!==e[t]&&(this[t]=e[t])})}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.clearData(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),null===(t=this.update)||void 0===t||t.unsubscribe(),delete this.dataSub,delete this.update,this.datasource.destroy(),delete this.datasource}get effectiveRowId(){var e;return this.rowId?this.rowId:(null===(e=this.datasource)||void 0===e?void 0:e.resourceType)===oi.v.REQUEST_SERVER?ai.OD.REQUEST_SERVER_ROW_ID:ai.OD.DATASERVER_ROW_ID}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(){return(0,C.sH)(this,arguments,void 0,function*(e=!0){var t,i;null===(t=this.dataSub)||void 0===t||t.unsubscribe(),this.dataSub=void 0,this.moreRowsAvailable=!1,this.pendingMoreRows=0,this.serverMoreRows=void 0,this.viewRowCount=0,this.pagingStopped=void 0,this.nextRequestOffset=0,this.fetchGeneration+=1;const o=this.fetchGeneration,n=()=>o!==this.fetchGeneration;if(this.data)return void this.syncComponentData(this.data);const s=e||!this.datasource.initialized;s||(this.connect.dataLogoff(this.sourceRef),this.clearData()),this.sourceRef=void 0;const a=yield this.datasource.init(this.datasourceOptions(),s);if(!n())if(a){if(this.isSnapshot){const e=yield this.datasource.snapshot();if(n())return;const t=this.filterSnapshotResult(e);return this.updateRequestPagingState(e,null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0,this.initialRequestOffset()),void this.syncComponentData(t)}ot.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{if(n())return;e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:"error"}),this.sourceRef=e.SOURCE_REF;const t=e.ROW?(0,li.d)(e):void 0;this.updateStreamPagingState(e,t);const i=e.MESSAGE_TYPE;i&&i===di.Go.LOGOFF_ACK?this.dataSubWasLoggedOff=!0:(this.dataSubWasLoggedOff=!1,t?this.handleStreamUpdate(t):this.handleStreamUpdate(e))})}else this.handleError({message:`Genesis Datasource init failed for ${this.resourceName}`,loggerType:"error"})})}initDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){yield this.datasource.init(this.datasourceOptions(),!0)})}canRequestMoreRows(){if(!this.isConnected||!this.datasource||!this.moreRowsAvailable)return!1;switch(this.datasource.resourceType){case oi.v.REQUEST_SERVER:return!0;case oi.v.DATASERVER:return!!this.sourceRef&&!this.dataSubWasLoggedOff;default:return!1}}requestMoreRows(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(this.canRequestMoreRows())try{if(this.datasource.resourceType===oi.v.DATASERVER)return this.pendingMoreRows+=1,void(yield this.connect.getMoreRows(this.sourceRef));const t=this.fetchGeneration,i=this.nextRequestOffset;this.moreRowsAvailable=!1;const o=yield this.datasource.snapshot({DETAILS:Object.assign(Object.assign({},null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS),{OFFSET:i})});if(t!==this.fetchGeneration)return;const n=Array.isArray(null==o?void 0:o.REPLY)?o.REPLY:[];this.updateRequestPagingState(o,n.length,i),n.length>0&&this.handleStreamInserts(n)}catch(e){throw this.moreRowsAvailable=!0,this.pendingMoreRows=Math.max(0,this.pendingMoreRows-1),this.handleError({message:`Failed to request more rows for ${this.resourceName}`,loggerType:"error",loggerArgs:[e]}),e}})}filterSnapshotResult(e){if(e)return Array.isArray(e)?e:e.REPLY?e.REPLY:e.ROW?(0,li.d)(e).inserts:void 0}updateStreamPagingState(e,t){var i,o,n,s,a;const r="boolean"==typeof(null==e?void 0:e.MORE_ROWS);if(this.datasource.resourceType!==oi.v.DATASERVER)return void(r&&(this.moreRowsAvailable=e.MORE_ROWS));this.viewRowCount=Math.max(0,this.viewRowCount+(null!==(o=null===(i=null==t?void 0:t.inserts)||void 0===i?void 0:i.length)&&void 0!==o?o:0)-(null!==(s=null===(n=null==t?void 0:t.deletes)||void 0===n?void 0:n.length)&&void 0!==s?s:0));let l=!1;if(r&&(l=this.pendingMoreRows>0,this.pendingMoreRows=Math.max(0,this.pendingMoreRows-1),this.serverMoreRows=e.MORE_ROWS),void 0===this.serverMoreRows)return;const d=l&&!0===e.MORE_ROWS&&!(null===(a=e.ROW)||void 0===a?void 0:a.length),c=(0,ci.SG)({moreRows:this.serverMoreRows,emptyReply:d,rowsHeld:this.viewRowCount,maxView:this.maxView});if("more"===c&&"view-full"===this.pagingStopped)this.pagingStopped=void 0;else if(("view-full"===c||"stalled"===c)&&!this.pagingStopped){this.pagingStopped=c;const e=(0,ci.TA)({status:c,resourceName:this.resourceName,rowsHeld:this.viewRowCount,maxView:this.maxView,emptyReply:d,attribute:"maxView"});e&&ot.warn(e)}this.moreRowsAvailable="more"===c&&!this.pagingStopped}updateRequestPagingState(e,t,i){if(Array.isArray(e)||!e)return void(this.moreRowsAvailable=!1);const o=e,n=o.NEXT_OFFSET,s="number"==typeof n&&n>i,a=Number(this.maxRows)||0,r=t>0&&a>0&&t>=a;this.moreRowsAvailable="boolean"==typeof o.MORE_ROWS?o.MORE_ROWS:-1!==n&&(s||r),this.nextRequestOffset=s?n:i+t}initialRequestOffset(){var e,t;return Number(null===(t=null===(e=this.datasource.requestOnlyParams)||void 0===e?void 0:e.DETAILS)||void 0===t?void 0:t.OFFSET)||0}datasourceOptions(){return{criteria:this.buildCriteria(),fields:this.fields,isSnapshot:this.isSnapshot,orderBy:this.orderBy,resourceName:this.resourceName,request:this.request,reverse:this.reverse,maxRows:this.maxRows,maxView:this.maxView}}handleStreamUpdate(e){if(!e)return;e.hasOwnProperty("REPLY")?this.applyRequestServerData(e):this.applyDataserverData(e)}applyRequestServerData(e){var t,i;if(!Array.isArray(e.REPLY)||!(null===(t=e.MESSAGE_TYPE)||void 0===t?void 0:t.startsWith("REP_")))return void this.handleError({message:"received invalid RequestServerResult",loggerType:"error",loggerArgs:[e]});if(this.requiresFullDataRefresh)return null===(i=e.REPLY)||void 0===i||i.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)}),void this.syncComponentData(Array.from(this.rowsSyncedWithStream.values()));this.handleStreamInserts(e.REPLY);const o=Array.from(this.rowsSyncedWithStream.values()).filter(t=>!e.REPLY.includes(t));this.handleStreamDeletes(o)}applyDataserverData(e){var t,i,o,n;if(this.requiresFullDataRefresh){null===(t=e.inserts)||void 0===t||t.forEach(e=>{this.rowsSyncedWithStream.set(e[this.effectiveRowId],e)});const i=Array.from(this.rowsSyncedWithStream.values());return void this.syncComponentData(i)}(null===(i=e.inserts)||void 0===i?void 0:i.length)>0&&this.handleStreamInserts(e.inserts),(null===(o=e.deletes)||void 0===o?void 0:o.length)>0&&this.handleStreamDeletes(e.deletes),(null===(n=e.updates)||void 0===n?void 0:n.length)>0&&this.handleStreamUpdates(e.updates)}buildCriteria(){var e;const t=(null===(e=this.criteria)||void 0===e?void 0:e.split(";"))||[];return(0,ri.Q)(t.join(" && "),";")}setFilter(e,t){this.criteriaFromFilters.set(e,t),this.update.next(this.criteriaFromFilters)}removeFilter(e){this.criteriaFromFilters.delete(e),this.update.next(this.criteriaFromFilters)}handleError(e={}){const{message:t,loggerType:i,loggerArgs:o=[]}=e;t&&ot[i](t,...o)}getFieldMetadata(e){var t;return null===(t=this.datasource.fieldMetadata)||void 0===t?void 0:t.find(t=>t.name===e)}getDefaultLabelFormat(e,t){return t===ui.w.DATE||t===ui.w.DATETIME?(0,mi.Ey)(e,t===ui.w.DATETIME):e}}function fi(e,t){var i;const o=new j.b;o.withExpression((new G.K).withField(null!==(i=e.labelField)&&void 0!==i?i:e.valueField).withValue(t).withSerialiser(V.n.containsIgnoreCase).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${o.build()}`:e.criteria=o.build()}var bi;(0,C.Cg)([hi.dm],vi.prototype,"connect",void 0),(0,C.Cg)([pi.yW],vi.prototype,"datasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vi.prototype,"withGridInit",void 0),(0,C.Cg)([l.attr],vi.prototype,"criteria",void 0),(0,C.Cg)([l.observable],vi.prototype,"data",void 0),(0,C.Cg)([l.attr],vi.prototype,"fields",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vi.prototype,"isSnapshot",void 0),(0,C.Cg)([l.attr],vi.prototype,"maxRows",void 0),(0,C.Cg)([l.attr],vi.prototype,"maxView",void 0),(0,C.Cg)([l.attr],vi.prototype,"orderBy",void 0),(0,C.Cg)([l.attr],vi.prototype,"request",void 0),(0,C.Cg)([l.attr],vi.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],vi.prototype,"reverse",void 0),(0,C.Cg)([l.attr],vi.prototype,"rowId",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],vi.prototype,"withTimestampFormatting",void 0);let yi=bi=class extends vi{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.infiniteScroll=!1,this.pageSize=bi.defaultPageSize,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria="",this.listboxElement=null,this.loadingMoreRows=!1,this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.selectOpenChangeHandler=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.open)&&(this.listboxElement||this.attachListboxScrollListener(),this.topUpVisibleListbox())},this.listboxScrollHandler=()=>{const e=this.listboxElement;e&&this.isNearListboxBottom(e)&&this.loadNextPage()},this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{var t;const i=e.target.value,o=null===(t=this.options)||void 0===t?void 0:t.find(e=>String(e.label)===i);!o&&this.allowCustomOptions&&this.select instanceof r.Combobox?this.select.$emit("value-change",{label:i,value:i}):this.select.$emit("value-change",o)}}initialSelectedValueChanged(e,t){t!==e&&(t?this.select&&this.getDisplayForValue(t)===String(this.select.value||"")||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData()):this.select&&(this.initalSelectedValueInitialized=!1,this.clearData(),this.resetCombobox(),this.fetchData()))}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t,i;if(e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=null!==(i=this.optionElement)&&void 0!==i?i:`${T(this.select)}-option`,this.select.addEventListener("change",this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.infiniteScroll){if(this.isSnapshot=!0,this.maxRows=this.pageSize>0?this.pageSize:bi.defaultPageSize,this.select.addEventListener("open-change",this.selectOpenChangeHandler),yield this.applyInfiniteScrollFetchMode(),!this.isConnected)return;l.DOM.queueUpdate(()=>this.attachListboxScrollListener())}this.fetchData(),this.valueField||ot.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')})}disconnectedCallback(){var e;super.disconnectedCallback(),this.resizeObserver.disconnect(),null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null,this.select.removeEventListener("open-change",this.selectOpenChangeHandler),this.select.removeEventListener("change",this.selectChangeHandler)}applyInfiniteScrollFetchMode(){return(0,C.sH)(this,void 0,void 0,function*(){if(this.resourceName&&this.connect.isConnected)try{const e=yield this.resources.getResourceTypeFor(this.resourceName);this.isSnapshot=e!==oi.v.DATASERVER}catch(e){ot.warn(`Unable to determine the resource type for ${this.resourceName}`,e)}})}attachListboxScrollListener(){var e,t,i,o,n,s,a;this.isConnected&&(null===(e=this.listboxElement)||void 0===e||e.removeEventListener("scroll",this.listboxScrollHandler),this.listboxElement=null!==(n=null!==(i=null===(t=this.select)||void 0===t?void 0:t.scrollableListbox)&&void 0!==i?i:null===(o=this.select)||void 0===o?void 0:o.listbox)&&void 0!==n?n:null===(a=null===(s=this.select)||void 0===s?void 0:s.shadowRoot)||void 0===a?void 0:a.querySelector(".listbox"),this.listboxElement?this.listboxElement.addEventListener("scroll",this.listboxScrollHandler):ot.warn("Unable to locate listbox element, infinite scroll will not be available."))}isNearListboxBottom(e){return e.scrollTop+e.clientHeight>=e.scrollHeight-bi.scrollLoadThresholdPx}loadNextPage(){return(0,C.sH)(this,void 0,void 0,function*(){if(this.loadingMoreRows||!this.canRequestMoreRows())return;this.loadingMoreRows=!0;const e=this.datasource.resourceType===oi.v.REQUEST_SERVER;try{yield this.requestMoreRows()}catch(e){return void(this.loadingMoreRows=!1)}e&&(this.loadingMoreRows=!1)})}topUpVisibleListbox(){this.infiniteScroll&&requestAnimationFrame(()=>{if(!this.isConnected)return;const e=this.listboxElement;e&&0!==e.clientHeight&&this.isNearListboxBottom(e)&&e.scrollHeight!==this.lastTopUpScrollHeight&&(this.lastTopUpScrollHeight=e.scrollHeight,this.loadNextPage())})}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof r.Combobox&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return(0,C.sH)(this,void 0,void 0,function*(){(yield this.datasource.init(this.datasourceOptions(),!0))?function(e,t){const i=new j.b;i.withExpression((new G.K).withField(e.valueField).withValue(t).withSerialiser(V.n.equals).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${i.build()}`:e.criteria=i.build()}(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.rowsSyncedWithStream.clear(),this.options=[],this.renderedOptionsCount=0,this.lastTopUpScrollHeight=-1,this.emptyDataOption=null,this.loadingMoreRows=!1,this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof bi||this.select.removeChild(e)}),this.select.value="",this.select.initialValue="")}checkOverflow(e){const t=e.shadowRoot.querySelector(".content");t&&(t.scrollWidth>t.clientWidth?e.setAttribute("title",e.textContent):e.removeAttribute("title"))}rowToOption(e){var t;return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}}renderListboxOptions(e){e.forEach(({value:e,label:t})=>{const i=document.createElement(this.optionElement);i.textContent=t||e,i.value=e,this.select.appendChild(i),this.resizeObserver.observe(i)})}removeEmptyDataOption(){this.emptyDataOption&&(this.emptyDataOption.remove(),this.emptyDataOption=null)}syncComponentData(e){this.loadingMoreRows=!1;const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.removeEmptyDataOption(),this.options=t.map(e=>this.rowToOption(e));const e=0===this.renderedOptionsCount;if(this.renderListboxOptions(this.options.slice(this.renderedOptionsCount)),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox(),!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async&&e){this.resetCombobox();const e=this.getInitialLabel();l.DOM.queueUpdate(()=>{this.select.value=String(e),e&&this.select instanceof r.Combobox&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else if(this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async)&&(this.resetCombobox(),l.DOM.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0),this.select&&!this.emptyDataOption){const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(e),this.emptyDataOption=e}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){var t;if(null==e||0!==e&&!e)return"";const i=null===(t=this.options)||void 0===t?void 0:t.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof r.Combobox?String(i?i.label:e):i?String(i.label):""}resetCombobox(){this.select&&this.select instanceof r.Combobox&&this.select.resetCombobox()}handleStreamInserts(e){var t,i;if(this.loadingMoreRows=!1,!(null==e?void 0:e.length))return;this.removeEmptyDataOption();const o=new Set((null!==(t=this.options)&&void 0!==t?t:[]).map(e=>String(e.value))),n=e.filter(e=>!o.has(String(e[this.valueField])));if(!n.length)return ot.warn(`Infinite scroll for ${this.resourceName} received a page of options that were all already loaded, so paging has stopped. Request Server resources only honour OFFSET when declared with criteriaOnlyRequest; otherwise every page returns the same rows. Also set a stable order-by so pages cannot overlap.`),void(this.moreRowsAvailable=!1);const s=n.map(e=>this.rowToOption(e));this.options=[...null!==(i=this.options)&&void 0!==i?i:[],...s],this.renderListboxOptions(s),this.renderedOptionsCount=this.options.length,this.nextRequestOffset=Math.max(this.nextRequestOffset,this.renderedOptionsCount),this.topUpVisibleListbox()}handleStreamDeletes(e){ot.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ot.debug("handleStreamUpdates - Method not implemented.")}};yi.defaultPageSize=20,yi.scrollLoadThresholdPx=32,(0,C.Cg)([ni.ME],yi.prototype,"resources",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],yi.prototype,"labelField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"option-element"})],yi.prototype,"optionElement",void 0),(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],yi.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"empty-data-label"})],yi.prototype,"emptyDataLabel",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"allow-custom-options"})],yi.prototype,"allowCustomOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"infinite-scroll"})],yi.prototype,"infiniteScroll",void 0),(0,C.Cg)([(0,l.attr)({attribute:"page-size",converter:l.nullableNumberConverter})],yi.prototype,"pageSize",void 0),(0,C.Cg)([l.observable],yi.prototype,"labelFormatter",void 0),(0,C.Cg)([l.observable],yi.prototype,"labelRowFormatter",void 0),(0,C.Cg)([l.observable],yi.prototype,"initialSelectedValue",void 0),yi=bi=(0,C.Cg)([(0,l.customElement)({name:"options-datasource"})],yi);const wi=(e,t)=>l.css`
|
|
917
917
|
.combo-box-indicator {
|
|
918
918
|
transition-property: transform;
|
|
919
919
|
transition-duration: 0.2s;
|
|
@@ -925,7 +925,7 @@
|
|
|
925
925
|
}
|
|
926
926
|
|
|
927
927
|
${(0,r.comboboxStyles)(e,t)}
|
|
928
|
-
`,
|
|
928
|
+
`,Ci=(e,t)=>l.html`
|
|
929
929
|
<template
|
|
930
930
|
aria-activedescendant="${e=>e.activeDescendant}"
|
|
931
931
|
class="${e=>e.open?"open":""} ${e=>e.disabled?"disabled":""} ${e=>e.position}"
|
|
@@ -979,7 +979,7 @@
|
|
|
979
979
|
></slot>
|
|
980
980
|
</div>
|
|
981
981
|
</template>
|
|
982
|
-
`;var
|
|
982
|
+
`;var xi,$i;class Si extends r.Combobox{constructor(){super(...arguments),xi.set(this,void 0),$i.set(this,!1),this.needManualChangeEventDispatch=!1,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.filterMode="startsWith",this.scrollToSelectedWhenOpening=!1,this.scrollToSelectedWhenOpeningOptions={behavior:"auto",block:"nearest"},this.scrollWhenSelectionChanges=!1,this.scrollWhenSelectionChangesOptions={behavior:"auto",block:"center"},this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value="",this.control.value="",this.filter="",this.filterOptions()}}get activeDescendant(){var e,t;if(this.selectedOptions&&0!==this.selectedOptions.length)return this.ariaActiveDescendant=null===(e=this.selectedOptions[0])||void 0===e?void 0:e.id,null===(t=this.selectedOptions[0])||void 0===t?void 0:t.id}debounceChanged(e,t){this.debouncedInputHandler=ii()(this.asyncSetFilter,t)}get scrollableListbox(){var e,t;return null!==(e=this.listbox)&&void 0!==e?e:null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".listbox")}openChanged(){super.openChanged(),this.$emit("open-change",{open:this.open}),this.open?this.scrollToSelectedWhenOpening&&setTimeout(()=>{const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollToSelectedWhenOpeningOptions)},500):(this.manuallyDispatchChangeEvent(),this.filter="",this.filterOptions())}get value(){return l.Observable.track(this,"value"),this._ourValue}set value(e){var t,i,o;if(void 0===e)return;const n=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){const n=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===String(e).toLowerCase(),s=this.options?this.options.findIndex(n):-1,a=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,r=null===(i=this.options[s])||void 0===i?void 0:i.text;this.selectedIndex=r&&r!==a?s:this.selectedIndex,e&&""!==e.trim()&&-1===s&&(e=(null===(o=this.firstSelectedOption)||void 0===o?void 0:o.text)||e)}n!==e&&(this._ourValue=e,super.valueChanged(n,e),l.Observable.notify(this,"value"))}slottedOptionsChanged(e,t){this.enableAsyncForInfiniteScrollDatasource(),super.slottedOptionsChanged(e,t),this.updateValue(!1)}enableAsyncForInfiniteScrollDatasource(){var e;if(this.async)return;const t=null===(e=this.slottedDatasource)||void 0===e?void 0:e.assignedNodes().find(e=>e instanceof yi);(null==t?void 0:t.infiniteScroll)&&(this.async=!0)}filterOptions(){if(this.async)return this.filteredOptions=[...this._options],void this._options.forEach(e=>e.hidden=!1);this.autocomplete&&this.autocomplete!==a.ComboboxAutocomplete.none||(this.filter="");const e=this.filter,t=this.caseSensitive?e:e.toLowerCase();this.filteredOptions=this._options.filter(e=>{const i=this.caseSensitive?e.text:e.text.toLowerCase();return"contains"===this.filterMode?i.includes(t):i.startsWith(t)}),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled)if(E(e,this))this.open=!1;else{if(O(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!O(e,this.control))return super.clickHandler(e)}}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":if((0,C.GG)(this,$i,this.open,"f"),!this.open)return this.open=!0,!0;break;case"ArrowDown":case"ArrowUp":if(!this.open)return this.open=!0,!0;if(this.scrollWhenSelectionChanges){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollWhenSelectionChangesOptions)}break;case"Escape":if(this.control.value!==this.currentValue)return this.filter="",this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),void(this.open=!1);if(!this.open)return!0}const i=super.keydownHandler(e);return"Enter"!==t?i:void 0}keyupHandler(e){var t;const i=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(i){case"Enter":return!(0,C.gn)(this,$i,"f");case"ArrowDown":case"ArrowUp":this.open&&this.firstSelectedOption&&this.autocomplete===a.ComboboxAutocomplete.both&&(this.needManualChangeEventDispatch=!0,this.currentValue=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value);break;case"Home":case"End":return;case"Backspace":case"Delete":const i=super.keyupHandler(e);return this.selectItemByValue(this.control.value),i}return super.keyupHandler(e)}get indicator(){return(0,C.gn)(this,xi,"f")||(0,C.GG)(this,xi,this.shadowRoot.querySelector('[part="indicator"]'),"f"),(0,C.gn)(this,xi,"f")}selectItemByValue(e){var t,i,o;this.selectedIndex=null!==(i=null===(t=this.options)||void 0===t?void 0:t.findIndex(t=>t.text===e))&&void 0!==i?i:-1,null===(o=this.options)||void 0===o||o.forEach((e,t)=>e.selected=t===this.selectedIndex)}inputHandler(e){this.async?(this.selectedIndex=this.options.map(e=>e.text).indexOf(this.control.value),this.debouncedInputHandler()):super.inputHandler(e)}asyncSetFilter(){const e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof yi);if(t.length>0){const i=t[0];null==e||""===e?i.criteria=i.baseCriteria||"":fi(i,e),l.DOM.queueUpdate(()=>{this.control.value=e})}else ot.warn("Options-datasource is not connected. Please add a datasource to use this functionality.")}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===a.ComboboxAutocomplete.both&&(this.dispatchEvent(new Event("change",{bubbles:!0})),this.needManualChangeEventDispatch=!1)}}xi=new WeakMap,$i=new WeakMap,(0,C.Cg)([l.observable],Si.prototype,"activeDescendant",null),(0,C.Cg)([l.observable],Si.prototype,"slottedDatasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Si.prototype,"async",void 0),(0,C.Cg)([l.attr],Si.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"case-sensitive"})],Si.prototype,"caseSensitive",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"ignore-input-click"})],Si.prototype,"ignoreInputClick",void 0),(0,C.Cg)([(0,l.attr)({attribute:"filter-mode"})],Si.prototype,"filterMode",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-to-selected-when-opening"})],Si.prototype,"scrollToSelectedWhenOpening",void 0),(0,C.Cg)([l.observable],Si.prototype,"scrollToSelectedWhenOpeningOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-when-selection-changes"})],Si.prototype,"scrollWhenSelectionChanges",void 0),(0,C.Cg)([l.observable],Si.prototype,"scrollWhenSelectionChangesOptions",void 0);const Ei={delegatesFocus:!0,mode:"open"},Oi={indicator:'\n <svg\n class="combo-box-indicator"\n part="combo-box-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '},Ti=Si.compose(Object.assign({baseName:"combobox",template:Ci,styles:wi,shadowOptions:Ei},Oi));var ki=i(98316);const Di=(e,t)=>l.css`
|
|
983
983
|
:host {
|
|
984
984
|
--light-size: 12px;
|
|
985
985
|
--height: calc(var(--design-unit) * 2px + var(--light-size));
|
|
@@ -1027,18 +1027,18 @@
|
|
|
1027
1027
|
text-overflow: ellipsis;
|
|
1028
1028
|
white-space: nowrap;
|
|
1029
1029
|
}
|
|
1030
|
-
`,
|
|
1030
|
+
`,Ii=l.html`
|
|
1031
1031
|
<div class=${e=>(0,x.x)(["light",!0],[e.colour,!0])}></div>
|
|
1032
1032
|
${(0,l.when)(e=>e.showLabel,l.html`
|
|
1033
1033
|
<div class="label">${e=>e.label}</div>
|
|
1034
1034
|
`)}
|
|
1035
|
-
`;class
|
|
1035
|
+
`;class Ri extends a.FoundationElement{constructor(){super(...arguments),this.showLabel=!1,this.label="disconnected",this.colour="red"}connectedCallback(){super.connectedCallback(),this.subscription=this.connect.isConnectedSubject.subscribe(e=>{this.label=this.getLabel(e),this.colour=e?"green":"red"})}disconnectedCallback(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}getLabel(e){if(!e)return"disconnected";return`${this.session.getSessionStorageItem("hostUrl")} ✔`}}(0,C.Cg)([hi.dm],Ri.prototype,"connect",void 0),(0,C.Cg)([ki.N],Ri.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-label"})],Ri.prototype,"showLabel",void 0),(0,C.Cg)([l.observable],Ri.prototype,"label",void 0),(0,C.Cg)([l.observable],Ri.prototype,"colour",void 0);const Ai=Ri.compose({baseName:"connection-indicator",template:Ii,styles:Di}),Li=(e,t)=>l.css`
|
|
1036
1036
|
${(0,r.dataGridStyles)(e,t)}
|
|
1037
|
-
`,
|
|
1037
|
+
`,Ni=(e,t)=>(0,a.dataGridTemplate)(e,t);class Fi extends r.DataGrid{}const Mi=void 0,_i={},Hi=Fi.compose(Object.assign({baseName:"data-grid",template:Ni,styles:Li,shadowOptions:Mi},_i)),Pi=(e,t)=>l.css`
|
|
1038
1038
|
${(0,r.dataGridCellStyles)(e,t)}
|
|
1039
|
-
`;class
|
|
1039
|
+
`;class zi extends r.DataGridCell{}const Ui=void 0,Bi={},Vi=zi.compose(Object.assign({baseName:"data-grid-cell",template:a.dataGridCellTemplate,styles:Pi,shadowOptions:Ui},Bi)),Gi=(e,t)=>l.css`
|
|
1040
1040
|
${(0,r.dataGridRowStyles)(e,t)}
|
|
1041
|
-
`;class
|
|
1041
|
+
`;class ji extends r.DataGridRow{}const Yi=void 0,Wi={},qi=ji.compose(Object.assign({baseName:"data-grid-row",template:a.dataGridRowTemplate,styles:Gi,shadowOptions:Yi},Wi));var Ki=i(94343),Xi=i.n(Ki),Ji=i(58915),Qi=i.n(Ji),Zi=i(7554),eo=i.n(Zi),to=i(49916),io=i.n(to),oo=i(33839),no=i.n(oo);class so{constructor(e,t="default"){e=null!=e?e:new Date,this.Date=e,this.date=e.getDate(),this.day=e.toLocaleString(t,{weekday:"long"}),this.dayNumber=e.getDay()+1,this.dayShort=e.toLocaleString(t,{weekday:"short"}),this.year=e.getFullYear(),this.yearShort=Number(e.toLocaleString(t,{year:"2-digit"})),this.month=e.toLocaleString(t,{month:"long"}),this.monthShort=e.toLocaleString(t,{month:"short"}),this.monthNumber=e.getMonth()+1,this.timestamp=e.getTime()}}Xi().extend(no());class ao{constructor(e=null,t="default"){const i=new so(e,t);this.lang=t,this.name=i.month,this.number=i.monthNumber,this.year=i.year,this.numberOfDays=[31,28,31,30,31,30,31,31,30,31,30,31][this.number-1],2===this.number&&(this.numberOfDays+=Xi()(i.date).isLeapYear()?1:0)}getDay(e){return new so(new Date(this.year,this.number-1,e),this.lang)}}Xi().extend(no());class ro{constructor(e=null,t=null,i="default"){this.weekDays=Array.from({length:7}),this.today=new so(null,i),this.year=null!=e?e:this.today.year,this.month=new ao(new Date(this.year,(t||this.today.monthNumber)-1),i),this.lang=i,this.weekDays.forEach((e,t)=>{const i=this.month.getDay(t);this.weekDays[i.dayNumber-1]=i.day})}getMonth(e){return new ao(new Date(this.year,e-1),this.lang)}getPreviousMonth(){return 1===this.month.number?new ao(new Date(this.year-1,11),this.lang):new ao(new Date(this.year,this.month.number-2),this.lang)}getNextMonth(){return 1===this.month.number?new ao(new Date(this.year+1,0),this.lang):new ao(new Date(this.year,this.month.number+2),this.lang)}goToDate(e,t){this.month=new ao(new Date(t,e-1),this.lang),this.year=t}goToNextYear(){this.year+=1,this.month=new ao(new Date(this.year,0),this.lang)}goToPreviousYear(){this.year-=1,this.month=new ao(new Date(this.year,11),this.lang)}goToNextMonth(){if(12===this.month.number)return this.goToNextYear();this.month=new ao(new Date(this.year,this.month.number+1-1),this.lang)}goToPreviousMonth(){if(1===this.month.number)return this.goToPreviousYear();this.month=new ao(new Date(this.year,this.month.number-1-1),this.lang)}}const lo=l.css`
|
|
1042
1042
|
:host {
|
|
1043
1043
|
position: relative;
|
|
1044
1044
|
}
|
|
@@ -1194,7 +1194,7 @@
|
|
|
1194
1194
|
.date-toggle[readonly] .label {
|
|
1195
1195
|
cursor: pointer;
|
|
1196
1196
|
}
|
|
1197
|
-
`,
|
|
1197
|
+
`,co=[1,7],uo=e=>l.html`
|
|
1198
1198
|
<${e}-text-field
|
|
1199
1199
|
data-test-id="date-picker"
|
|
1200
1200
|
readonly
|
|
@@ -1221,7 +1221,7 @@
|
|
|
1221
1221
|
</div>
|
|
1222
1222
|
<div class="week-days ${e=>(0,x.x)(["hide-weekends",e.hideWeekends])}">
|
|
1223
1223
|
${(0,l.repeat)(e=>{var t;return null===(t=e.calendar)||void 0===t?void 0:t.weekDays},l.html`
|
|
1224
|
-
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===
|
|
1224
|
+
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===co.indexOf(t.index+1),l.html`
|
|
1225
1225
|
<span
|
|
1226
1226
|
class="${(e,t)=>(0,x.x)(["disabled",-1!==t.parent.disabledDaysOfWeek.indexOf(t.index+1)])}"
|
|
1227
1227
|
>
|
|
@@ -1232,7 +1232,7 @@
|
|
|
1232
1232
|
</div>
|
|
1233
1233
|
<div class="month-days ${e=>(0,x.x)(["hide-weekends",e.hideWeekends])}">
|
|
1234
1234
|
${(0,l.repeat)(e=>e.monthList,l.html`
|
|
1235
|
-
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===
|
|
1235
|
+
${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===co.indexOf(e.dayNumber),l.html`
|
|
1236
1236
|
<button
|
|
1237
1237
|
?disabled="${(e,t)=>-1!==t.parent.disabledDaysOfWeek.indexOf(e.dayNumber)}"
|
|
1238
1238
|
class="month-day
|
|
@@ -1247,44 +1247,44 @@
|
|
|
1247
1247
|
</div>
|
|
1248
1248
|
<slot name="bottom"></slot>
|
|
1249
1249
|
</div>
|
|
1250
|
-
`,
|
|
1251
|
-
${e=>
|
|
1252
|
-
`;i(8420);function ho(e){const t=((null==e?void 0:e.trim())||"en").toLowerCase().replace(/_/g,"-");return"en-us"===t||"en"===t?"en":"en-gb"===t?"en-gb":t}function po(){return"undefined"!=typeof navigator&&navigator.language?navigator.language:"en"}function mo(e="en"){const t=ho(e),i=Ki()().locale(t),o=i.locale();return(n=t)!==(s=o)&&s!==n.split("-")[0]?Ki()().locale("en").localeData().longDateFormat("L")||"MM/DD/YYYY":i.localeData().longDateFormat("L")||"MM/DD/YYYY";var n,s}function go(e){return e.replace(/YYYY/g,"yyyy").replace(/YY(?!Y)/g,"yy").replace(/DD/g,"dd").replace(/D(?!D)/g,"d").replace(/MM/g,"mm").replace(/M(?!M)/g,"m")}function vo(e){return null!=e&&""!==String(e).trim()}Ki().extend(Ji()),Ki().extend(Zi()),Ki().extend(to());const fo="MM-DD-YYYY";function bo(e,t){const i=String(e).trim(),o=Ki()(i,t,!0);if(o.isValid())return o;const n=Ki()(i,fo,!0);return n.isValid()?n:null}var yo=i(28745);const wo=[1,2,3,4,5,6,7],Co=(e,t,i)=>{if(o=t,-1===e.indexOf(o.dayNumber))return t;var o;const n=wo.filter(t=>-1===e.indexOf(t));let s=n.find(e=>e>t.dayNumber);s||(s=Math.min(...n));const a=t.dayNumber<s?s-t.dayNumber:s-t.dayNumber+7;return n.length?new no(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,a),i):(yo.v.warn("Date picker disabled days - all days of week have been disabled"),t)},xo=void 0,$o={};class So extends a.FoundationElement{constructor(){super(...arguments),this.format=fo,this.lang="en-US",this.visible=!1,this.position="bottom",this.disabledDaysOfWeek=[],this.suppressValueChanged=!1,this.cachedFormat=fo,this.clickOutside=e=>this.handleClickOutside(e),this.keydownOutside=e=>this.handleKeydownOutside(e)}formatChanged(e,t){!this.useLocaleFormat&&t&&this.cacheUserFormat(t),t&&this.calendar&&vo(this.value)&&(this.formatDate=Ki()(this.currentDate.Date).format(t))}langChanged(){this.applyEffectiveLangChange()}useLocaleFormatChanged(e,t){this.calendar&&(t&&!e?this.cacheUserFormat(this.format):!t&&e&&this.restoreUserFormat(),this.applyEffectiveLangChange())}inlineCalendarChanged(){this.inlineCalendar?(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)):this.visible&&(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)),this.toggleVisibility()}hideWeekendsCalendarChanged(){this.toggleVisibility()}valueChanged(e,t){this.suppressValueChanged||this.calendar&&(vo(t)?this.applyValue(t):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate())}disconnectedCallback(){document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside),super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),Ki().extend(Ji()),Ki().extend(to()),Ki().extend(Zi()),this.substringNumber=3,this.useLocaleFormat&&(this.cacheUserFormat(this.format),this.applyLocaleFormat());const e=this.value;!this.allowEmpty||vo(e)?vo(e)?this.applyValue(e):this.initializeWithDefaultDate():this.initializeEmpty()}clear(){this.allowEmpty&&this.clearToEmpty(!0)}get inputValue(){return vo(this.value)?this.formatDate:""}get inputPlaceholder(){var e;return!this.allowEmpty||vo(this.value)?"":(null===(e=this.placeholder)||void 0===e?void 0:e.trim())||go(this.format)}get effectiveLang(){return this.useLocaleFormat&&!this.hasAttribute("lang")?po():this.lang}applyLocaleFormat(){this.format=mo(this.effectiveLang)}cacheUserFormat(e){const t=null==e?void 0:e.trim();t&&(this.cachedFormat=t)}restoreUserFormat(){this.format=this.cachedFormat}applyEffectiveLangChange(){var e,t;if(!this.calendar)return;this.useLocaleFormat&&this.applyLocaleFormat();const i=this.calendar.year,o=this.calendar.month.number,n=null!==(t=null===(e=this.currentDate)||void 0===e?void 0:e.Date)&&void 0!==t?t:Ki()().toDate();this.currentDate=new no(n,this.effectiveLang),this.calendar=new ao(i,o,this.effectiveLang),vo(this.value)&&(this.formatDate=Ki()(this.currentDate.Date).format(this.format)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}syncValueAttribute(e){this.suppressValueChanged=!0,this.value=e,this.suppressValueChanged=!1}initializeEmpty(){const e=Ki()();this.currentDate=new no(e.toDate(),this.effectiveLang),this.calendar=new ao(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate="",this.syncValueAttribute(""),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}initializeWithDefaultDate(){this.resetToDefaultDate(!0)}resetToDefaultDate(e=!1){var t;let i=new no(Ki()().toDate(),this.effectiveLang);(null===(t=this.disabledDaysOfWeek)||void 0===t?void 0:t.length)&&(i=Co(this.disabledDaysOfWeek,i,this.effectiveLang)),this.currentDate=i,e||!this.calendar?this.calendar=new ao(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang):this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=Ki()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Ki()(this.currentDate.Date).format(fo)),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}applyValue(e){const t=bo(e,this.format);t?(this.currentDate=new no(t.toDate(),this.effectiveLang),this.calendar?this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year):this.calendar=new ao(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate=Ki()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Ki()(this.currentDate.Date).format(fo)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate()}clearToEmpty(e){const t=Ki()();this.currentDate=new no(t.toDate(),this.effectiveLang),this.calendar&&(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()),this.formatDate="",this.syncValueAttribute(""),e&&this.$emit("value-changed",void 0)}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}visibleChanged(e,t){this.inlineCalendar||(t?(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)):(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)))}handleKeydownOutside(e){!this.inlineCalendar&&this.visible&&"Escape"===e.key&&(e.preventDefault(),this.closeCalendar())}handleClickOutside(e){!this.inlineCalendar&&this.visible&&E(e,this)&&this.closeCalendar()}closeCalendar(){this.visible&&(this.visible=!1,this.toggleVisibility())}toggleCalendar(){this.visible=!this.visible,this.toggleVisibility(),this.isCurrentCalendarMonth()||(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText())}toggleVisibility(){this.calendarDropdownClasses=(0,x.x)(["visible",this.visible],this.position,["inline",this.inlineCalendar],["hide-weekends",this.hideWeekends])}isSelectedDate(e){return!(this.allowEmpty&&!vo(this.value))&&Ki()(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){Ki()(e.Date).isSame(this.currentDate.Date,"day")&&vo(this.value)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=Ki()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Ki()(e.Date).format(fo)),this.$emit("value-changed",this.value),this.toggleCalendar())}getMonthDaysGrid(){const e=this.calendar.month.getDay(1),t=this.calendar.getPreviousMonth(),i=e.dayNumber-1,o=this.calendar.month.numberOfDays+i,n=Array.from({length:o});for(let e=i;e<o;e+=1)n[e]=this.calendar.month.getDay(e+1-i);for(let e=0;e<i;e+=1){const o=i-(e+1);n[e]=t.getDay(t.numberOfDays-o)}return n}}(0,C.Cg)([l.attr],So.prototype,"format",void 0),(0,C.Cg)([l.attr],So.prototype,"lang",void 0),(0,C.Cg)([(0,l.attr)({attribute:"use-locale-format",mode:"boolean"})],So.prototype,"useLocaleFormat",void 0),(0,C.Cg)([l.attr],So.prototype,"visible",void 0),(0,C.Cg)([(0,l.attr)({attribute:"inline-calendar",mode:"boolean"})],So.prototype,"inlineCalendar",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-weekends",mode:"boolean"})],So.prototype,"hideWeekends",void 0),(0,C.Cg)([l.attr],So.prototype,"position",void 0),(0,C.Cg)([l.attr],So.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-empty",mode:"boolean"})],So.prototype,"allowEmpty",void 0),(0,C.Cg)([l.attr],So.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],So.prototype,"value",void 0),(0,C.Cg)([l.observable],So.prototype,"currentDate",void 0),(0,C.Cg)([l.observable],So.prototype,"currentMonth",void 0),(0,C.Cg)([l.observable],So.prototype,"currentYear",void 0),(0,C.Cg)([l.observable],So.prototype,"calendarDropdownClasses",void 0),(0,C.Cg)([l.observable],So.prototype,"formatDate",void 0),(0,C.Cg)([l.observable],So.prototype,"monthList",void 0),(0,C.Cg)([l.observable],So.prototype,"disabledDaysOfWeek",void 0),(0,C.Cg)([l.observable],So.prototype,"calendar",void 0);const Eo=So.compose(Object.assign({baseName:"date-picker",styles:ro,template:uo,shadowOptions:xo},$o));var Oo=i(83912);const To=r.SwatchRGB.create(1,1,1),ko=r.SwatchRGB.create(0,0,0),Do=(0,Oo.parseColorHexRGB)("#585858"),Io=r.SwatchRGB.create(Do.r,Do.g,Do.b),Ro=(0,Oo.parseColorHexRGB)("#ffffff"),Ao=r.SwatchRGB.create(Ro.r,Ro.g,Ro.b),Lo=r.PaletteRGB.from(Ao),Fo=(0,Oo.parseColorHexRGB)("#eeeeee"),No=r.SwatchRGB.create(Fo.r,Fo.g,Fo.b),Mo=r.PaletteRGB.from(No),_o=(0,Oo.parseColorHexRGB)("#08c3a5"),Ho=r.SwatchRGB.create(_o.r,_o.g,_o.b),Po=r.PaletteRGB.from(Ho),{create:zo}=a.DesignToken,Uo=zo("fui-fill-color").withDefault(Io),Bo=zo({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(Ao),Vo=14;function Go(e,t){return e.colorContrast(t,Vo)}const jo=zo({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>Go(zo("fui-card-palette").withDefault(Lo).getValueFor(e),Bo.getValueFor(e))),Yo=(e,t)=>{const i=structuredClone(e);return!t||"object"!=typeof t||Array.isArray(t)?void 0!==t?t:i:(Object.keys(t).forEach(e=>{const o=t[e],n=i[e];if(null==o)return;const s=e=>e instanceof Date;!o||"object"!=typeof o||Array.isArray(o)||s(o)||!n||"object"!=typeof n||Array.isArray(n)||s(n)?i[e]=o:i[e]=Yo(n,o)}),i)};var Wo=i(80273);const qo={design_tokens:{color:{accent:{$value:"#0EAFE2",$type:"color"},neutral:{$value:"#7C909B",$type:"color"}},fontFamily:{bodyFont:{$value:'Roboto, "Segoe UI", Arial, Helvetica, sans-serif',$type:"fontFamily"}},typography:{baseFontSize:{$value:"14px",$type:"dimension"},baseLineHeight:{$value:"20px",$type:"dimension"}},mode:{luminance:{$value:.23,$type:"number"}},style:{density:{$value:0,$type:"number"},baseHeightMultiplier:{$value:10,$type:"number"},borderRadius:{$value:4,$type:"number"},strokeWidth:{$value:1,$type:"number"}},space:{designUnit:{$value:4,$type:"number"}}}};class Ko{constructor(){this.value=null}}(0,C.Cg)([l.observable],Ko.prototype,"value",void 0);const Xo=new Ko,Jo=(e,t,i)=>{const o=i?(e,t)=>e.setValueFor(i,t):(e,t)=>e.withDefault(t);Object.keys(e).forEach(i=>{const n=`${i}Value`;t[n]&&o(e[i],t[n])})};function Qo(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const Zo={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=(0,Oo.parseColorHexRGB)(e);return t?r.SwatchRGB.create(t.r,t.g,t.b):null}},en=e=>r.PaletteRGB.from(r.SwatchRGB.from((0,Oo.parseColorHexRGB)(e))),tn=(e,t,i="")=>{Object.entries(t).forEach(([t,o])=>{const n=i?`${i}-${t}`:t;o&&"object"==typeof o&&("$value"in o?e.style.setProperty(`--${n}`,String(o.$value)):tn(e,o,n))})},on=["baseClass","baseName","shadowOptions","styles","template"],nn=(e,t=on)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,i)=>(t[i]=e[i],t),{}),sn=e=>{const{definition:t}=e(),{shadowOptions:i,styles:o,template:n}=t;return{shadowOptions:i,styles:o,template:n,defaultConfig:nn(t)}},an=(e,t)=>{const i=e.match(/^(\d+)([a-z]+)/i),o=i[1],n=i[2];return Number(o)+t+n},rn=()=>Xo,ln=(...e)=>{const t=Xo.value;if(!(null==t?void 0:t.customTokens)||0===e.length)return null;return function e(t,i){const[o,...n]=t;if(0===n.length){const e=i[o];return e&&e.$value?e:null}const s=i[o];return s?e(n,s):null}(e,t.customTokens)},dn=(e,t)=>{const i=Yo(qo,t);const o=i.design_tokens;r.accentPalette.setValueFor(e,en(o.color.accent.$value)),r.neutralPalette.setValueFor(e,en(o.color.neutral.$value)),r.bodyFont.setValueFor(e,o.fontFamily.bodyFont.$value),r.baseLayerLuminance.setValueFor(e,o.mode.luminance.$value),r.density.setValueFor(e,o.style.density.$value),r.baseHeightMultiplier.setValueFor(e,o.style.baseHeightMultiplier.$value),r.controlCornerRadius.setValueFor(e,o.style.borderRadius.$value),r.strokeWidth.setValueFor(e,o.style.strokeWidth.$value),r.designUnit.setValueFor(e,o.space.designUnit.$value),r.typeRampBaseFontSize.setValueFor(e,o.typography.baseFontSize.$value),r.typeRampBaseLineHeight.setValueFor(e,o.typography.baseLineHeight.$value);const n=r.typeRampBaseFontSize.getValueFor(e),s=r.typeRampBaseLineHeight.getValueFor(e);r.typeRampMinus1FontSize.setValueFor(e,an(n,Wo.Du.minusOne)),r.typeRampMinus1LineHeight.setValueFor(e,an(s,Wo.Du.minusOne)),r.typeRampMinus2FontSize.setValueFor(e,an(n,Wo.Du.minusTwo)),r.typeRampMinus2LineHeight.setValueFor(e,an(s,Wo.Du.minusTwo)),r.typeRampPlus1FontSize.setValueFor(e,an(n,Wo.Du.plusOne)),r.typeRampPlus1LineHeight.setValueFor(e,an(s,Wo.Du.plusOne)),r.typeRampPlus2FontSize.setValueFor(e,an(n,Wo.Du.plusTwo)),r.typeRampPlus2LineHeight.setValueFor(e,an(s,Wo.Du.plusTwo)),r.typeRampPlus3FontSize.setValueFor(e,an(n,Wo.Du.plusThree)),r.typeRampPlus3LineHeight.setValueFor(e,an(s,Wo.Du.plusThree)),r.typeRampPlus4FontSize.setValueFor(e,an(n,Wo.Du.plusFour)),r.typeRampPlus4LineHeight.setValueFor(e,an(s,Wo.Du.plusFour)),r.typeRampPlus5FontSize.setValueFor(e,an(n,Wo.Du.plusFive)),r.typeRampPlus5LineHeight.setValueFor(e,an(s,Wo.Du.plusFive)),r.typeRampPlus6FontSize.setValueFor(e,an(n,Wo.Du.plusSix)),r.typeRampPlus6LineHeight.setValueFor(e,an(s,Wo.Du.plusSix)),i.customTokens&&tn(e,i.customTokens),Xo.value=structuredClone(i)},cn=en("#08c3a5"),un=en("#eeeeee"),hn=r.StandardLuminance.DarkMode;const pn=i(85109).O.ltr,mn=4,gn=4;var vn=i(85090);const fn=(e="normal",t="normal")=>`\n font-family: ${r.bodyFont};\n font-style: ${e};\n font-weight: ${t};\n`,bn=l.css`
|
|
1250
|
+
`,ho=l.html`
|
|
1251
|
+
${e=>uo(T(e))}
|
|
1252
|
+
`;i(8420);function po(e){const t=((null==e?void 0:e.trim())||"en").toLowerCase().replace(/_/g,"-");return"en-us"===t||"en"===t?"en":"en-gb"===t?"en-gb":t}function mo(){return"undefined"!=typeof navigator&&navigator.language?navigator.language:"en"}function go(e="en"){const t=po(e),i=Xi()().locale(t),o=i.locale();return(n=t)!==(s=o)&&s!==n.split("-")[0]?Xi()().locale("en").localeData().longDateFormat("L")||"MM/DD/YYYY":i.localeData().longDateFormat("L")||"MM/DD/YYYY";var n,s}function vo(e){return e.replace(/YYYY/g,"yyyy").replace(/YY(?!Y)/g,"yy").replace(/DD/g,"dd").replace(/D(?!D)/g,"d").replace(/MM/g,"mm").replace(/M(?!M)/g,"m")}function fo(e){return null!=e&&""!==String(e).trim()}Xi().extend(Qi()),Xi().extend(eo()),Xi().extend(io());const bo="MM-DD-YYYY";function yo(e,t){const i=String(e).trim(),o=Xi()(i,t,!0);if(o.isValid())return o;const n=Xi()(i,bo,!0);return n.isValid()?n:null}var wo=i(28745);const Co=[1,2,3,4,5,6,7],xo=(e,t,i)=>{if(o=t,-1===e.indexOf(o.dayNumber))return t;var o;const n=Co.filter(t=>-1===e.indexOf(t));let s=n.find(e=>e>t.dayNumber);s||(s=Math.min(...n));const a=t.dayNumber<s?s-t.dayNumber:s-t.dayNumber+7;return n.length?new so(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,a),i):(wo.v.warn("Date picker disabled days - all days of week have been disabled"),t)},$o=void 0,So={};class Eo extends a.FoundationElement{constructor(){super(...arguments),this.format=bo,this.lang="en-US",this.visible=!1,this.position="bottom",this.disabledDaysOfWeek=[],this.suppressValueChanged=!1,this.cachedFormat=bo,this.clickOutside=e=>this.handleClickOutside(e),this.keydownOutside=e=>this.handleKeydownOutside(e)}formatChanged(e,t){!this.useLocaleFormat&&t&&this.cacheUserFormat(t),t&&this.calendar&&fo(this.value)&&(this.formatDate=Xi()(this.currentDate.Date).format(t))}langChanged(){this.applyEffectiveLangChange()}useLocaleFormatChanged(e,t){this.calendar&&(t&&!e?this.cacheUserFormat(this.format):!t&&e&&this.restoreUserFormat(),this.applyEffectiveLangChange())}inlineCalendarChanged(){this.inlineCalendar?(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)):this.visible&&(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)),this.toggleVisibility()}hideWeekendsCalendarChanged(){this.toggleVisibility()}valueChanged(e,t){this.suppressValueChanged||this.calendar&&(fo(t)?this.applyValue(t):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate())}disconnectedCallback(){document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside),super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),Xi().extend(Qi()),Xi().extend(io()),Xi().extend(eo()),this.substringNumber=3,this.useLocaleFormat&&(this.cacheUserFormat(this.format),this.applyLocaleFormat());const e=this.value;!this.allowEmpty||fo(e)?fo(e)?this.applyValue(e):this.initializeWithDefaultDate():this.initializeEmpty()}clear(){this.allowEmpty&&this.clearToEmpty(!0)}get inputValue(){return fo(this.value)?this.formatDate:""}get inputPlaceholder(){var e;return!this.allowEmpty||fo(this.value)?"":(null===(e=this.placeholder)||void 0===e?void 0:e.trim())||vo(this.format)}get effectiveLang(){return this.useLocaleFormat&&!this.hasAttribute("lang")?mo():this.lang}applyLocaleFormat(){this.format=go(this.effectiveLang)}cacheUserFormat(e){const t=null==e?void 0:e.trim();t&&(this.cachedFormat=t)}restoreUserFormat(){this.format=this.cachedFormat}applyEffectiveLangChange(){var e,t;if(!this.calendar)return;this.useLocaleFormat&&this.applyLocaleFormat();const i=this.calendar.year,o=this.calendar.month.number,n=null!==(t=null===(e=this.currentDate)||void 0===e?void 0:e.Date)&&void 0!==t?t:Xi()().toDate();this.currentDate=new so(n,this.effectiveLang),this.calendar=new ro(i,o,this.effectiveLang),fo(this.value)&&(this.formatDate=Xi()(this.currentDate.Date).format(this.format)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}syncValueAttribute(e){this.suppressValueChanged=!0,this.value=e,this.suppressValueChanged=!1}initializeEmpty(){const e=Xi()();this.currentDate=new so(e.toDate(),this.effectiveLang),this.calendar=new ro(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate="",this.syncValueAttribute(""),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}initializeWithDefaultDate(){this.resetToDefaultDate(!0)}resetToDefaultDate(e=!1){var t;let i=new so(Xi()().toDate(),this.effectiveLang);(null===(t=this.disabledDaysOfWeek)||void 0===t?void 0:t.length)&&(i=xo(this.disabledDaysOfWeek,i,this.effectiveLang)),this.currentDate=i,e||!this.calendar?this.calendar=new ro(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang):this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=Xi()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Xi()(this.currentDate.Date).format(bo)),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.monthList=this.getMonthDaysGrid()}applyValue(e){const t=yo(e,this.format);t?(this.currentDate=new so(t.toDate(),this.effectiveLang),this.calendar?this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year):this.calendar=new ro(this.currentDate.year,this.currentDate.monthNumber,this.effectiveLang),this.formatDate=Xi()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Xi()(this.currentDate.Date).format(bo)),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()):this.allowEmpty?this.clearToEmpty(!1):this.resetToDefaultDate()}clearToEmpty(e){const t=Xi()();this.currentDate=new so(t.toDate(),this.effectiveLang),this.calendar&&(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()),this.formatDate="",this.syncValueAttribute(""),e&&this.$emit("value-changed",void 0)}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}visibleChanged(e,t){this.inlineCalendar||(t?(document.addEventListener("mousedown",this.clickOutside),document.addEventListener("keydown",this.keydownOutside)):(document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("keydown",this.keydownOutside)))}handleKeydownOutside(e){!this.inlineCalendar&&this.visible&&"Escape"===e.key&&(e.preventDefault(),this.closeCalendar())}handleClickOutside(e){!this.inlineCalendar&&this.visible&&E(e,this)&&this.closeCalendar()}closeCalendar(){this.visible&&(this.visible=!1,this.toggleVisibility())}toggleCalendar(){this.visible=!this.visible,this.toggleVisibility(),this.isCurrentCalendarMonth()||(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText())}toggleVisibility(){this.calendarDropdownClasses=(0,x.x)(["visible",this.visible],this.position,["inline",this.inlineCalendar],["hide-weekends",this.hideWeekends])}isSelectedDate(e){return!(this.allowEmpty&&!fo(this.value))&&Xi()(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){Xi()(e.Date).isSame(this.currentDate.Date,"day")&&fo(this.value)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=Xi()(this.currentDate.Date).format(this.format),this.syncValueAttribute(Xi()(e.Date).format(bo)),this.$emit("value-changed",this.value),this.toggleCalendar())}getMonthDaysGrid(){const e=this.calendar.month.getDay(1),t=this.calendar.getPreviousMonth(),i=e.dayNumber-1,o=this.calendar.month.numberOfDays+i,n=Array.from({length:o});for(let e=i;e<o;e+=1)n[e]=this.calendar.month.getDay(e+1-i);for(let e=0;e<i;e+=1){const o=i-(e+1);n[e]=t.getDay(t.numberOfDays-o)}return n}}(0,C.Cg)([l.attr],Eo.prototype,"format",void 0),(0,C.Cg)([l.attr],Eo.prototype,"lang",void 0),(0,C.Cg)([(0,l.attr)({attribute:"use-locale-format",mode:"boolean"})],Eo.prototype,"useLocaleFormat",void 0),(0,C.Cg)([l.attr],Eo.prototype,"visible",void 0),(0,C.Cg)([(0,l.attr)({attribute:"inline-calendar",mode:"boolean"})],Eo.prototype,"inlineCalendar",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-weekends",mode:"boolean"})],Eo.prototype,"hideWeekends",void 0),(0,C.Cg)([l.attr],Eo.prototype,"position",void 0),(0,C.Cg)([l.attr],Eo.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-empty",mode:"boolean"})],Eo.prototype,"allowEmpty",void 0),(0,C.Cg)([l.attr],Eo.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],Eo.prototype,"value",void 0),(0,C.Cg)([l.observable],Eo.prototype,"currentDate",void 0),(0,C.Cg)([l.observable],Eo.prototype,"currentMonth",void 0),(0,C.Cg)([l.observable],Eo.prototype,"currentYear",void 0),(0,C.Cg)([l.observable],Eo.prototype,"calendarDropdownClasses",void 0),(0,C.Cg)([l.observable],Eo.prototype,"formatDate",void 0),(0,C.Cg)([l.observable],Eo.prototype,"monthList",void 0),(0,C.Cg)([l.observable],Eo.prototype,"disabledDaysOfWeek",void 0),(0,C.Cg)([l.observable],Eo.prototype,"calendar",void 0);const Oo=Eo.compose(Object.assign({baseName:"date-picker",styles:lo,template:ho,shadowOptions:$o},So));var To=i(83912);const ko=r.SwatchRGB.create(1,1,1),Do=r.SwatchRGB.create(0,0,0),Io=(0,To.parseColorHexRGB)("#585858"),Ro=r.SwatchRGB.create(Io.r,Io.g,Io.b),Ao=(0,To.parseColorHexRGB)("#ffffff"),Lo=r.SwatchRGB.create(Ao.r,Ao.g,Ao.b),No=r.PaletteRGB.from(Lo),Fo=(0,To.parseColorHexRGB)("#eeeeee"),Mo=r.SwatchRGB.create(Fo.r,Fo.g,Fo.b),_o=r.PaletteRGB.from(Mo),Ho=(0,To.parseColorHexRGB)("#08c3a5"),Po=r.SwatchRGB.create(Ho.r,Ho.g,Ho.b),zo=r.PaletteRGB.from(Po),{create:Uo}=a.DesignToken,Bo=Uo("fui-fill-color").withDefault(Ro),Vo=Uo({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(Lo),Go=14;function jo(e,t){return e.colorContrast(t,Go)}const Yo=Uo({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>jo(Uo("fui-card-palette").withDefault(No).getValueFor(e),Vo.getValueFor(e))),Wo=(e,t)=>{const i=structuredClone(e);return!t||"object"!=typeof t||Array.isArray(t)?void 0!==t?t:i:(Object.keys(t).forEach(e=>{const o=t[e],n=i[e];if(null==o)return;const s=e=>e instanceof Date;!o||"object"!=typeof o||Array.isArray(o)||s(o)||!n||"object"!=typeof n||Array.isArray(n)||s(n)?i[e]=o:i[e]=Wo(n,o)}),i)};var qo=i(80273);const Ko={design_tokens:{color:{accent:{$value:"#0EAFE2",$type:"color"},neutral:{$value:"#7C909B",$type:"color"}},fontFamily:{bodyFont:{$value:'Roboto, "Segoe UI", Arial, Helvetica, sans-serif',$type:"fontFamily"}},typography:{baseFontSize:{$value:"14px",$type:"dimension"},baseLineHeight:{$value:"20px",$type:"dimension"}},mode:{luminance:{$value:.23,$type:"number"}},style:{density:{$value:0,$type:"number"},baseHeightMultiplier:{$value:10,$type:"number"},borderRadius:{$value:4,$type:"number"},strokeWidth:{$value:1,$type:"number"}},space:{designUnit:{$value:4,$type:"number"}}}};class Xo{constructor(){this.value=null}}(0,C.Cg)([l.observable],Xo.prototype,"value",void 0);const Jo=new Xo,Qo=(e,t,i)=>{const o=i?(e,t)=>e.setValueFor(i,t):(e,t)=>e.withDefault(t);Object.keys(e).forEach(i=>{const n=`${i}Value`;t[n]&&o(e[i],t[n])})};function Zo(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const en={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=(0,To.parseColorHexRGB)(e);return t?r.SwatchRGB.create(t.r,t.g,t.b):null}},tn=e=>r.PaletteRGB.from(r.SwatchRGB.from((0,To.parseColorHexRGB)(e))),on=(e,t,i="")=>{Object.entries(t).forEach(([t,o])=>{const n=i?`${i}-${t}`:t;o&&"object"==typeof o&&("$value"in o?e.style.setProperty(`--${n}`,String(o.$value)):on(e,o,n))})},nn=["baseClass","baseName","shadowOptions","styles","template"],sn=(e,t=nn)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,i)=>(t[i]=e[i],t),{}),an=e=>{const{definition:t}=e(),{shadowOptions:i,styles:o,template:n}=t;return{shadowOptions:i,styles:o,template:n,defaultConfig:sn(t)}},rn=(e,t)=>{const i=e.match(/^(\d+)([a-z]+)/i),o=i[1],n=i[2];return Number(o)+t+n},ln=()=>Jo,dn=(...e)=>{const t=Jo.value;if(!(null==t?void 0:t.customTokens)||0===e.length)return null;return function e(t,i){const[o,...n]=t;if(0===n.length){const e=i[o];return e&&e.$value?e:null}const s=i[o];return s?e(n,s):null}(e,t.customTokens)},cn=(e,t)=>{const i=Wo(Ko,t);const o=i.design_tokens;r.accentPalette.setValueFor(e,tn(o.color.accent.$value)),r.neutralPalette.setValueFor(e,tn(o.color.neutral.$value)),r.bodyFont.setValueFor(e,o.fontFamily.bodyFont.$value),r.baseLayerLuminance.setValueFor(e,o.mode.luminance.$value),r.density.setValueFor(e,o.style.density.$value),r.baseHeightMultiplier.setValueFor(e,o.style.baseHeightMultiplier.$value),r.controlCornerRadius.setValueFor(e,o.style.borderRadius.$value),r.strokeWidth.setValueFor(e,o.style.strokeWidth.$value),r.designUnit.setValueFor(e,o.space.designUnit.$value),r.typeRampBaseFontSize.setValueFor(e,o.typography.baseFontSize.$value),r.typeRampBaseLineHeight.setValueFor(e,o.typography.baseLineHeight.$value);const n=r.typeRampBaseFontSize.getValueFor(e),s=r.typeRampBaseLineHeight.getValueFor(e);r.typeRampMinus1FontSize.setValueFor(e,rn(n,qo.Du.minusOne)),r.typeRampMinus1LineHeight.setValueFor(e,rn(s,qo.Du.minusOne)),r.typeRampMinus2FontSize.setValueFor(e,rn(n,qo.Du.minusTwo)),r.typeRampMinus2LineHeight.setValueFor(e,rn(s,qo.Du.minusTwo)),r.typeRampPlus1FontSize.setValueFor(e,rn(n,qo.Du.plusOne)),r.typeRampPlus1LineHeight.setValueFor(e,rn(s,qo.Du.plusOne)),r.typeRampPlus2FontSize.setValueFor(e,rn(n,qo.Du.plusTwo)),r.typeRampPlus2LineHeight.setValueFor(e,rn(s,qo.Du.plusTwo)),r.typeRampPlus3FontSize.setValueFor(e,rn(n,qo.Du.plusThree)),r.typeRampPlus3LineHeight.setValueFor(e,rn(s,qo.Du.plusThree)),r.typeRampPlus4FontSize.setValueFor(e,rn(n,qo.Du.plusFour)),r.typeRampPlus4LineHeight.setValueFor(e,rn(s,qo.Du.plusFour)),r.typeRampPlus5FontSize.setValueFor(e,rn(n,qo.Du.plusFive)),r.typeRampPlus5LineHeight.setValueFor(e,rn(s,qo.Du.plusFive)),r.typeRampPlus6FontSize.setValueFor(e,rn(n,qo.Du.plusSix)),r.typeRampPlus6LineHeight.setValueFor(e,rn(s,qo.Du.plusSix)),i.customTokens&&on(e,i.customTokens),Jo.value=structuredClone(i)},un=tn("#08c3a5"),hn=tn("#eeeeee"),pn=r.StandardLuminance.DarkMode;const mn=i(85109).O.ltr,gn=4,vn=4;var fn=i(85090);const bn=(e="normal",t="normal")=>`\n font-family: ${r.bodyFont};\n font-style: ${e};\n font-weight: ${t};\n`,yn=l.css`
|
|
1253
1253
|
${(0,a.display)("flex")}
|
|
1254
1254
|
:host {
|
|
1255
1255
|
flex: 1;
|
|
1256
1256
|
}
|
|
1257
|
-
`,
|
|
1257
|
+
`,wn=l.css`
|
|
1258
1258
|
:host {
|
|
1259
|
-
background-color: ${
|
|
1259
|
+
background-color: ${Bo};
|
|
1260
1260
|
}
|
|
1261
1261
|
`.withBehaviors((0,a.forcedColorsStylesheetBehavior)(l.css`
|
|
1262
1262
|
:host {
|
|
1263
|
-
background-color: ${
|
|
1264
|
-
box-shadow: 0 0 0 1px ${
|
|
1265
|
-
color: ${
|
|
1263
|
+
background-color: ${fn.A.ButtonFace};
|
|
1264
|
+
box-shadow: 0 0 0 1px ${fn.A.CanvasText};
|
|
1265
|
+
color: ${fn.A.ButtonText};
|
|
1266
1266
|
}
|
|
1267
|
-
`)),
|
|
1267
|
+
`)),Cn=(e,t)=>l.css`
|
|
1268
1268
|
${e.name} ${"h"+t} {
|
|
1269
1269
|
margin: 0;
|
|
1270
1270
|
}
|
|
1271
|
-
`;class
|
|
1271
|
+
`;class xn extends r.DesignSystemProvider{constructor(){super(),Qo(o,n,this)}}(0,C.Cg)([(0,l.attr)({attribute:"card-fill-color",converter:en}),Zo(Vo)],xn.prototype,"cardFillColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"card-foreground-color",converter:en}),Zo(Yo)],xn.prototype,"cardForegroundColor",void 0);const $n=xn.compose({baseName:"design-system-provider",template:l.html`
|
|
1272
1272
|
<slot></slot>
|
|
1273
1273
|
`,styles:e=>{const t=(e=>l.css`
|
|
1274
|
-
${
|
|
1275
|
-
${
|
|
1276
|
-
${
|
|
1277
|
-
${
|
|
1278
|
-
${
|
|
1279
|
-
${
|
|
1274
|
+
${Cn(e,"1")}
|
|
1275
|
+
${Cn(e,"2")}
|
|
1276
|
+
${Cn(e,"3")}
|
|
1277
|
+
${Cn(e,"4")}
|
|
1278
|
+
${Cn(e,"5")}
|
|
1279
|
+
${Cn(e,"6")}
|
|
1280
1280
|
`)(e);return t.addStylesTo(document),l.css`
|
|
1281
|
-
${bn}
|
|
1282
1281
|
${yn}
|
|
1282
|
+
${wn}
|
|
1283
1283
|
${t}
|
|
1284
1284
|
:host * {
|
|
1285
|
-
${
|
|
1285
|
+
${bn()}
|
|
1286
1286
|
}
|
|
1287
|
-
`}});var
|
|
1287
|
+
`}});var Sn=i(40543);const En=l.css`
|
|
1288
1288
|
:host {
|
|
1289
1289
|
--dialog-close-icon-display: flex;
|
|
1290
1290
|
--dialog-min-width: 358px;
|
|
@@ -1563,7 +1563,7 @@
|
|
|
1563
1563
|
dialog[style*='position: fixed'] {
|
|
1564
1564
|
margin: 0;
|
|
1565
1565
|
}
|
|
1566
|
-
`;var
|
|
1566
|
+
`;var On=i(70997);const Tn=l.html`
|
|
1567
1567
|
<slot>
|
|
1568
1568
|
${(0,l.when)(e=>e.notification,l.html`
|
|
1569
1569
|
<div class="details">
|
|
@@ -1571,7 +1571,7 @@
|
|
|
1571
1571
|
</div>
|
|
1572
1572
|
`)}
|
|
1573
1573
|
</slot>
|
|
1574
|
-
`,
|
|
1574
|
+
`,kn=e=>l.html`
|
|
1575
1575
|
<dialog ${(0,l.ref)("mainElement")} part="dialog" type=${e=>e.type}>
|
|
1576
1576
|
<div class="content-wrapper" part="content">
|
|
1577
1577
|
<div part="top" class="top" ${(0,l.ref)("topElement")}>
|
|
@@ -1591,9 +1591,9 @@
|
|
|
1591
1591
|
`)}
|
|
1592
1592
|
</div>
|
|
1593
1593
|
</div>
|
|
1594
|
-
${(0,
|
|
1595
|
-
<div class="content-container" part="content-container">${
|
|
1596
|
-
`,
|
|
1594
|
+
${(0,On.q)(e=>e.resizable,l.html`
|
|
1595
|
+
<div class="content-container" part="content-container">${Tn}</div>
|
|
1596
|
+
`,Tn)}
|
|
1597
1597
|
<div part="bottom" class="bottom">
|
|
1598
1598
|
<slot name="bottom">
|
|
1599
1599
|
${(0,l.when)(e=>e.notification,l.html`
|
|
@@ -1623,13 +1623,13 @@
|
|
|
1623
1623
|
<div class="resize-handle resize-handle-sw" data-direction="sw"></div>
|
|
1624
1624
|
`)}
|
|
1625
1625
|
</dialog>
|
|
1626
|
-
`,
|
|
1627
|
-
${e=>
|
|
1628
|
-
`,Dn={mode:"open",delegatesFocus:!0},In={};class Rn extends a.FoundationElement{constructor(){super(...arguments),this.type="default",this.position="center",this.showCloseIcon=!0,this.resizable=!1,this.draggable=!1,this.minWidth=300,this.minHeight=200,this.isResizing=!1,this.currentResizeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.startLeft=0,this.startTop=0,this.resizeOffsetX=0,this.resizeOffsetY=0,this.originalWidth="",this.originalHeight="",this.originalPosition="",this.originalLeft="",this.originalTop="",this.originalMargin="",this.isMaximized=!1,this.hasBeenResized=!1,this.isDragging=!1,this.dragOffsetX=0,this.dragOffsetY=0,this.dragDialogWidth=0,this.dragDialogHeight=0,this.onMouseDownBound=null,this.onMouseMoveBound=null,this.onMouseUpBound=null}notificationChanged(){this.notification&&(this.showCloseIcon=!1)}draggableChanged(e,t){t?this.attachDragMouseDown():(this.detachDragMouseDown(),this.removeDraggableEventListeners())}connectedCallback(){super.connectedCallback(),window.HTMLDialogElement||$n.A.registerDialog(this.mainElement),this.mainElement.addEventListener("close",()=>{this.resetDraggableStyle(),this.onCloseCallback&&this.onCloseCallback(),this.$emit("close")}),this.hasAttribute("open")&&this.shadowRoot.querySelector("dialog").setAttribute("open",""),this.setupResizeHandlers(),this.attachDragMouseDown()}disconnectedCallback(){super.disconnectedCallback(),this.removeResizeHandlers(),this.detachDragMouseDown(),this.removeDraggableEventListeners()}setupResizeHandlers(){if(!this.resizable)return;const e=window.innerWidth,t=window.innerHeight;let i=this.minWidth,o=this.minHeight;void 0!==this.initialWidth&&(i=Math.max(this.minWidth,Math.min(this.initialWidth,e))),void 0!==this.initialHeight&&(o=Math.max(this.minHeight,Math.min(this.initialHeight,t))),this.originalWidth=this.mainElement.style.width||`${i}px`,this.originalHeight=this.mainElement.style.height||`${o}px`,this.originalPosition=this.mainElement.style.position||"",this.originalLeft=this.mainElement.style.left||"",this.originalTop=this.mainElement.style.top||"",this.originalMargin=this.mainElement.style.margin||"",this.mainElement.style.height=`${o}px`,this.mainElement.style.minHeight=`${this.minHeight}px`,this.mainElement.style.width=`${i}px`,this.mainElement.style.minWidth=`${this.minWidth}px`,this.originalWidth=this.mainElement.style.width,this.originalHeight=this.mainElement.style.height;this.shadowRoot.querySelectorAll(".resize-handle").forEach(e=>{e.addEventListener("mousedown",this.handleResizeStart.bind(this)),e.addEventListener("dblclick",this.handleEdgeDoubleClick.bind(this))})}removeResizeHandlers(){var e;document.removeEventListener("mousemove",this.handleResizeMove.bind(this)),document.removeEventListener("mouseup",this.handleResizeEnd.bind(this));const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".resize-handle");null==t||t.forEach(e=>{e.removeEventListener("dblclick",this.handleEdgeDoubleClick.bind(this))})}handleEdgeDoubleClick(e){if(!this.resizable)return;e.preventDefault(),e.stopPropagation();const t=e.target.dataset.direction;if(!["n","s","e","w"].includes(t))return;const i=this.mainElement.getBoundingClientRect(),o=window.innerWidth,n=window.innerHeight;switch(this.mainElement.style.position="fixed",this.mainElement.style.margin="0",t){case"n":this.mainElement.style.height=`${i.bottom}px`,this.mainElement.style.top="0px";break;case"s":this.mainElement.style.height=n-i.top+"px";break;case"e":this.mainElement.style.width=o-i.left+"px";break;case"w":this.mainElement.style.width=`${i.right}px`,this.mainElement.style.left="0px"}this.hasBeenResized=!0,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})}handleResizeStart(e){if(!this.resizable)return;e.preventDefault(),e.stopPropagation(),this.isResizing=!0;const t=e.target;this.currentResizeHandle=t.dataset.direction,this.startX=e.clientX,this.startY=e.clientY;const i=this.mainElement.getBoundingClientRect();switch(this.startWidth=i.width,this.startHeight=i.height,this.startLeft=i.left,this.startTop=i.top,this.resizeOffsetX=0,this.resizeOffsetY=0,this.currentResizeHandle){case"n":this.resizeOffsetY=e.clientY-i.top;break;case"s":this.resizeOffsetY=e.clientY-i.bottom;break;case"e":this.resizeOffsetX=e.clientX-i.right;break;case"w":this.resizeOffsetX=e.clientX-i.left;break;case"ne":this.resizeOffsetX=e.clientX-i.right,this.resizeOffsetY=e.clientY-i.top;break;case"nw":this.resizeOffsetX=e.clientX-i.left,this.resizeOffsetY=e.clientY-i.top;break;case"se":this.resizeOffsetX=e.clientX-i.right,this.resizeOffsetY=e.clientY-i.bottom;break;case"sw":this.resizeOffsetX=e.clientX-i.left,this.resizeOffsetY=e.clientY-i.bottom}this.mainElement.style.position="fixed",this.mainElement.style.left=`${i.left}px`,this.mainElement.style.top=`${i.top}px`,this.mainElement.style.margin="0",document.addEventListener("mousemove",this.handleResizeMove.bind(this)),document.addEventListener("mouseup",this.handleResizeEnd.bind(this)),this.mainElement.classList.add("resizing")}handleResizeMove(e){if(!this.isResizing||!this.currentResizeHandle)return;e.preventDefault();const t=e.clientX-this.startX-this.resizeOffsetX,i=e.clientY-this.startY-this.resizeOffsetY;let o=this.startWidth,n=this.startHeight,s=this.startLeft,a=this.startTop,r=!1;switch(this.currentResizeHandle){case"se":o=this.startWidth+t,n=this.startHeight+i;break;case"sw":o=this.startWidth-t,n=this.startHeight+i,s=this.startLeft+t,r=!0;break;case"ne":o=this.startWidth+t,n=this.startHeight-i,a=this.startTop+i,r=!0;break;case"nw":o=this.startWidth-t,n=this.startHeight-i,s=this.startLeft+t,a=this.startTop+i,r=!0;break;case"e":o=this.startWidth+t;break;case"w":o=this.startWidth-t,s=this.startLeft+t,r=!0;break;case"s":n=this.startHeight+i;break;case"n":n=this.startHeight-i,a=this.startTop+i,r=!0}const l=window.innerWidth,d=window.innerHeight;if(this.resizable){if(o<this.minWidth){const e=this.minWidth-o;o=this.minWidth,this.currentResizeHandle.includes("w")&&(s-=e)}if(n<this.minHeight){const e=this.minHeight-n;n=this.minHeight,this.currentResizeHandle.includes("n")&&(a-=e)}if(this.currentResizeHandle.includes("e")){const e=l-this.startLeft;o>e&&(o=e)}if(this.currentResizeHandle.includes("s")){const e=d-this.startTop;n>e&&(n=e)}if(this.currentResizeHandle.includes("w")){s<0&&(o+=s,s=0);const e=l-s;o>e&&(o=e)}if(this.currentResizeHandle.includes("n")){a<0&&(n+=a,a=0);const e=d-a;n>e&&(n=e)}}this.mainElement.style.width=`${o}px`,this.mainElement.style.height=`${n}px`,r&&(this.mainElement.style.left=`${s}px`,this.mainElement.style.top=`${a}px`)}handleResizeEnd(e){if(!this.isResizing)return;e.preventDefault(),this.isResizing=!1,this.currentResizeHandle=null,this.resizeOffsetX=0,this.resizeOffsetY=0,document.removeEventListener("mousemove",this.handleResizeMove.bind(this)),document.removeEventListener("mouseup",this.handleResizeEnd.bind(this)),this.mainElement.classList.remove("resizing");const t=this.mainElement.style.width,i=this.mainElement.style.height;t===this.originalWidth&&i===this.originalHeight||(this.hasBeenResized=!0),this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})}get open(){return this.mainElement.hasAttribute("open")}get resizeIconName(){return this.hasBeenResized||this.isMaximized?"compress":"expand"}close(){this.mainElement.close()}dismiss(){var e,t,i,o;(null===(o=null===(i=null===(t=null===(e=this.notification)||void 0===e?void 0:e.config)||void 0===t?void 0:t.dialog)||void 0===i?void 0:i.dismissingAction)||void 0===o?void 0:o.action)&&this.notification.config.dialog.dismissingAction.action(),this.closeDialog()}closeDialog(){try{this.mainElement.close(),this.remove()}catch(e){ot.error(e)}}maximize(){this.resizable&&this.mainElement&&(this.mainElement.style.position="fixed",this.mainElement.style.left="0px",this.mainElement.style.top="0px",this.mainElement.style.margin="0",this.mainElement.style.width="100vw",this.mainElement.style.height="100vh",this.isMaximized=!0,this.hasBeenResized=!0,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight}))}resetSize(){this.resizable&&this.mainElement&&(this.hasBeenResized||this.isMaximized?(this.mainElement.style.width=this.originalWidth,this.mainElement.style.height=this.originalHeight,this.mainElement.style.position=this.originalPosition,this.mainElement.style.left=this.originalLeft,this.mainElement.style.top=this.originalTop,this.mainElement.style.margin=this.originalMargin,this.isMaximized=!1,this.hasBeenResized=!1,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})):this.maximize())}attachDragMouseDown(){this.draggable&&this.mainElement&&(this.onMouseDownBound||(this.onMouseDownBound=this.onMouseDown.bind(this)),this.mainElement.removeEventListener("mousedown",this.onMouseDownBound),this.mainElement.addEventListener("mousedown",this.onMouseDownBound))}detachDragMouseDown(){this.onMouseDownBound&&this.mainElement&&(this.mainElement.removeEventListener("mousedown",this.onMouseDownBound),this.onMouseDownBound=null)}isEventTargetInDraggableTarget(e){var t;return(null===(t=this.topElement)||void 0===t?void 0:t.contains(e.target))||this.isInsideTopSlot(e.target)}isInsideTopSlot(e){if(!this.topElementSlot)return!1;return this.topElementSlot.assignedNodes().some(t=>t===e||t.contains(e))}onMouseDown(e){if(!this.topElement||!this.isEventTargetInDraggableTarget(e)||this.isDragging)return;this.isDragging=!0;const t=this.mainElement.getBoundingClientRect();this.dragOffsetX=e.clientX-t.left,this.dragOffsetY=e.clientY-t.top,this.dragDialogWidth=t.width,this.dragDialogHeight=t.height,this.onMouseMoveBound=this.onMouseMove.bind(this),this.onMouseUpBound=this.onMouseUp.bind(this),document.addEventListener("mousemove",this.onMouseMoveBound),document.addEventListener("mouseup",this.onMouseUpBound)}onMouseMove(e){if(!this.isDragging||!this.mainElement)return;const t=window.innerWidth,i=window.innerHeight;let o=e.clientX-this.dragOffsetX,n=e.clientY-this.dragOffsetY;o=Math.max(0,Math.min(t-this.dragDialogWidth,o)),n=Math.max(0,Math.min(i-this.dragDialogHeight,n)),requestAnimationFrame(()=>{Object.assign(this.mainElement.style,{position:"absolute",left:`${o}px`,top:`${n}px`,margin:"0"})})}onMouseUp(){this.isDragging=!1,this.removeDraggableEventListeners()}removeDraggableEventListeners(){this.onMouseMoveBound&&(document.removeEventListener("mousemove",this.onMouseMoveBound),this.onMouseMoveBound=null),this.onMouseUpBound&&(document.removeEventListener("mouseup",this.onMouseUpBound),this.onMouseUpBound=null)}resetDraggableStyle(){this.draggable&&this.mainElement instanceof HTMLElement&&Object.assign(this.mainElement.style,{position:"",left:"",top:"",margin:""})}}(0,C.Cg)([l.observable],Rn.prototype,"notification",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],Rn.prototype,"type",void 0),(0,C.Cg)([l.attr],Rn.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-close-icon"})],Rn.prototype,"showCloseIcon",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"resizable"})],Rn.prototype,"resizable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Rn.prototype,"draggable",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-width"})],Rn.prototype,"minWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-height"})],Rn.prototype,"minHeight",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-width"})],Rn.prototype,"initialWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-height"})],Rn.prototype,"initialHeight",void 0),(0,C.Cg)([l.observable],Rn.prototype,"onShowCallback",void 0),(0,C.Cg)([l.observable],Rn.prototype,"onCloseCallback",void 0),(0,C.Cg)([l.observable],Rn.prototype,"isMaximized",void 0),(0,C.Cg)([l.observable],Rn.prototype,"hasBeenResized",void 0),(0,C.Cg)([l.volatile],Rn.prototype,"open",null),(0,C.Cg)([l.volatile],Rn.prototype,"resizeIconName",null);class An extends Rn{show(){this.onShowCallback&&this.onShowCallback(),this.mainElement.show()}}const Ln=An.compose(Object.assign({baseName:"dialog",styles:Sn,template:kn,shadowOptions:Dn},In)),Fn=(e,t)=>l.css`
|
|
1626
|
+
`,Dn=l.html`
|
|
1627
|
+
${e=>kn(T(e))}
|
|
1628
|
+
`,In={mode:"open",delegatesFocus:!0},Rn={};class An extends a.FoundationElement{constructor(){super(...arguments),this.type="default",this.position="center",this.showCloseIcon=!0,this.resizable=!1,this.draggable=!1,this.minWidth=300,this.minHeight=200,this.isResizing=!1,this.currentResizeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.startLeft=0,this.startTop=0,this.resizeOffsetX=0,this.resizeOffsetY=0,this.originalWidth="",this.originalHeight="",this.originalPosition="",this.originalLeft="",this.originalTop="",this.originalMargin="",this.isMaximized=!1,this.hasBeenResized=!1,this.isDragging=!1,this.dragOffsetX=0,this.dragOffsetY=0,this.dragDialogWidth=0,this.dragDialogHeight=0,this.onMouseDownBound=null,this.onMouseMoveBound=null,this.onMouseUpBound=null}notificationChanged(){this.notification&&(this.showCloseIcon=!1)}draggableChanged(e,t){t?this.attachDragMouseDown():(this.detachDragMouseDown(),this.removeDraggableEventListeners())}connectedCallback(){super.connectedCallback(),window.HTMLDialogElement||Sn.A.registerDialog(this.mainElement),this.mainElement.addEventListener("close",()=>{this.resetDraggableStyle(),this.onCloseCallback&&this.onCloseCallback(),this.$emit("close")}),this.hasAttribute("open")&&this.shadowRoot.querySelector("dialog").setAttribute("open",""),this.setupResizeHandlers(),this.attachDragMouseDown()}disconnectedCallback(){super.disconnectedCallback(),this.removeResizeHandlers(),this.detachDragMouseDown(),this.removeDraggableEventListeners()}setupResizeHandlers(){if(!this.resizable)return;const e=window.innerWidth,t=window.innerHeight;let i=this.minWidth,o=this.minHeight;void 0!==this.initialWidth&&(i=Math.max(this.minWidth,Math.min(this.initialWidth,e))),void 0!==this.initialHeight&&(o=Math.max(this.minHeight,Math.min(this.initialHeight,t))),this.originalWidth=this.mainElement.style.width||`${i}px`,this.originalHeight=this.mainElement.style.height||`${o}px`,this.originalPosition=this.mainElement.style.position||"",this.originalLeft=this.mainElement.style.left||"",this.originalTop=this.mainElement.style.top||"",this.originalMargin=this.mainElement.style.margin||"",this.mainElement.style.height=`${o}px`,this.mainElement.style.minHeight=`${this.minHeight}px`,this.mainElement.style.width=`${i}px`,this.mainElement.style.minWidth=`${this.minWidth}px`,this.originalWidth=this.mainElement.style.width,this.originalHeight=this.mainElement.style.height;this.shadowRoot.querySelectorAll(".resize-handle").forEach(e=>{e.addEventListener("mousedown",this.handleResizeStart.bind(this)),e.addEventListener("dblclick",this.handleEdgeDoubleClick.bind(this))})}removeResizeHandlers(){var e;document.removeEventListener("mousemove",this.handleResizeMove.bind(this)),document.removeEventListener("mouseup",this.handleResizeEnd.bind(this));const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".resize-handle");null==t||t.forEach(e=>{e.removeEventListener("dblclick",this.handleEdgeDoubleClick.bind(this))})}handleEdgeDoubleClick(e){if(!this.resizable)return;e.preventDefault(),e.stopPropagation();const t=e.target.dataset.direction;if(!["n","s","e","w"].includes(t))return;const i=this.mainElement.getBoundingClientRect(),o=window.innerWidth,n=window.innerHeight;switch(this.mainElement.style.position="fixed",this.mainElement.style.margin="0",t){case"n":this.mainElement.style.height=`${i.bottom}px`,this.mainElement.style.top="0px";break;case"s":this.mainElement.style.height=n-i.top+"px";break;case"e":this.mainElement.style.width=o-i.left+"px";break;case"w":this.mainElement.style.width=`${i.right}px`,this.mainElement.style.left="0px"}this.hasBeenResized=!0,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})}handleResizeStart(e){if(!this.resizable)return;e.preventDefault(),e.stopPropagation(),this.isResizing=!0;const t=e.target;this.currentResizeHandle=t.dataset.direction,this.startX=e.clientX,this.startY=e.clientY;const i=this.mainElement.getBoundingClientRect();switch(this.startWidth=i.width,this.startHeight=i.height,this.startLeft=i.left,this.startTop=i.top,this.resizeOffsetX=0,this.resizeOffsetY=0,this.currentResizeHandle){case"n":this.resizeOffsetY=e.clientY-i.top;break;case"s":this.resizeOffsetY=e.clientY-i.bottom;break;case"e":this.resizeOffsetX=e.clientX-i.right;break;case"w":this.resizeOffsetX=e.clientX-i.left;break;case"ne":this.resizeOffsetX=e.clientX-i.right,this.resizeOffsetY=e.clientY-i.top;break;case"nw":this.resizeOffsetX=e.clientX-i.left,this.resizeOffsetY=e.clientY-i.top;break;case"se":this.resizeOffsetX=e.clientX-i.right,this.resizeOffsetY=e.clientY-i.bottom;break;case"sw":this.resizeOffsetX=e.clientX-i.left,this.resizeOffsetY=e.clientY-i.bottom}this.mainElement.style.position="fixed",this.mainElement.style.left=`${i.left}px`,this.mainElement.style.top=`${i.top}px`,this.mainElement.style.margin="0",document.addEventListener("mousemove",this.handleResizeMove.bind(this)),document.addEventListener("mouseup",this.handleResizeEnd.bind(this)),this.mainElement.classList.add("resizing")}handleResizeMove(e){if(!this.isResizing||!this.currentResizeHandle)return;e.preventDefault();const t=e.clientX-this.startX-this.resizeOffsetX,i=e.clientY-this.startY-this.resizeOffsetY;let o=this.startWidth,n=this.startHeight,s=this.startLeft,a=this.startTop,r=!1;switch(this.currentResizeHandle){case"se":o=this.startWidth+t,n=this.startHeight+i;break;case"sw":o=this.startWidth-t,n=this.startHeight+i,s=this.startLeft+t,r=!0;break;case"ne":o=this.startWidth+t,n=this.startHeight-i,a=this.startTop+i,r=!0;break;case"nw":o=this.startWidth-t,n=this.startHeight-i,s=this.startLeft+t,a=this.startTop+i,r=!0;break;case"e":o=this.startWidth+t;break;case"w":o=this.startWidth-t,s=this.startLeft+t,r=!0;break;case"s":n=this.startHeight+i;break;case"n":n=this.startHeight-i,a=this.startTop+i,r=!0}const l=window.innerWidth,d=window.innerHeight;if(this.resizable){if(o<this.minWidth){const e=this.minWidth-o;o=this.minWidth,this.currentResizeHandle.includes("w")&&(s-=e)}if(n<this.minHeight){const e=this.minHeight-n;n=this.minHeight,this.currentResizeHandle.includes("n")&&(a-=e)}if(this.currentResizeHandle.includes("e")){const e=l-this.startLeft;o>e&&(o=e)}if(this.currentResizeHandle.includes("s")){const e=d-this.startTop;n>e&&(n=e)}if(this.currentResizeHandle.includes("w")){s<0&&(o+=s,s=0);const e=l-s;o>e&&(o=e)}if(this.currentResizeHandle.includes("n")){a<0&&(n+=a,a=0);const e=d-a;n>e&&(n=e)}}this.mainElement.style.width=`${o}px`,this.mainElement.style.height=`${n}px`,r&&(this.mainElement.style.left=`${s}px`,this.mainElement.style.top=`${a}px`)}handleResizeEnd(e){if(!this.isResizing)return;e.preventDefault(),this.isResizing=!1,this.currentResizeHandle=null,this.resizeOffsetX=0,this.resizeOffsetY=0,document.removeEventListener("mousemove",this.handleResizeMove.bind(this)),document.removeEventListener("mouseup",this.handleResizeEnd.bind(this)),this.mainElement.classList.remove("resizing");const t=this.mainElement.style.width,i=this.mainElement.style.height;t===this.originalWidth&&i===this.originalHeight||(this.hasBeenResized=!0),this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})}get open(){return this.mainElement.hasAttribute("open")}get resizeIconName(){return this.hasBeenResized||this.isMaximized?"compress":"expand"}close(){this.mainElement.close()}dismiss(){var e,t,i,o;(null===(o=null===(i=null===(t=null===(e=this.notification)||void 0===e?void 0:e.config)||void 0===t?void 0:t.dialog)||void 0===i?void 0:i.dismissingAction)||void 0===o?void 0:o.action)&&this.notification.config.dialog.dismissingAction.action(),this.closeDialog()}closeDialog(){try{this.mainElement.close(),this.remove()}catch(e){ot.error(e)}}maximize(){this.resizable&&this.mainElement&&(this.mainElement.style.position="fixed",this.mainElement.style.left="0px",this.mainElement.style.top="0px",this.mainElement.style.margin="0",this.mainElement.style.width="100vw",this.mainElement.style.height="100vh",this.isMaximized=!0,this.hasBeenResized=!0,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight}))}resetSize(){this.resizable&&this.mainElement&&(this.hasBeenResized||this.isMaximized?(this.mainElement.style.width=this.originalWidth,this.mainElement.style.height=this.originalHeight,this.mainElement.style.position=this.originalPosition,this.mainElement.style.left=this.originalLeft,this.mainElement.style.top=this.originalTop,this.mainElement.style.margin=this.originalMargin,this.isMaximized=!1,this.hasBeenResized=!1,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})):this.maximize())}attachDragMouseDown(){this.draggable&&this.mainElement&&(this.onMouseDownBound||(this.onMouseDownBound=this.onMouseDown.bind(this)),this.mainElement.removeEventListener("mousedown",this.onMouseDownBound),this.mainElement.addEventListener("mousedown",this.onMouseDownBound))}detachDragMouseDown(){this.onMouseDownBound&&this.mainElement&&(this.mainElement.removeEventListener("mousedown",this.onMouseDownBound),this.onMouseDownBound=null)}isEventTargetInDraggableTarget(e){var t;return(null===(t=this.topElement)||void 0===t?void 0:t.contains(e.target))||this.isInsideTopSlot(e.target)}isInsideTopSlot(e){if(!this.topElementSlot)return!1;return this.topElementSlot.assignedNodes().some(t=>t===e||t.contains(e))}onMouseDown(e){if(!this.topElement||!this.isEventTargetInDraggableTarget(e)||this.isDragging)return;this.isDragging=!0;const t=this.mainElement.getBoundingClientRect();this.dragOffsetX=e.clientX-t.left,this.dragOffsetY=e.clientY-t.top,this.dragDialogWidth=t.width,this.dragDialogHeight=t.height,this.onMouseMoveBound=this.onMouseMove.bind(this),this.onMouseUpBound=this.onMouseUp.bind(this),document.addEventListener("mousemove",this.onMouseMoveBound),document.addEventListener("mouseup",this.onMouseUpBound)}onMouseMove(e){if(!this.isDragging||!this.mainElement)return;const t=window.innerWidth,i=window.innerHeight;let o=e.clientX-this.dragOffsetX,n=e.clientY-this.dragOffsetY;o=Math.max(0,Math.min(t-this.dragDialogWidth,o)),n=Math.max(0,Math.min(i-this.dragDialogHeight,n)),requestAnimationFrame(()=>{Object.assign(this.mainElement.style,{position:"absolute",left:`${o}px`,top:`${n}px`,margin:"0"})})}onMouseUp(){this.isDragging=!1,this.removeDraggableEventListeners()}removeDraggableEventListeners(){this.onMouseMoveBound&&(document.removeEventListener("mousemove",this.onMouseMoveBound),this.onMouseMoveBound=null),this.onMouseUpBound&&(document.removeEventListener("mouseup",this.onMouseUpBound),this.onMouseUpBound=null)}resetDraggableStyle(){this.draggable&&this.mainElement instanceof HTMLElement&&Object.assign(this.mainElement.style,{position:"",left:"",top:"",margin:""})}}(0,C.Cg)([l.observable],An.prototype,"notification",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],An.prototype,"type",void 0),(0,C.Cg)([l.attr],An.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-close-icon"})],An.prototype,"showCloseIcon",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"resizable"})],An.prototype,"resizable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],An.prototype,"draggable",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-width"})],An.prototype,"minWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-height"})],An.prototype,"minHeight",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-width"})],An.prototype,"initialWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-height"})],An.prototype,"initialHeight",void 0),(0,C.Cg)([l.observable],An.prototype,"onShowCallback",void 0),(0,C.Cg)([l.observable],An.prototype,"onCloseCallback",void 0),(0,C.Cg)([l.observable],An.prototype,"isMaximized",void 0),(0,C.Cg)([l.observable],An.prototype,"hasBeenResized",void 0),(0,C.Cg)([l.volatile],An.prototype,"open",null),(0,C.Cg)([l.volatile],An.prototype,"resizeIconName",null);class Ln extends An{show(){this.onShowCallback&&this.onShowCallback(),this.mainElement.show()}}const Nn=Ln.compose(Object.assign({baseName:"dialog",styles:En,template:Dn,shadowOptions:In},Rn)),Fn=(e,t)=>l.css`
|
|
1629
1629
|
${(0,r.disclosureStyles)(e,t)}
|
|
1630
|
-
`,
|
|
1630
|
+
`,Mn=(e,t)=>(0,a.disclosureTemplate)(e,t);class _n extends a.Disclosure{}const Hn=void 0,Pn={},zn=_n.compose(Object.assign({baseName:"disclosure",template:Mn,styles:Fn,shadowOptions:Hn},Pn)),Un=(e,t)=>l.css`
|
|
1631
1631
|
${(0,r.dividerStyles)(e,t)}
|
|
1632
|
-
`,
|
|
1632
|
+
`,Bn=(e,t)=>(0,a.dividerTemplate)(e,t);class Vn extends a.Divider{}const Gn=void 0,jn={},Yn=Vn.compose(Object.assign({baseName:"divider",template:Bn,styles:Un,shadowOptions:Gn},jn)),Wn=(e,t,i)=>l.css`
|
|
1633
1633
|
:host {
|
|
1634
1634
|
--dropdown-opener-height-multiplier: 0.7px;
|
|
1635
1635
|
--menu-item-height-multiplier: 0.7px;
|
|
@@ -1692,9 +1692,9 @@
|
|
|
1692
1692
|
var(--menu-item-height-multiplier)
|
|
1693
1693
|
);
|
|
1694
1694
|
}
|
|
1695
|
-
`,
|
|
1696
|
-
${
|
|
1697
|
-
`,
|
|
1695
|
+
`,qn=(e,t)=>l.css`
|
|
1696
|
+
${Wn("foundation",e,t)}
|
|
1697
|
+
`,Kn=(e,t)=>l.html`
|
|
1698
1698
|
${(0,l.repeat)(()=>e,l.html`
|
|
1699
1699
|
${(0,l.when)(e=>e.isDisabled&&e.isDisabled(),l.html`
|
|
1700
1700
|
<${t}-menu-item class="menu-item" disabled>${e=>e.name}</${t}-menu-item>
|
|
@@ -1715,12 +1715,12 @@
|
|
|
1715
1715
|
`)}
|
|
1716
1716
|
${e=>e.name}
|
|
1717
1717
|
${(0,l.when)(e=>e.submenu,l.html`
|
|
1718
|
-
<${t}-menu>${e=>
|
|
1718
|
+
<${t}-menu>${e=>Kn(e.submenu,t)}</${t}-menu>
|
|
1719
1719
|
`)}
|
|
1720
1720
|
</${t}-menu-item>
|
|
1721
1721
|
`)}
|
|
1722
1722
|
`)}
|
|
1723
|
-
`,
|
|
1723
|
+
`,Xn=e=>l.html`
|
|
1724
1724
|
<div class="actions-container" part="actions-container">
|
|
1725
1725
|
<${e}-button
|
|
1726
1726
|
id="actiosnMenuTrigger"
|
|
@@ -1737,12 +1737,12 @@
|
|
|
1737
1737
|
class="actions-menu ${e=>e.classNames}"
|
|
1738
1738
|
part="actions-menu"
|
|
1739
1739
|
>
|
|
1740
|
-
${t=>
|
|
1740
|
+
${t=>Kn(t.allItems,e)}
|
|
1741
1741
|
</${e}-menu>
|
|
1742
1742
|
</div>
|
|
1743
|
-
`,
|
|
1744
|
-
${e=>
|
|
1745
|
-
`;class
|
|
1743
|
+
`,Jn=l.html`
|
|
1744
|
+
${e=>Xn(T(e))}
|
|
1745
|
+
`;class Qn extends a.FoundationElement{constructor(){super(...arguments),this.autoClose=!0,this.disabled=!1,this.name="Dropdown Menu",this.open=!1,this.clickOutside=e=>this.handleClickOutside(e)}connectedCallback(){super.connectedCallback(),this.addEventListener("onMenuClick",this.onDropdownMenuItemClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){E(e,this)&&(this.open=!1)}openChanged(){this.classNames=(0,x.x)(["hidden",!this.open]),this.open?document.addEventListener("mousedown",this.clickOutside):document.removeEventListener("mousedown",this.clickOutside)}toggleDropdownMenuVisibility(){this.open=!this.open}onDropdownMenuItemClick(){this.autoClose&&(this.open=!1)}get allItems(){return this.items}}(0,C.Cg)([l.observable],Qn.prototype,"items",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],Qn.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-button",mode:"boolean"})],Qn.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Qn.prototype,"classNames",void 0),(0,C.Cg)([l.attr],Qn.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],Qn.prototype,"open",void 0),(0,C.Cg)([l.attr],Qn.prototype,"buttonAppearance",void 0);const Zn=Qn.compose({baseName:"dropdown-menu",styles:qn,template:Jn});var es=i(84686);const ts=l.css`
|
|
1746
1746
|
.environment-indicator {
|
|
1747
1747
|
font-size: 12px;
|
|
1748
1748
|
display: inline-flex;
|
|
@@ -1769,7 +1769,7 @@
|
|
|
1769
1769
|
.environment-indicator.lg .icon {
|
|
1770
1770
|
font-size: calc(var(--design-unit) * 3.5px);
|
|
1771
1771
|
}
|
|
1772
|
-
`,
|
|
1772
|
+
`,is=l.html`
|
|
1773
1773
|
${e=>{return t=T(e),l.html`
|
|
1774
1774
|
${(0,l.when)(e=>e.config,l.html`
|
|
1775
1775
|
<div
|
|
@@ -1794,7 +1794,7 @@
|
|
|
1794
1794
|
</div>
|
|
1795
1795
|
`)}
|
|
1796
1796
|
`;var t}}
|
|
1797
|
-
`;var
|
|
1797
|
+
`;var os=i(17190);const ns="default",ss={level:ns,showIcon:!1,iconSize:"sm",backgroundColor:"#2222ff",textColor:"#ffffff",label:"DEFAULT"},as=[ss,{level:"dev",showIcon:!1,icon:"code",backgroundColor:"#ff6b35",label:"DEV"},{level:"prod",showIcon:!1,icon:"check-circle",backgroundColor:"#28a745",label:"PROD"}],rs=(0,os.r)(),ls=a.DI.createInterface(e=>e.instance(rs),e=>e.instance(rs)),ds=a.DI.createInterface("EnvironmentIndicatorConfig");function cs(){return(0,C.sH)(this,arguments,void 0,function*(e={configs:[]}){const{configs:t,currentLevel:i}=e,o={currentLevel:i,configs:t&&t.length>0?t:[ss]};a.DI.getOrCreateDOMContainer().register(a.Registration.instance(ls,rs),a.Registration.instance(ds,o)),rs.publish(o)})}const us=(0,it.createLogger)("EnvironmentIndicator");class hs extends a.FoundationElement{constructor(){super(...arguments),this.size="sm",this.textColor="#ffffff",this.icon="check-circle",this.iconSize="sm",this.useDefaultConfig=!1,this.config=ss,this.envConfigs=as}envConfigsChanged(){this.config=this.getEnvConfigByLevel()}diConfigChanged(){this.config=this.getEnvConfigByLevel()}subscribeToDiConfig(){const e=a.DI.getOrCreateDOMContainer().get(ls);e&&"function"==typeof e.subscribe?this.unsubscribeConfig=e.subscribe(e=>{this.diConfig=e}):us.error("Observer not found or invalid in DI container")}connectedCallback(){super.connectedCallback(),this.diConfig=function(){try{const e=a.DI.getOrCreateDOMContainer().get(ds);if(e)return e}catch(e){return}}(),this.subscribeToDiConfig(),this.config=this.getEnvConfigByLevel()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeConfig&&(this.unsubscribeConfig(),this.unsubscribeConfig=void 0)}getAttributesConfig(){const e={};return["label","size","showIcon","icon","iconSize","backgroundColor","textColor"].filter(e=>!!this[e]).forEach(t=>{e[t]=this[t]}),e||{}}getCurrentEnvironmentLevel(){if(this.level)return this.level;if(this.diConfig)try{const{currentLevel:e}=this.diConfig;if(e)return e}catch(e){us.error(e)}return es.H6!==ns?es.H6:this.useDefaultConfig?ns:void 0}getEnvConfigByLevel(){const e=this.getAttributesConfig(),t=this.getCurrentEnvironmentLevel();if(!t)return this.useDefaultConfig?ss:void 0;if(this.label)return Object.assign(Object.assign(Object.assign({},ss),{level:t}),e);if(this.diConfig){const{configs:i}=this.diConfig;if(i&&i.length>0){const o=i.find(({level:e})=>e===t);if(o)return Object.assign(Object.assign({},o),e)}}const i=this.envConfigs.find(({level:e})=>e===t);return i?Object.assign(Object.assign({},i),e):void 0}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i);["level","label","show-icon","icon-size","size","background-color","text-color","icon"].includes(e)&&t!==i&&(this.config=this.getEnvConfigByLevel())}setEnvConfigs(e){this.envConfigs=e}}(0,C.Cg)([l.attr],hs.prototype,"level",void 0),(0,C.Cg)([l.attr],hs.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-icon"})],hs.prototype,"showIcon",void 0),(0,C.Cg)([l.attr],hs.prototype,"size",void 0),(0,C.Cg)([(0,l.attr)({attribute:"background-color"})],hs.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],hs.prototype,"textColor",void 0),(0,C.Cg)([l.attr],hs.prototype,"icon",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],hs.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"use-default-config"})],hs.prototype,"useDefaultConfig",void 0),(0,C.Cg)([l.observable],hs.prototype,"config",void 0),(0,C.Cg)([l.observable],hs.prototype,"envConfigs",void 0),(0,C.Cg)([l.observable],hs.prototype,"diConfig",void 0);const ps=hs.compose({baseName:"environment-indicator",template:is,styles:ts}),ms=e=>l.html`
|
|
1798
1798
|
<${e}-banner ${(0,l.ref)("banner")}>
|
|
1799
1799
|
<div slot="content">
|
|
1800
1800
|
<div>
|
|
@@ -1815,13 +1815,13 @@
|
|
|
1815
1815
|
</${e}-button>
|
|
1816
1816
|
`)}
|
|
1817
1817
|
</${e}-banner>
|
|
1818
|
-
`,
|
|
1819
|
-
${e=>
|
|
1820
|
-
`,
|
|
1818
|
+
`,gs=l.html`
|
|
1819
|
+
${e=>ms(T(e))}
|
|
1820
|
+
`,vs={mode:"open",delegatesFocus:!0};class fs extends a.FoundationElement{connectedCallback(){super.connectedCallback(),ot.deprecated("ErrorBanner","Use `${prefix}-banner` instead.")}dismiss(){return(0,C.sH)(this,void 0,void 0,function*(){try{yield this.banner.dismiss(),this.remove()}catch(e){ot.error(e)}})}}(0,C.Cg)([l.observable],fs.prototype,"error",void 0),(0,C.Cg)([l.observable],fs.prototype,"notification",void 0);const bs=fs.compose({baseName:"error-banner",template:gs,shadowOptions:vs});var ys;!function(e){e.ERROR_BOUNDARY_EVENT="error-boundary-event"}(ys||(ys={}));const ws=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.errorDetails)&&void 0!==i?i:"Something went wrong"}`},Cs=e=>{var t;return(null==e?void 0:e.logLevel)||(null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.logLevel)||it.LogLevels.error},xs=(e,t)=>{const i=t.split("-")[0];let o=document.querySelector(`#${e}`);if(!o){o=document.createElement("div"),o.setAttribute("id",e);const t=document.createElement(`${i}-design-system-provider`);t.appendChild(o),document.body.appendChild(t)}return o},$s=()=>{const e=document.createElement("div");return e.setAttribute("id","error-banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e},Ss=(0,it.createLogger)("foundation-error"),Es={alert:e=>{alert(ws(e))},notification:(e,t)=>{var i,o,n,s,a,r,l,d,c,u,h,p,m;const g=t.split("-")[0],v=xs("notify-container",t);if(v)switch(v.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.notification)||void 0===o?void 0:o.position){case"top-left":v.style.top="0",v.style.left="0";break;case"bottom-left":v.style.bottom="0",v.style.left="0";break;case"bottom-right":v.style.bottom="0",v.style.right="0";break;default:v.style.top="0",v.style.right="0"}const f=document.createElement(`${g}-toast`),b=document.createElement("div");b.setAttribute("slot","top"),b.textContent=null!==(n=e.title)&&void 0!==n?n:"Error";const y=document.createElement("div");y.setAttribute("slot","content"),y.textContent=(null==e?void 0:e.errorDetails)||"";const w=document.createElement("div");w.setAttribute("slot","date"),w.textContent=(new Date).toLocaleTimeString(),f.setAttribute("notify",(null===(a=null===(s=null==e?void 0:e.config)||void 0===s?void 0:s.notification)||void 0===a?void 0:a.type)||""),(null===(l=null===(r=null==e?void 0:e.config)||void 0===r?void 0:r.notification)||void 0===l?void 0:l.autoClose)&&f.setAttribute("auto-close",`${null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.notification)||void 0===c?void 0:c.autoClose}`),(null===(h=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.notification)||void 0===h?void 0:h.closeTimeout)&&f.setAttribute("close-timeout",`${null===(m=null===(p=null==e?void 0:e.config)||void 0===p?void 0:p.notification)||void 0===m?void 0:m.closeTimeout}`),f.appendChild(b),f.appendChild(y),f.appendChild(w),v.appendChild(f)},dialog:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-error-dialog`);xs("dialog-container",t).appendChild(o),o.error=e,o.show()},snackbar:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`);xs("snack-container",t).appendChild(o),o.error=e},banner:(e,t,i)=>{var o;const n=t.split("-")[0],s=document.createElement(`${n}-error-banner`),a=(e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("error-banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return $s()})(i);(null===(o=null==a?void 0:a.children)||void 0===o?void 0:o.length)>0&&(s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%"),a.appendChild(s),s.error=e}},Os=(e,t,i)=>{Ss.log({message:ws(e),level:Cs(e)});Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{Es[o]&&Es[o](e,t,i)})};class Ts{withTitle(e){return this.title=e,this}withErrorDetails(e){return this.errorDetails=e,this}withLogLevel(e){return this.logLevel=e,this}withAlert(e){return this.alert=e,this}withNotification(e){return this.notification=e,this}withBanner(e){return this.banner=e,this}withSnackbar(e){return this.snackbar=e,this}withDialog(e){return this.dialog=e,this}build(){if(!this.title)throw new Error("Title is required");if(!this.errorDetails)throw new Error("Missing required param 'errorDetails'");let e={title:this.title,errorDetails:this.errorDetails},t={};return null!=this.logLevel&&(e=Object.assign({logLevel:this.logLevel},e)),this.alert&&(t=Object.assign({alert:this.alert},t),e=Object.assign({config:t},e)),this.notification&&(t=Object.assign({notification:this.notification},t),e=Object.assign({config:t},e)),this.banner&&(t=Object.assign({banner:this.banner},t),e=Object.assign({config:t},e)),this.snackbar&&(t=Object.assign({snackbar:this.snackbar},t),e=Object.assign({config:t},e)),this.dialog&&(t=Object.assign({dialog:this.dialog},t),e=Object.assign({config:t},e)),e}}class ks{withPosition(e){return this.position=e,this}withAutoClose(e){return this.autoClose=e,this}withCloseTimeout(e){return this.closeTimeout=e,this}withType(e){return this.type=e,this}build(){let e={};return this.position&&(e=Object.assign({position:this.position},e)),this.autoClose&&(e=Object.assign({autoClose:this.autoClose},e)),this.closeTimeout&&(e=Object.assign({closeTimeout:this.closeTimeout},e)),this.type&&(e=Object.assign({type:this.type},e)),e}}const Ds=l.html`
|
|
1821
1821
|
<template ${(0,l.ref)("errorBoundary")}>
|
|
1822
1822
|
<slot></slot>
|
|
1823
1823
|
</template>
|
|
1824
|
-
`,
|
|
1824
|
+
`,Is={mode:"open",delegatesFocus:!0};class Rs extends a.FoundationElement{constructor(){super(...arguments),this.logger=(0,it.createLogger)("error-boundary"),this.closeTimeout=0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;if(e.connectedCallback.call(this),this.addEventListener(ys.ERROR_BOUNDARY_EVENT,e=>{e.stopImmediatePropagation(),Os(e.detail,this.tagName,this.errorBoundary)}),this.resourceName){if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))return void ot.debug(`Genesis Datasource init failed for ${this.resourceName}`);this.dataSub=null===(t=this.datasource.stream)||void 0===t?void 0:t.subscribe(e=>{if(!e.ROW)return;const t=null==e?void 0:e.ROW[0];if(e.SEQUENCE_ID>1){const e=t.HEADER,i=null==t?void 0:t.BODY,o=t.NOTIFY_SEVERITY;Os((new Ts).withTitle(e).withErrorDetails(i).withNotification((new ks).withType(o).withAutoClose(!!this.closeTimeout).withCloseTimeout(this.closeTimeout).build()).build(),this.tagName,this.errorBoundary)}})}})}disconnectedCallback(){var e,t;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.datasource)||void 0===t||t.destroy(),delete this.datasource}}(0,C.Cg)([l.observable],Rs.prototype,"errorBoundary",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Rs.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Rs.prototype,"closeTimeout",void 0),(0,C.Cg)([pi.yW],Rs.prototype,"datasource",void 0);const As=Rs.compose({baseName:"error-boundary",template:Ds,shadowOptions:Is}),Ls=l.css`
|
|
1825
1825
|
:host {
|
|
1826
1826
|
--design-unit: 3;
|
|
1827
1827
|
--dialog-max-width: 358px;
|
|
@@ -1840,7 +1840,7 @@
|
|
|
1840
1840
|
overflow: hidden;
|
|
1841
1841
|
min-height: var(--error-details-min-height);
|
|
1842
1842
|
}
|
|
1843
|
-
`,
|
|
1843
|
+
`,Ns=e=>l.html`
|
|
1844
1844
|
<${e}-dialog show-close-icon="false" ${(0,l.ref)("dialog")}>
|
|
1845
1845
|
<h2 slot="top" class="title">${e=>{var t;return null===(t=e.error)||void 0===t?void 0:t.title}}</h2>
|
|
1846
1846
|
<div class="details">${e=>{var t,i;return(null===(t=e.error)||void 0===t?void 0:t.errorDetails)||(null===(i=e.notification)||void 0===i?void 0:i.body)||"Place holder for error message"}}</div>
|
|
@@ -1858,8 +1858,8 @@
|
|
|
1858
1858
|
`)}
|
|
1859
1859
|
</${e}-dialog>
|
|
1860
1860
|
`,Fs=l.html`
|
|
1861
|
-
${e=>
|
|
1862
|
-
`,
|
|
1861
|
+
${e=>Ns(T(e))}
|
|
1862
|
+
`,Ms={mode:"open",delegatesFocus:!0};class _s extends a.FoundationElement{connectedCallback(){super.connectedCallback(),ot.deprecated("ErrorDialog","Use `${prefix}-dialog` instead.")}show(){this.dialog.show()}dismiss(){var e,t,i,o,n,s,a,r;(null===(o=null===(i=null===(t=null===(e=this.error)||void 0===e?void 0:e.config)||void 0===t?void 0:t.dialog)||void 0===i?void 0:i.dismissingAction)||void 0===o?void 0:o.action)&&this.error.config.dialog.dismissingAction.action(),(null===(r=null===(a=null===(s=null===(n=this.notification)||void 0===n?void 0:n.config)||void 0===s?void 0:s.dialog)||void 0===a?void 0:a.dismissingAction)||void 0===r?void 0:r.action)&&this.notification.config.dialog.dismissingAction.action(),this.closeDialog()}closeDialog(){try{this.dialog.close(),this.remove()}catch(e){ot.error(e)}}}(0,C.Cg)([l.observable],_s.prototype,"error",void 0),(0,C.Cg)([l.observable],_s.prototype,"notification",void 0);const Hs=_s.compose({baseName:"error-dialog",template:Fs,styles:Ls,shadowOptions:Ms});class Ps extends a.FoundationElement{constructor(){super(...arguments),this.selectedFile=null,this.accept="",this.fileSizeLimitBytes=10485760,this.fileName="",this.isProcessing=!1}handleClick(){this.fileInput.value=null,this.fileInput.click()}onInputChange(e){var t;const i=null==e?void 0:e.target,o=Array.from(null!==(t=null==i?void 0:i.files)&&void 0!==t?t:[]),n=o.find(e=>e.size>this.fileSizeLimitBytes);if(n){const e=`File "${n.name}" exceeds size limit of ${this.fileSizeLimitBytes} bytes`;return this.showError("File Size Error",e),void this.$emit("error",new Error(e))}this.onFileSelected(o)}clearSelection(){this.fileName="",this.selectedFile=null,this.isProcessing=!1,this.fileInput&&(this.fileInput.value=""),this.onFileCleared(),this.$emit("clear")}getSelectedFile(){return this.selectedFile}showError(e,t){Ce({title:e,body:t,config:{toast:{type:"warning",autoClose:!0,closeTimeout:5e3}}},this.tagName)}}(0,C.Cg)([l.attr],Ps.prototype,"label",void 0),(0,C.Cg)([l.attr],Ps.prototype,"accept",void 0),(0,C.Cg)([(0,l.attr)({attribute:"file-size-limit-bytes"})],Ps.prototype,"fileSizeLimitBytes",void 0),(0,C.Cg)([l.observable],Ps.prototype,"fileName",void 0),(0,C.Cg)([l.observable],Ps.prototype,"isProcessing",void 0);const zs=(e,t,i)=>l.css`
|
|
1863
1863
|
/* Host */
|
|
1864
1864
|
:host {
|
|
1865
1865
|
display: flex;
|
|
@@ -1909,9 +1909,9 @@
|
|
|
1909
1909
|
justify-content: center;
|
|
1910
1910
|
z-index: 2;
|
|
1911
1911
|
}
|
|
1912
|
-
`,
|
|
1913
|
-
${
|
|
1914
|
-
`,
|
|
1912
|
+
`,Us=(e,t)=>l.css`
|
|
1913
|
+
${zs("foundation",e,t)}
|
|
1914
|
+
`,Bs=e=>l.html`
|
|
1915
1915
|
<template>
|
|
1916
1916
|
<div class="file-reader">
|
|
1917
1917
|
${(0,l.when)(e=>e.isProcessing,l.html`
|
|
@@ -1947,9 +1947,9 @@
|
|
|
1947
1947
|
`)}
|
|
1948
1948
|
</div>
|
|
1949
1949
|
</template>
|
|
1950
|
-
`,
|
|
1951
|
-
${e=>
|
|
1952
|
-
`;class
|
|
1950
|
+
`,Vs=l.html`
|
|
1951
|
+
${e=>Bs(T(e))}
|
|
1952
|
+
`;class Gs extends Ps{constructor(){super(),this.processingTimeout=null,this.autoProcess=!1,this.processingDelayMs=1e3,this.fileContent=null,this.accept=".json,application/json"}onFileSelected(e){var t,i;const o=e[0];if(o&&this.accept.includes("json")&&!(null===(i=null===(t=null==o?void 0:o.name)||void 0===t?void 0:t.toLowerCase())||void 0===i?void 0:i.endsWith(".json"))){const e="Selected file is not a JSON file";return this.showError("File Type Error",e),void this.$emit("error",new Error(e))}this.selectedFile=o,this.fileName=o.name,this.autoProcess&&this.handleFileProcessing()}onFileCleared(){this.fileContent=null,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null)}handleFileProcessing(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(this.getSelectedFile()){this.processingTimeout&&clearTimeout(this.processingTimeout),this.isProcessing=!0;try{const t=yield this.getSelectedFile().text();let i;try{i=JSON.parse(t)}catch(e){return this.showError("Invalid JSON Format","The selected file contains invalid JSON"),void this.$emit("error",e)}this.fileContent=i,this.$emit("file-read",{fileName:this.fileName,content:this.fileContent,file:this.getSelectedFile()}),null===(e=this.onFileRead)||void 0===e||e.call(this,this.fileContent)}catch(e){this.showError("File Processing Error","An error occurred while processing the file"),this.$emit("error",e)}finally{this.processingTimeout=window.setTimeout(()=>{this.isProcessing=!1,this.processingTimeout=null},this.processingDelayMs)}}else this.showError("No File Selected","Please select a file to process")})}getFileContent(){return this.fileContent}disconnectedCallback(){super.disconnectedCallback(),this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null)}}(0,C.Cg)([(0,l.attr)({attribute:"auto-process",mode:"boolean"})],Gs.prototype,"autoProcess",void 0),(0,C.Cg)([(0,l.attr)({attribute:"processing-delay-ms"})],Gs.prototype,"processingDelayMs",void 0),(0,C.Cg)([l.observable],Gs.prototype,"fileContent",void 0),(0,C.Cg)([l.observable],Gs.prototype,"onFileRead",void 0);const js=Gs.compose({baseName:"file-reader",styles:Us,template:Vs});var Ys=i(17465),Ws=i(32748);const qs=l.css`
|
|
1953
1953
|
/* Host */
|
|
1954
1954
|
:host {
|
|
1955
1955
|
display: flex;
|
|
@@ -1997,7 +1997,7 @@
|
|
|
1997
1997
|
fast-data-grid-row {
|
|
1998
1998
|
align-items: center;
|
|
1999
1999
|
}
|
|
2000
|
-
`,
|
|
2000
|
+
`,Ks=e=>l.html`
|
|
2001
2001
|
<template>
|
|
2002
2002
|
<div class="file-selection">
|
|
2003
2003
|
<input type="file" multiple ${(0,l.ref)("fileInput")}
|
|
@@ -2023,13 +2023,13 @@
|
|
|
2023
2023
|
</${e}-data-grid>
|
|
2024
2024
|
</div>
|
|
2025
2025
|
</template>
|
|
2026
|
-
`,
|
|
2027
|
-
${e=>
|
|
2028
|
-
`,
|
|
2026
|
+
`,Xs=l.html`
|
|
2027
|
+
${e=>Ks(T(e))}
|
|
2028
|
+
`,Js=e=>{const t=new FormData;return e.forEach(e=>{t.append(e.name,e)}),t},Qs=(e,t,i,o)=>{const n=new Headers;return n.append("SESSION_AUTH_TOKEN",i),o.post(e,{body:t,headers:n})},Zs=(e,t,i,o="GET",n,s,a="zero")=>{const r=new Headers;r.append("SESSION_AUTH_TOKEN",i),fetch(e,{method:o,body:s,headers:r,credentials:"include"}).then(e=>(0,C.sH)(void 0,void 0,void 0,function*(){var t;if(e.ok)return e.blob();{const i=yield e.json();n&&Ce({title:null==i?void 0:i.MESSAGE_TYPE,body:null===(t=null==i?void 0:i.DETAILS)||void 0===t?void 0:t.ERROR,config:{toast:{autoClose:!0,closeTimeout:5e3,type:"warning"}}},a),ot.error(i||"An error occurred while downloading the file.")}})).then(e=>{if(e){const i=window.URL.createObjectURL(e),o=document.createElement("a");o.href=i,o.download=t,document.body.appendChild(o),o.click(),o.remove(),n&&Ce({title:"Success",body:"File downloaded successfully",config:{toast:{autoClose:!0,closeTimeout:5e3,type:"success"}}},a),ot.info("File downloaded successfully")}}).catch(e=>{ot.error(e)})},ea=["image/png","image/bmp","image/gif","image/jpeg","image/jpg"],ta=["text/plain","text/csv"],ia=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/pdf"],oa=l.html`
|
|
2029
2029
|
${(0,l.when)(e=>e.rowData,l.html`
|
|
2030
|
-
${e=>"DATETIME"===e.columnDefinition.type?(0,
|
|
2030
|
+
${e=>"DATETIME"===e.columnDefinition.type?(0,mi.zT)(e.rowData[e.columnDefinition.columnDataKey]):e.rowData[e.columnDefinition.columnDataKey]}
|
|
2031
2031
|
`)}
|
|
2032
|
-
`;class
|
|
2032
|
+
`;class na extends Ps{constructor(){super(...arguments),this.acceptedFormats=[],this.selectedFiles=[],this.uploadedFilesResourceName="ALL_FILE_ATTACHMENTS",this.uploadEventName="gwf/attachment-handler/upload",this.gridFields="",this.fileName="",this.uploadedFilesList=[],this.filesGridColumnDefinitions=[]}acceptChanged(){let e=[];this.accept.length>0&&this.accept.split(",").forEach(t=>{"image/*"===t?e=[...e,...ea]:"office/*"===t?e=[...e,...ia]:"text/*"===t?e=[...e,...ta]:e.push(t)}),this.acceptedFormats=e}fieldNameChanged(){this.setupGrid()}entityIdChanged(){this.setupGrid()}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),(null===(t=this.filesGridColumnDefinitions)||void 0===t?void 0:t.length)||this.setColumnDefs()})}setupGrid(){void 0!==this.entityId&&void 0!==this.fieldName&&(this.gridCriteria=(new j.b).withExpression((new G.K).withField(this.fieldName).withValue(this.entityId).build()).build(),this.setRowData())}handleStreamRowOperation(e){let t;for(const i of e.ROW)if(i.DETAILS)switch(i.DETAILS.OPERATION){case"INSERT":this.uploadedFilesList.unshift(i);break;case"MODIFY":t=this.uploadedFilesList.findIndex(e=>e.FILE_ATTACHMENT_ID===i.FILE_ATTACHMENT_ID),this.uploadedFilesList.splice(t,1,i);break;case"DELETE":t=this.uploadedFilesList.findIndex(e=>e.FILE_ATTACHMENT_ID===i.FILE_ATTACHMENT_ID),this.uploadedFilesList.splice(t,1);break;default:Ys.v.error(`Unsupported operation type: ${i.DETAILS.OPERATION}`)}}setRowData(){return(0,C.sH)(this,void 0,void 0,function*(){yield this.connect.stream(this.uploadedFilesResourceName,e=>{var t;1===e.SEQUENCE_ID?this.uploadedFilesList=null!==(t=e.ROW)&&void 0!==t?t:[]:this.handleStreamRowOperation(e)},e=>{Ys.v.error(e)},{CRITERIA_MATCH:this.gridCriteria})})}setColumnDefs(){return(0,C.sH)(this,void 0,void 0,function*(){var e;const t=yield this.connect.getMetadata(this.uploadedFilesResourceName),i=[];this.gridFields.length>0?this.gridFields.split(" ").forEach(e=>{var o;const n=null===(o=t.FIELD)||void 0===o?void 0:o.find(t=>t.NAME===e);n?i.push(this.getColumnObject(n)):"DOWNLOAD"===e&&this.downloadEventName&&i.push(this.getDownloadColumn())}):(null===(e=t.FIELD)||void 0===e||e.forEach(e=>{i.push(this.getColumnObject(e))}),this.downloadEventName&&i.push(this.getDownloadColumn())),this.filesGridColumnDefinitions=i})}getDownloadColumn(){const e=this.tagName.toLowerCase().split("-")[0];return{columnDataKey:"FILE_NAME",title:"File",cellTemplate:l.html`
|
|
2033
2033
|
<template>
|
|
2034
2034
|
<div class="download-button-container">
|
|
2035
2035
|
<${e}-button
|
|
@@ -2040,7 +2040,7 @@
|
|
|
2040
2040
|
</${e}-button>
|
|
2041
2041
|
</div>
|
|
2042
2042
|
</template>
|
|
2043
|
-
`}}getColumnObject(e){return{columnDataKey:e.NAME,title:e.NAME.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),type:e.TYPE,cellTemplate:
|
|
2043
|
+
`}}getColumnObject(e){return{columnDataKey:e.NAME,title:e.NAME.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),type:e.TYPE,cellTemplate:oa}}handleClick(){this.fileInput.value=null,this.fileInput.click()}onFileSelected(e){const t=Array.isArray(e)?e:[e];if(t.length>0&&this.acceptedFormats.length>0)for(const e of t)if(!(this.accept.split(",").includes(".msg")&&e.name&&e.name.endsWith("msg")||this.acceptedFormats.includes(e.type)))return void this.showError("File Type Error",`Not a valid file type. Accepted Formats are ${this.accept}`);this.selectedFiles=t,this.fileName=this.selectedFiles.map(e=>e.name.trim()).join(),this.$emit("file-selected",{files:this.selectedFiles})}onFileCleared(){this.fileName="",this.selectedFiles=[]}handleFileUpload(){return(0,C.sH)(this,void 0,void 0,function*(){try{const e=Js(this.selectedFiles);e.append(this.uploadKey,this.entityId);const t=yield Qs(this.uploadEventName,e,this.session.getItem("authToken","session"),this.http);if(t.ERROR)return Ys.v.error(t.ERROR),void this.$emit("errorOut",t.ERROR);Ys.v.info(t),this.$emit("success",t),this.clearSelection()}catch(e){this.$emit("errorOut",e),Ys.v.error(e)}})}handleFileDownload(e){const t=this.tagName.toLowerCase().split("-")[0];Zs(this.downloadEventName(e),e.FILE_NAME,this.session.getItem("authToken","session"),"GET",!0,void 0,t)}}(0,C.Cg)([l.observable],na.prototype,"gridCriteria",void 0),(0,C.Cg)([hi.dm],na.prototype,"connect",void 0),(0,C.Cg)([Ws.l],na.prototype,"http",void 0),(0,C.Cg)([ki.N],na.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({attribute:"uploaded-files-resource-name"})],na.prototype,"uploadedFilesResourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-event-name"})],na.prototype,"uploadEventName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"field-name"})],na.prototype,"fieldName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"entity-id"})],na.prototype,"entityId",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-key"})],na.prototype,"uploadKey",void 0),(0,C.Cg)([(0,l.attr)({attribute:"grid-fields"})],na.prototype,"gridFields",void 0),(0,C.Cg)([l.observable],na.prototype,"fileName",void 0),(0,C.Cg)([l.observable],na.prototype,"uploadedFilesList",void 0),(0,C.Cg)([l.observable],na.prototype,"filesGridColumnDefinitions",void 0);const sa=void 0,aa={},ra=na.compose(Object.assign({baseName:"file-upload",styles:qs,template:Xs,shadowOptions:sa},aa)),la=l.css`
|
|
2044
2044
|
.filter-wrapper {
|
|
2045
2045
|
border: 1px solid gray;
|
|
2046
2046
|
border-radius: calc(var(--design-unit) * 2px);
|
|
@@ -2091,12 +2091,12 @@
|
|
|
2091
2091
|
.flex-row foundation-select {
|
|
2092
2092
|
flex: 1;
|
|
2093
2093
|
}
|
|
2094
|
-
`,
|
|
2095
|
-
<div class="close-icon" @click=${e=>e.clear()}>${
|
|
2096
|
-
`;function
|
|
2094
|
+
`,da=(e="start",t="#879ba6")=>`\n <svg class="svg-icon" slot="${e}" width="16px" height="16px">\n <g transform="matrix(1 0 0 1 -1865 -3576 )">\n <path d="M 15.8825 14.185499999999998 L 9.697000000000001 8 L 14.825000000000001 2.872 L 15.8825 1.814499999999999 C 16.0385 1.6584999999999992 16.0385 1.4049999999999994 15.8825 1.2489999999999988 L 14.751 0.11749999999999972 C 14.594999999999999 -0.03850000000000087 14.3415 -0.03850000000000087 14.1855 0.11749999999999972 L 8 6.303000000000001 L 1.8145 0.11699999999999999 C 1.6585 -0.03900000000000059 1.4050000000000002 -0.03900000000000059 1.2489999999999999 0.11699999999999999 L 0.11699999999999999 1.2485 C -0.039000000000000014 1.4044999999999996 -0.039000000000000014 1.6579999999999995 0.11699999999999999 1.814 L 6.303000000000001 8 L 0.11699999999999999 14.185499999999998 C -0.039000000000000014 14.3415 -0.039000000000000014 14.594999999999999 0.11699999999999999 14.751000000000001 L 1.2485 15.8825 C 1.4045 16.0385 1.658 16.0385 1.814 15.8825 L 8 9.697 L 13.128 14.825 L 14.1855 15.8825 C 14.3415 16.0385 14.594999999999999 16.0385 14.751 15.8825 L 15.8825 14.751000000000001 C 16.0385 14.594999999999999 16.0385 14.3415 15.8825 14.185499999999998 Z " fill-rule="nonzero" fill="${t}" stroke="none" transform="matrix(1 0 0 1 1865 3576 )" />\n </g>\n </svg>\n`,ca=l.html`
|
|
2095
|
+
<div class="close-icon" @click=${e=>e.clear()}>${da()}</div>
|
|
2096
|
+
`;function ua(e){var t,i,o;return null!==(o=null===(i=null===(t=null==e?void 0:e.event)||void 0===t?void 0:t.target)||void 0===i?void 0:i.value)&&void 0!==o?o:"all"}const ha=[{name:"All",value:"all",selected:!0},{name:"True",value:"true"},{name:"False",value:"false"},{name:"N/A",value:"null"}],pa=(e,t)=>{switch(e.type){case"number":return(e=>l.html`
|
|
2097
2097
|
<div class="flex-row">
|
|
2098
2098
|
<div>${e=>e.label}</div>
|
|
2099
|
-
${
|
|
2099
|
+
${ca}
|
|
2100
2100
|
</div>
|
|
2101
2101
|
<div class="flex-row">
|
|
2102
2102
|
<${e}-text-field
|
|
@@ -2115,7 +2115,7 @@
|
|
|
2115
2115
|
`)(t);case"date":return(e=>l.html`
|
|
2116
2116
|
<div class="flex-row">
|
|
2117
2117
|
<div>${e=>e.label}</div>
|
|
2118
|
-
${
|
|
2118
|
+
${ca}
|
|
2119
2119
|
</div>
|
|
2120
2120
|
<div class="flex-row">
|
|
2121
2121
|
<${e}-text-field
|
|
@@ -2132,11 +2132,11 @@
|
|
|
2132
2132
|
`)(t);case"boolean":return(e=>l.html`
|
|
2133
2133
|
<div class="flex-row">
|
|
2134
2134
|
<div>${e=>e.label}</div>
|
|
2135
|
-
${
|
|
2135
|
+
${ca}
|
|
2136
2136
|
</div>
|
|
2137
2137
|
<div class="flex-row">
|
|
2138
|
-
<${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(
|
|
2139
|
-
${(0,l.repeat)(()=>
|
|
2138
|
+
<${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(ua(t))}}">
|
|
2139
|
+
${(0,l.repeat)(()=>ha,l.html`
|
|
2140
2140
|
<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">
|
|
2141
2141
|
${e=>e.name}
|
|
2142
2142
|
</${e}-option>
|
|
@@ -2146,10 +2146,10 @@
|
|
|
2146
2146
|
`)(t);case"enum":return(e=>l.html`
|
|
2147
2147
|
<div class="flex-row">
|
|
2148
2148
|
<div>${e=>e.label}</div>
|
|
2149
|
-
${
|
|
2149
|
+
${ca}
|
|
2150
2150
|
</div>
|
|
2151
2151
|
<div class="flex-row">
|
|
2152
|
-
<${e}-select @change="${(e,t)=>e.onEnumFilterSelection(
|
|
2152
|
+
<${e}-select @change="${(e,t)=>e.onEnumFilterSelection(ua(t))}}">
|
|
2153
2153
|
${(0,l.repeat)(e=>e.enumFilterOptions,l.html`
|
|
2154
2154
|
<${e}-option value="${e=>e.value}" selected="${e=>e.selected}">
|
|
2155
2155
|
${e=>e.name}
|
|
@@ -2160,7 +2160,7 @@
|
|
|
2160
2160
|
`)(t);default:return(e=>l.html`
|
|
2161
2161
|
<div class="flex-row">
|
|
2162
2162
|
<div>${e=>e.label}</div>
|
|
2163
|
-
${
|
|
2163
|
+
${ca}
|
|
2164
2164
|
</div>
|
|
2165
2165
|
<div class="flex-row">
|
|
2166
2166
|
<${e}-text-field
|
|
@@ -2169,11 +2169,11 @@
|
|
|
2169
2169
|
:value=${(0,U.O)(e=>e.textFilter)}
|
|
2170
2170
|
/>
|
|
2171
2171
|
</div>
|
|
2172
|
-
`)(t)}},
|
|
2173
|
-
<div class="filter-wrapper">${t=>
|
|
2174
|
-
`,
|
|
2175
|
-
${e=>
|
|
2176
|
-
`;var
|
|
2172
|
+
`)(t)}},ma=e=>l.html`
|
|
2173
|
+
<div class="filter-wrapper">${t=>pa(t,e)}</div>
|
|
2174
|
+
`,ga=l.html`
|
|
2175
|
+
${e=>ma(T(e))}</div>
|
|
2176
|
+
`;var va;!function(e){e.change="filter-changed",e.clear="filter-cleared"}(va||(va={}));class fa extends a.FoundationElement{constructor(){super(...arguments),this.type="text",this.textFilter="",this.enumFilterOptions=[{name:"All",value:"all",selected:!0}]}textFilterChanged(e,t){if(!(null==t?void 0:t.length))return void this.$emit(va.clear,{fieldName:this.fieldName,target:this.target});const i=`Expr.containsIgnoreCase(${this.fieldName},'${t}')`;this.$emit(va.change,{fieldName:this.fieldName,filter:i,target:this.target})}numFilterMinChanged(e,t){this.numFilterMin=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}numFilterMaxChanged(e,t){this.numFilterMax=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}handleNumericFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t))return void this.$emit(va.clear,{fieldName:this.fieldName,target:this.target});const i=`${this.fieldName} >= ${e}`,o=`${this.fieldName} <= ${t}`,n=Number.isFinite(e)?Number.isFinite(t)?`(${i} && ${o})`:i:o;this.$emit(va.change,{fieldName:this.fieldName,filter:n,target:this.target})}formatDate(e){if(Number.isFinite(e))return new Date(e).toISOString().slice(0,19).replace(/-/g,"").replace("T","-")}dateFilterMinChanged(e,t){this.dateMinMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}dateFilterMaxChanged(e,t){this.dateMaxMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}handleDateFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t))return void this.$emit(va.clear,{fieldName:this.fieldName});const i=`Expr.dateTimeIsAfter(${this.fieldName}, '${this.formatDate(e)}')`,o=`Expr.dateTimeIsBefore(${this.fieldName}, '${this.formatDate(t)}')`,n=Number.isFinite(e)?Number.isFinite(t)?`(${i} && ${o})`:i:o;this.$emit(va.change,{fieldName:this.fieldName,filter:n,target:this.target})}connectedCallback(){var e;if(super.connectedCallback(),null===(e=this.enumOptions)||void 0===e?void 0:e.length){const e=this.enumOptions.includes("|")?"|":",",t=this.enumOptions.split(e).map(e=>({name:e,value:e}));this.enumFilterOptions=[{name:"All",value:"all",selected:!0},...t]}}clear(){switch(this.type){case"number":this.numFilterFieldMin.value=void 0,this.numFilterFieldMax.value=void 0,this.numFilterMin=void 0,this.numFilterMax=void 0;break;case"date":this.dateFilterFieldMin.value="",this.dateFilterFieldMax.value="",this.dateMinMS=NaN,this.dateMaxMS=NaN;break;case"text":this.textFilterField.value=""}this.$emit(va.clear,{fieldName:this.fieldName,target:this.target})}onBooleanFilterSelection(e){e&&"all"!==e?this.$emit(va.change,{fieldName:this.fieldName,filter:`${this.fieldName} == ${e}`,target:this.target}):this.$emit(va.clear,{fieldName:this.fieldName,target:this.target})}onEnumFilterSelection(e){e&&"all"!==e?this.$emit(va.change,{fieldName:this.fieldName,filter:`${this.fieldName} == "${e}"`,target:this.target}):this.$emit(va.clear,{fieldName:this.fieldName,target:this.target})}}(0,C.Cg)([l.attr],fa.prototype,"fieldName",void 0),(0,C.Cg)([l.attr],fa.prototype,"type",void 0),(0,C.Cg)([l.attr],fa.prototype,"label",void 0),(0,C.Cg)([l.attr],fa.prototype,"target",void 0),(0,C.Cg)([l.observable],fa.prototype,"textFilter",void 0),(0,C.Cg)([l.observable],fa.prototype,"numFilterMin",void 0),(0,C.Cg)([l.observable],fa.prototype,"numFilterMax",void 0),(0,C.Cg)([l.observable],fa.prototype,"dateFilterMin",void 0),(0,C.Cg)([l.observable],fa.prototype,"dateFilterMax",void 0),(0,C.Cg)([l.attr],fa.prototype,"enumOptions",void 0),(0,C.Cg)([l.observable],fa.prototype,"enumFilterOptions",void 0);const ba=fa.compose({baseName:"filter",template:ga,styles:la});var ya=i(64324);const wa=(e,t)=>l.css`
|
|
2177
2177
|
.filter-bar {
|
|
2178
2178
|
background-color: #2c2f33;
|
|
2179
2179
|
padding: calc(var(--design-unit) * 2px);
|
|
@@ -2209,9 +2209,9 @@
|
|
|
2209
2209
|
.toggle-collapsed {
|
|
2210
2210
|
color: #48ed9c;
|
|
2211
2211
|
}
|
|
2212
|
-
`,
|
|
2212
|
+
`,Ca=e=>{switch(e){case"INT":case"DOUBLE":case"LONG":return"number";case"DATETIME":return"date";case"BOOLEAN":return"boolean";case"ENUM":return"enum";default:return"text"}},xa=l.html`
|
|
2213
2213
|
<p>Fetching metadata for ${e=>e.resource}...</p>
|
|
2214
|
-
|
|
2214
|
+
`,$a=e=>l.html`
|
|
2215
2215
|
<div
|
|
2216
2216
|
class=${e=>(0,x.x)(["toggle",!0],["toggle-collapsed",e.collapsed])}
|
|
2217
2217
|
@click="${e=>e.toggle()}"
|
|
@@ -2231,17 +2231,17 @@
|
|
|
2231
2231
|
<${e}-filter
|
|
2232
2232
|
label="${e=>e.UI_LABEL}"
|
|
2233
2233
|
target="${(e,t)=>{var i;return null===(i=t.parent)||void 0===i?void 0:i.target}}"
|
|
2234
|
-
type="${e=>
|
|
2234
|
+
type="${e=>Ca(e.TYPE)}"
|
|
2235
2235
|
fieldName="${e=>e.NAME}"
|
|
2236
2236
|
enumOptions="${e=>e.VALID_VALUES}"
|
|
2237
2237
|
></${e}-filter>
|
|
2238
2238
|
`)}
|
|
2239
2239
|
</div>
|
|
2240
2240
|
</div>
|
|
2241
|
-
|
|
2242
|
-
${e=>e.ready
|
|
2243
|
-
`,
|
|
2244
|
-
${t&&`@media only screen and ${
|
|
2241
|
+
`,Sa=l.html`
|
|
2242
|
+
${e=>e.ready?$a(T(e)):xa}
|
|
2243
|
+
`,Ea=5;class Oa extends a.FoundationElement{constructor(){super(...arguments),this.columns=Ea,this.ready=!1,this.collapsed=!0}connectedCallback(){super.connectedCallback(),this.init()}initLabels(){var e,t,i,o;let n=!1,s=[];(null===(e=null==this?void 0:this.labels)||void 0===e?void 0:e.length)&&(s=null===(t=this.labels.split(","))||void 0===t?void 0:t.map(e=>e.trim()),n=(null===(i=this.fields)||void 0===i?void 0:i.length)===(null==s?void 0:s.length));for(let e=0;e<((null===(o=this.fields)||void 0===o?void 0:o.length)||0);e+=1){const t=n?s[e]:this.camelCasePreserveWhitespace(this.fields[e].NAME.replace(/_/g," "));this.fields[e].UI_LABEL=t}}camelCasePreserveWhitespace(e){return e.split(" ").map(e=>(0,ya.fL)(e)).join(" ")}resourceChanged(e,t){e!==t&&(null==e?void 0:e.length)&&this.init()}init(){this.ready=!1,this.connect.getMetadata(this.resource).then(e=>{var t,i;if(this.fields=e.FIELD,null===(t=this.only)||void 0===t?void 0:t.length){const e=this.only.split(",").map(e=>e.trim()),t=(t,i)=>e.indexOf(t.NAME)>e.indexOf(i.NAME)?1:-1;this.fields=null===(i=this.fields)||void 0===i?void 0:i.filter(t=>e.includes(t.NAME)).sort(t)}this.ready=!0}).then(()=>this.initLabels()).then(()=>window.requestAnimationFrame(()=>{this.adjustColumnStyles()})).catch(e=>ot.error(e))}adjustColumnStyles(){this.filterGrid&&(this.filterGrid.style["grid-template-columns"]=`repeat(${this.columns}, 1fr)`)}toggle(){this.ready&&(this.collapsed=!this.collapsed)}}(0,C.Cg)([l.attr],Oa.prototype,"resource",void 0),(0,C.Cg)([l.attr],Oa.prototype,"only",void 0),(0,C.Cg)([l.attr],Oa.prototype,"labels",void 0),(0,C.Cg)([l.attr],Oa.prototype,"target",void 0),(0,C.Cg)([l.attr],Oa.prototype,"columns",void 0),(0,C.Cg)([l.observable],Oa.prototype,"ready",void 0),(0,C.Cg)([l.observable],Oa.prototype,"fields",void 0),(0,C.Cg)([hi.dm],Oa.prototype,"connect",void 0),(0,C.Cg)([l.observable],Oa.prototype,"collapsed",void 0);const Ta=Oa.compose({baseName:"filter-bar",template:Sa,styles:wa});var ka;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(ka||(ka={}));const Da=e=>{const t=e?`-${e}`:"";return l.css`
|
|
2244
|
+
${t&&`@media only screen and ${ka[e]} {`}
|
|
2245
2245
|
:host(.spacing${t}-1x) slot {
|
|
2246
2246
|
gap: calc(var(--design-unit) * 2px);
|
|
2247
2247
|
}
|
|
@@ -2358,7 +2358,7 @@
|
|
|
2358
2358
|
align-content: space-evenly;
|
|
2359
2359
|
}
|
|
2360
2360
|
${t&&"}"}
|
|
2361
|
-
`},
|
|
2361
|
+
`},Ia=l.css`
|
|
2362
2362
|
:host {
|
|
2363
2363
|
width: 100%;
|
|
2364
2364
|
height: 100%;
|
|
@@ -2370,17 +2370,17 @@
|
|
|
2370
2370
|
display: flex;
|
|
2371
2371
|
}
|
|
2372
2372
|
|
|
2373
|
-
${
|
|
2374
|
-
${
|
|
2375
|
-
${
|
|
2376
|
-
${
|
|
2377
|
-
`,
|
|
2373
|
+
${Da()}
|
|
2374
|
+
${Da("lg")}
|
|
2375
|
+
${Da("md")}
|
|
2376
|
+
${Da("sm")}
|
|
2377
|
+
`,Ra=l.html`
|
|
2378
2378
|
<template>
|
|
2379
2379
|
<slot></slot>
|
|
2380
2380
|
</template>
|
|
2381
|
-
`,
|
|
2381
|
+
`,Aa=void 0,La={};class Na extends a.FoundationElement{}const Fa=Na.compose(Object.assign({baseName:"flex-layout",styles:Ia,template:Ra,shadowOptions:Aa},La)),Ma=(e,t)=>l.css`
|
|
2382
2382
|
${(0,r.flipperStyles)(e,t)}
|
|
2383
|
-
`,
|
|
2383
|
+
`,_a=(e,t)=>(0,a.flipperTemplate)(e,t);class Ha extends r.Flipper{}const Pa=void 0,za={next:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"\n />\n </svg>\n ',previous:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M11.273 15.977L3.29 8 11.273.023l.704.704L4.71 8l7.266 7.273-.704.704z"\n />\n </svg>\n '},Ua=Ha.compose(Object.assign({baseName:"flipper",template:_a,styles:Ma,shadowOptions:Pa},za)),Ba=225,Va=l.css`
|
|
2384
2384
|
/* Host */
|
|
2385
2385
|
:host {
|
|
2386
2386
|
display: inline-block;
|
|
@@ -2406,8 +2406,8 @@
|
|
|
2406
2406
|
position: absolute;
|
|
2407
2407
|
/* stylelint-disable-next-line function-name-case */
|
|
2408
2408
|
transition:
|
|
2409
|
-
transform ${
|
|
2410
|
-
width ${
|
|
2409
|
+
transform ${Ba.toString()}ms ease-in,
|
|
2410
|
+
width ${Ba.toString()}ms ease-in-out;
|
|
2411
2411
|
width: var(--flyout-width, 20%);
|
|
2412
2412
|
z-index: 2001;
|
|
2413
2413
|
}
|
|
@@ -2466,7 +2466,7 @@
|
|
|
2466
2466
|
opacity: 50%;
|
|
2467
2467
|
position: absolute;
|
|
2468
2468
|
/* stylelint-disable-next-line function-name-case */
|
|
2469
|
-
transition: opacity ${
|
|
2469
|
+
transition: opacity ${Ba.toString()}ms linear;
|
|
2470
2470
|
width: 100%;
|
|
2471
2471
|
z-index: 2000;
|
|
2472
2472
|
}
|
|
@@ -2474,7 +2474,7 @@
|
|
|
2474
2474
|
:host([visuallyhidden]) div.background {
|
|
2475
2475
|
opacity: 0%;
|
|
2476
2476
|
}
|
|
2477
|
-
`,
|
|
2477
|
+
`,Ga=e=>l.html`
|
|
2478
2478
|
<div ?closed=${e=>e.closed} ?visuallyhidden=${e=>e.visuallyhidden}>
|
|
2479
2479
|
<div class="container">
|
|
2480
2480
|
<div class="background" part="background" @click=${e=>e.closeFlyout()}></div>
|
|
@@ -2498,10 +2498,10 @@
|
|
|
2498
2498
|
</div>
|
|
2499
2499
|
</div>
|
|
2500
2500
|
</div>
|
|
2501
|
-
`,
|
|
2502
|
-
${e=>
|
|
2503
|
-
`;class
|
|
2504
|
-
${t&&`@media only screen and ${
|
|
2501
|
+
`,ja=l.html`
|
|
2502
|
+
${e=>Ga(T(e))}
|
|
2503
|
+
`;class Ya extends a.FoundationElement{constructor(){super(...arguments),this.position="right",this.flyoutWidth="20%",this.displayHeader=!0,this.closed=!0,this.visuallyhidden=!0}flyoutWidthChanged(){this.isConnected&&null!=this.flyoutWidth&&this.style.setProperty("--flyout-width",this.flyoutWidth)}closedChanged(){this.closed||(setTimeout(()=>this.visuallyhidden=!1,1),this.focusExit())}connectedCallback(){super.connectedCallback(),null!=this.flyoutWidth&&this.style.setProperty("--flyout-width",this.flyoutWidth)}closeFlyout(){this.visuallyhidden=!0}closingFinished(){this.visuallyhidden&&(this.closed=!0,this.$emit("closed"))}focusExit(){this.exit.focus()}}(0,C.Cg)([l.attr],Ya.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({attribute:"flyout-width"})],Ya.prototype,"flyoutWidth",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ya.prototype,"displayHeader",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ya.prototype,"closed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ya.prototype,"visuallyhidden",void 0);const Wa=void 0,qa={},Ka=Ya.compose(Object.assign({baseName:"flyout",styles:Va,template:ja,shadowOptions:Wa},qa));var Xa;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(Xa||(Xa={}));const Ja=e=>{const t=e?`-${e}`:"";return l.css`
|
|
2504
|
+
${t&&`@media only screen and ${Xa[e]} {`}
|
|
2505
2505
|
:host(.spacing${t}-1x) slot {
|
|
2506
2506
|
gap: calc(var(--design-unit) * 2px);
|
|
2507
2507
|
}
|
|
@@ -2586,32 +2586,32 @@
|
|
|
2586
2586
|
place-items: stretch;
|
|
2587
2587
|
}
|
|
2588
2588
|
${t&&"}"}
|
|
2589
|
-
`},
|
|
2589
|
+
`},Qa=l.css`
|
|
2590
2590
|
slot {
|
|
2591
2591
|
width: 100%;
|
|
2592
2592
|
height: 100%;
|
|
2593
2593
|
display: grid;
|
|
2594
2594
|
}
|
|
2595
2595
|
|
|
2596
|
-
${
|
|
2597
|
-
${
|
|
2598
|
-
${
|
|
2599
|
-
${
|
|
2600
|
-
`,
|
|
2596
|
+
${Ja()}
|
|
2597
|
+
${Ja("lg")}
|
|
2598
|
+
${Ja("md")}
|
|
2599
|
+
${Ja("sm")}
|
|
2600
|
+
`,Za=l.html`
|
|
2601
2601
|
<template>
|
|
2602
2602
|
<slot></slot>
|
|
2603
2603
|
</template>
|
|
2604
|
-
`,
|
|
2604
|
+
`,er=void 0,tr={};class ir{constructor(e,t,i,o="1fr",n="1fr"){this.listenerCache=new WeakMap,this.query=window.matchMedia(e);const s=t&&l.cssPartial`grid-template-columns: repeat(${t}, ${o});`,a=i&&l.cssPartial`grid-template-rows: repeat(${i}, ${n});`;this.styles=l.css`
|
|
2605
2605
|
slot {
|
|
2606
2606
|
${a||""}
|
|
2607
2607
|
${s||""}
|
|
2608
2608
|
}
|
|
2609
|
-
`}bind(e){let t=!1;const i=i=>{const{matches:o}=i;o&&!t?(e.$fastController.addStyles(this.styles),t=!0):!o&&t&&(this.styles&&e.$fastController.removeStyles(this.styles),t=!1)};i({matches:this.query.matches}),this.query.addEventListener("change",i),this.listenerCache.set(e,i)}unbind(e){const t=this.listenerCache.get(e);t&&(this.query.removeEventListener("change",t),this.listenerCache.delete(e)),this.styles&&e.$fastController.removeStyles(this.styles)}}class
|
|
2609
|
+
`}bind(e){let t=!1;const i=i=>{const{matches:o}=i;o&&!t?(e.$fastController.addStyles(this.styles),t=!0):!o&&t&&(this.styles&&e.$fastController.removeStyles(this.styles),t=!1)};i({matches:this.query.matches}),this.query.addEventListener("change",i),this.listenerCache.set(e,i)}unbind(e){const t=this.listenerCache.get(e);t&&(this.query.removeEventListener("change",t),this.listenerCache.delete(e)),this.styles&&e.$fastController.removeStyles(this.styles)}}class or extends a.FoundationElement{constructor(){super(...arguments),this.behaviors=[]}connectedCallback(){super.connectedCallback(),this.behaviors=Object.keys(Xa).map(e=>{if(this[`col-${e}-count`]||this[`row-${e}-count`])return new ir(Xa[e],this[`col-${e}-count`],this[`row-${e}-count`],this[`col-${e}-width`],this[`row-${e}-height`])}).filter(e=>!!e);const e=this["row-count"]&&l.cssPartial`grid-template-rows: repeat(${this["row-count"]}, ${this["row-height"]||"1fr"});`,t=this["col-count"]&&l.cssPartial`grid-template-columns: repeat(${this["col-count"]}, ${this["col-width"]||"1fr"});`;this.baseStyles=l.css`
|
|
2610
2610
|
slot {
|
|
2611
2611
|
${e||""}
|
|
2612
2612
|
${t||""}
|
|
2613
2613
|
}
|
|
2614
|
-
`,this.$fastController.addStyles(this.baseStyles),this.$fastController.addBehaviors(this.behaviors)}disconnectedCallback(){super.disconnectedCallback(),this.$fastController.removeBehaviors(this.behaviors),this.baseStyles&&this.$fastController.removeStyles(this.baseStyles)}}(0,C.Cg)([l.attr],
|
|
2614
|
+
`,this.$fastController.addStyles(this.baseStyles),this.$fastController.addBehaviors(this.behaviors)}disconnectedCallback(){super.disconnectedCallback(),this.$fastController.removeBehaviors(this.behaviors),this.baseStyles&&this.$fastController.removeStyles(this.baseStyles)}}(0,C.Cg)([l.attr],or.prototype,"col-count",void 0),(0,C.Cg)([l.attr],or.prototype,"col-width",void 0),(0,C.Cg)([l.attr],or.prototype,"col-lg-count",void 0),(0,C.Cg)([l.attr],or.prototype,"col-lg-width",void 0),(0,C.Cg)([l.attr],or.prototype,"col-md-count",void 0),(0,C.Cg)([l.attr],or.prototype,"col-md-width",void 0),(0,C.Cg)([l.attr],or.prototype,"col-sm-count",void 0),(0,C.Cg)([l.attr],or.prototype,"col-sm-width",void 0),(0,C.Cg)([l.attr],or.prototype,"row-count",void 0),(0,C.Cg)([l.attr],or.prototype,"row-height",void 0),(0,C.Cg)([l.attr],or.prototype,"row-lg-count",void 0),(0,C.Cg)([l.attr],or.prototype,"row-lg-height",void 0),(0,C.Cg)([l.attr],or.prototype,"row-md-count",void 0),(0,C.Cg)([l.attr],or.prototype,"row-md-height",void 0),(0,C.Cg)([l.attr],or.prototype,"row-sm-count",void 0),(0,C.Cg)([l.attr],or.prototype,"row-sm-height",void 0);const nr=or.compose(Object.assign({baseName:"grid-layout",styles:Qa,template:Za,shadowOptions:er},tr)),sr=l.html`
|
|
2615
2615
|
<template>
|
|
2616
2616
|
<style>
|
|
2617
2617
|
:host {
|
|
@@ -2637,9 +2637,9 @@
|
|
|
2637
2637
|
</style>
|
|
2638
2638
|
<slot></slot>
|
|
2639
2639
|
</template>
|
|
2640
|
-
`,
|
|
2640
|
+
`,ar=void 0,rr={};class lr extends a.FoundationElement{setGridItemProperties(e,t,i,o){if(t&&e&&i&&o){return`grid-row: ${0===t||0===o?"auto":`${t} / ${Number(t)+Number(o)}`}; grid-column: ${0===e||0===i?"auto":`${e} / ${Number(e)+Number(i)}`}`}}}(0,C.Cg)([(0,l.attr)({attribute:"col-number"})],lr.prototype,"colNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-sm-number"})],lr.prototype,"colSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-md-number"})],lr.prototype,"colMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-lg-number"})],lr.prototype,"colLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-number"})],lr.prototype,"rowNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-sm-number"})],lr.prototype,"rowSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-md-number"})],lr.prototype,"rowMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-lg-number"})],lr.prototype,"rowLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width"})],lr.prototype,"width",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-sm"})],lr.prototype,"widthSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-md"})],lr.prototype,"widthMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-lg"})],lr.prototype,"widthLg",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height"})],lr.prototype,"height",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-sm"})],lr.prototype,"heightSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-md"})],lr.prototype,"heightMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-lg"})],lr.prototype,"heightLg",void 0);const dr=lr.compose(Object.assign({baseName:"grid-layout-item",template:sr,shadowOptions:ar},rr)),cr=(e,t)=>l.css`
|
|
2641
2641
|
${(0,r.horizontalScrollStyles)(e,t)}
|
|
2642
|
-
`,
|
|
2642
|
+
`,ur=(e,t)=>(0,a.horizontalScrollTemplate)(e,t);class hr extends r.HorizontalScroll{}const pr={delegatesFocus:!0,mode:"open"},mr={nextFlipper:l.html`
|
|
2643
2643
|
<foundation-flipper
|
|
2644
2644
|
@click="${e=>e.scrollToNext()}"
|
|
2645
2645
|
aria-hidden="${e=>e.flippersHiddenFromAT}"
|
|
@@ -2650,8 +2650,8 @@
|
|
|
2650
2650
|
direction="previous"
|
|
2651
2651
|
aria-hidden="${e=>e.flippersHiddenFromAT}"
|
|
2652
2652
|
></foundation-flipper>
|
|
2653
|
-
`},
|
|
2654
|
-
${
|
|
2653
|
+
`},gr=hr.compose(Object.assign({baseName:"horizontal-scroll",template:ur,styles:cr,shadowOptions:pr},mr));var vr=i(70623),fr=i(32808),br=i(10463),yr=i(19037),wr=i(22984);const Cr=()=>(vr.Yv.add(wr.X7I,yr.C91,br.Cvc),vr.tT.css()),xr=(e,t)=>l.css`
|
|
2654
|
+
${Cr()}
|
|
2655
2655
|
|
|
2656
2656
|
.fa-stack-1x {
|
|
2657
2657
|
font-size: 1em;
|
|
@@ -2744,7 +2744,7 @@
|
|
|
2744
2744
|
height: auto;
|
|
2745
2745
|
box-sizing: border-box;
|
|
2746
2746
|
}
|
|
2747
|
-
|
|
2747
|
+
`,$r=e=>l.html`
|
|
2748
2748
|
<template>
|
|
2749
2749
|
<i
|
|
2750
2750
|
${(0,l.ref)("iElement")}
|
|
@@ -2769,9 +2769,9 @@
|
|
|
2769
2769
|
</${e}-tooltip>
|
|
2770
2770
|
`)}
|
|
2771
2771
|
</template>
|
|
2772
|
-
|
|
2773
|
-
${e
|
|
2774
|
-
`,
|
|
2772
|
+
`,Sr=l.html`
|
|
2773
|
+
${e=>$r(T(e))}
|
|
2774
|
+
`,Er={mode:"open",delegatesFocus:!0},Or={};var Tr;!function(e){e.solid="fas",e.regular="far",e.brand="fab"}(Tr||(Tr={}));const kr="1x",Dr=["2xs","xs","sm","lg","xl","2xl",kr,"2x","3x","4x","5x","6x","7x","8x","9x","10x","stack-1x","stack-2x"];class Ir extends a.FoundationElement{constructor(){super(...arguments),this.isError=!1,this.tooltipShowTimer=null,this.size="sm",this.variant="solid",this.showTooltip=()=>{const e=this.tooltipElement;e&&null===this.tooltipShowTimer&&!e.matches(":popover-open")&&(this.tooltipShowTimer=window.setTimeout(()=>{this.tooltipShowTimer=null;const e=this.tooltipElement;(null==e?void 0:e.isConnected)&&(e.showPopover(),this.positionTooltip(e))},300))},this.hideTooltip=()=>{var e;null!==this.tooltipShowTimer&&(window.clearTimeout(this.tooltipShowTimer),this.tooltipShowTimer=null),(null===(e=this.tooltipElement)||void 0===e?void 0:e.matches(":popover-open"))&&this.tooltipElement.hidePopover()}}nameChanged(e,t){t&&this.loadIcon()}sizeChanged(e,t){t&&this.loadIcon()}variantChanged(e,t){t&&this.loadIcon()}connectedCallback(){var e,t,i,o;super.connectedCallback(),this.loadIcon(),null===(e=this.iElement)||void 0===e||e.addEventListener("mouseover",this.showTooltip,{passive:!0}),null===(t=this.iElement)||void 0===t||t.addEventListener("focusin",this.showTooltip,{passive:!0}),null===(i=this.iElement)||void 0===i||i.addEventListener("mouseout",this.hideTooltip,{passive:!0}),null===(o=this.iElement)||void 0===o||o.addEventListener("focusout",this.hideTooltip,{passive:!0})}disconnectedCallback(){super.disconnectedCallback(),this.iElement.replaceChildren(),this.iElement.removeEventListener("mouseover",this.showTooltip),this.iElement.removeEventListener("focusin",this.showTooltip),this.iElement.removeEventListener("mouseout",this.hideTooltip),this.iElement.removeEventListener("focusout",this.hideTooltip),this.hideTooltip()}positionTooltip(e){const t=this.iElement.getBoundingClientRect(),i=e.getBoundingClientRect(),o=Math.max(i.width,e.scrollWidth),n=Math.max(i.height,e.scrollHeight);let s=t.right;s+o>window.innerWidth-8&&(s=Math.max(8,t.left-o));const a=Math.max(8,window.innerHeight-n-8),r=Math.min(Math.max(t.top,8),a);e.style.top=`${r}px`,e.style.left=`${s}px`}getDefaultTooltipConfig(){this.name||(this.name="question-circle",this.size="1x",this.variant="regular")}loadIcon(){if(!this.iElement)return;this.tooltip&&(this.tooltipId||(this.tooltipId=this.uuid.createId()),this.getDefaultTooltipConfig());const e=(0,vr.wu)({prefix:Tr[this.variant],iconName:this.name}),t=(0,vr.Kk)(e);t&&t.node&&(this.iElement.innerHTML="",Array.from(t.node).map(e=>this.iElement.appendChild(e)))}}(0,C.Cg)([l.observable],Ir.prototype,"iElement",void 0),(0,C.Cg)([fr.k],Ir.prototype,"uuid",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tooltip-id"})],Ir.prototype,"tooltipId",void 0),(0,C.Cg)([l.attr],Ir.prototype,"tooltip",void 0),(0,C.Cg)([(0,l.attr)({attribute:"error",mode:"boolean"})],Ir.prototype,"isError",void 0),(0,C.Cg)([l.attr],Ir.prototype,"name",void 0),(0,C.Cg)([l.attr],Ir.prototype,"size",void 0),(0,C.Cg)([l.attr],Ir.prototype,"variant",void 0);const Rr=Ir.compose(Object.assign({baseName:"icon",template:Sr,styles:xr,shadowOptions:Er},Or)),Ar=(e,t)=>l.css`
|
|
2775
2775
|
${(0,r.listboxStyles)(e,t)}
|
|
2776
2776
|
|
|
2777
2777
|
:host {
|
|
@@ -2782,11 +2782,11 @@
|
|
|
2782
2782
|
border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);
|
|
2783
2783
|
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
2784
2784
|
}
|
|
2785
|
-
`,
|
|
2785
|
+
`,Lr=(e,t)=>(0,a.listboxTemplate)(e,t);class Nr extends r.Listbox{}const Fr=void 0,Mr={},_r=Nr.compose(Object.assign({baseName:"listbox",template:Lr,styles:Ar,shadowOptions:Fr},Mr)),Hr=(e,t)=>l.css`
|
|
2786
2786
|
${(0,r.optionStyles)(e,t)}
|
|
2787
|
-
`,
|
|
2787
|
+
`,Pr=(e,t)=>(0,a.listboxOptionTemplate)(e,t);class zr extends r.ListboxOption{}const Ur=void 0,Br={},Vr=zr.compose(Object.assign({baseName:"option",template:Pr,styles:Hr,shadowOptions:Ur},Br)),Gr=(e,t)=>l.css`
|
|
2788
2788
|
${(0,r.menuStyles)(e,t)}
|
|
2789
|
-
`,
|
|
2789
|
+
`,jr=(e,t)=>(0,a.menuTemplate)(e,t);class Yr extends r.Menu{}const Wr=void 0,qr={},Kr=Yr.compose(Object.assign({baseName:"menu",template:jr,styles:Gr,shadowOptions:Wr},qr)),Xr=(e,t)=>l.css`
|
|
2790
2790
|
${(0,r.menuItemStyles)(e,t)}
|
|
2791
2791
|
|
|
2792
2792
|
:host, :host(.indent-0[aria-haspopup='menu']) {
|
|
@@ -2800,11 +2800,11 @@
|
|
|
2800
2800
|
height: auto;
|
|
2801
2801
|
width: auto;
|
|
2802
2802
|
}
|
|
2803
|
-
`,
|
|
2804
|
-
${
|
|
2805
|
-
`,
|
|
2806
|
-
${
|
|
2807
|
-
`,
|
|
2803
|
+
`,Jr=(e,t)=>(0,a.menuItemTemplate)(e,t);class Qr extends r.MenuItem{connectedCallback(){super.connectedCallback(),this.addEventListener("click",()=>this.$emit("onMenuClick"))}}const Zr=void 0,el={expandCollapseGlyph:'\n <svg\n class="expand-collapse-glyph"\n part="expand-collapse-glyph"\n viewBox="0 0 16 16"\n xmlns="http://www.w3.org/2000/svg">\n <path\n d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"\n />\n </svg>\n '},tl=Qr.compose(Object.assign({baseName:"menu-item",template:Jr,styles:Xr,shadowOptions:Zr},el)),il=l.css`
|
|
2804
|
+
${En}
|
|
2805
|
+
`,ol=l.html`
|
|
2806
|
+
${Dn}
|
|
2807
|
+
`,nl={mode:"open",delegatesFocus:!0},sl={};class al extends An{show(){var e,t;null===(e=this.onShowCallback)||void 0===e||e.call(this),null===(t=this.mainElement)||void 0===t||t.showModal()}}const rl=al.compose(Object.assign({baseName:"modal",template:ol,styles:il,shadowOptions:nl},sl)),ll=230,dl=l.css`
|
|
2808
2808
|
:host {
|
|
2809
2809
|
--scrollbar-width: 12px;
|
|
2810
2810
|
--scrollbar-thumb-width: 8px;
|
|
@@ -2948,7 +2948,7 @@
|
|
|
2948
2948
|
|
|
2949
2949
|
.visible {
|
|
2950
2950
|
visibility: visible;
|
|
2951
|
-
max-height: var(--custom-max-height, ${
|
|
2951
|
+
max-height: var(--custom-max-height, ${ll.toString()}px);
|
|
2952
2952
|
overflow: hidden;
|
|
2953
2953
|
}
|
|
2954
2954
|
|
|
@@ -3045,7 +3045,7 @@
|
|
|
3045
3045
|
resize: none;
|
|
3046
3046
|
overflow: hidden;
|
|
3047
3047
|
}
|
|
3048
|
-
`;let
|
|
3048
|
+
`;let cl=class extends vi{constructor(){super(...arguments),this.isSnapshot=!0,this.baseCriteria=""}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||ot.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")')})}clearData(){this.select.options=[]}syncComponentData(e){var t;const i=(null!=e?e:Array.from(this.rowsSyncedWithStream.values())).map(e=>{var t;return{value:e[this.valueField],label:this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}});(null===(t=this.select)||void 0===t?void 0:t.async)&&(this.select.loading=!1),this.select.options=i}handleStreamInserts(e){ot.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){ot.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ot.debug("handleStreamUpdates - Method not implemented.")}};(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],cl.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],cl.prototype,"labelField",void 0),cl=(0,C.Cg)([(0,l.customElement)({name:"multiselect-datasource"})],cl);const ul=(e="foundation")=>l.html`
|
|
3049
3049
|
<label
|
|
3050
3050
|
part="label"
|
|
3051
3051
|
for="display-field"
|
|
@@ -3152,11 +3152,11 @@
|
|
|
3152
3152
|
</section>
|
|
3153
3153
|
</div>
|
|
3154
3154
|
<slot
|
|
3155
|
-
${(0,l.slotted)({property:"slottedDatasource",filter:e=>e instanceof
|
|
3155
|
+
${(0,l.slotted)({property:"slottedDatasource",filter:e=>e instanceof cl})}
|
|
3156
3156
|
></slot>
|
|
3157
|
-
`,
|
|
3158
|
-
${
|
|
3159
|
-
`,
|
|
3157
|
+
`,hl=l.html`
|
|
3158
|
+
${ul()}
|
|
3159
|
+
`,pl=void 0,ml={};class gl extends a.FoundationElement{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.resizable=!1,this.filterByContains=!1,this.filterSearchValue="",this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=zt.BELOW,this.itemRenderer=this.defaultItemRenderer,this.initialisedOptions=!1,this.isResizing=!1,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.handleResizeStart=e=>{this.resizable&&this.multiselectDropdown&&(e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.startX=e.clientX,this.startY=e.clientY,this.startWidth=this.multiselectDropdown.offsetWidth,this.startHeight=this.multiselectDropdown.offsetHeight,this.multiselectDropdown.classList.add("is-resizing"),document.addEventListener("mousemove",this.handleResizeMove),document.addEventListener("mouseup",this.handleResizeEnd))},this.handleResizeMove=e=>{if(!this.isResizing||!this.multiselectDropdown)return;e.preventDefault();const t=e.clientX-this.startX,i=e.clientY-this.startY,o=Math.max(250,this.startWidth+t),n=Math.max(100,this.startHeight+i);this.multiselectDropdown&&(this.multiselectDropdown.style.width=`${o}px`,this.multiselectDropdown.style.maxHeight=`${n}px`)},this.handleResizeEnd=()=>{this.isResizing=!1,document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd),this.multiselectDropdown&&(this.multiselectDropdown.classList.remove("is-resizing"),this.multiselectDropdown.style.setProperty("--custom-max-height",this.multiselectDropdown.style.maxHeight),this.multiselectDropdown.style.removeProperty("max-height"))}}debounceChanged(e,t){this.debouncedInputHandler=ii()(this.asyncSetFilter,t)}openChanged(e,t){var i,o,n,s;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.arrowIcon)||void 0===i||i.classList.add("flipped"),null===(o=this.multiselectDropdown)||void 0===o||o.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(n=this.arrowIcon)||void 0===n||n.classList.remove("flipped"),null===(s=this.multiselectDropdown)||void 0===s||s.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===zt.ABOVE&&(null===(e=this.multiselectDropdown)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd)}defaultItemRenderer(e,t){return l.html`
|
|
3160
3160
|
${"string"==typeof e?l.html`
|
|
3161
3161
|
<span part="option-label">${()=>t.getItemLabel(e)}</span>
|
|
3162
3162
|
`:l.html`
|
|
@@ -3168,7 +3168,7 @@
|
|
|
3168
3168
|
${()=>t.getItemLabel(e)}
|
|
3169
3169
|
</span>
|
|
3170
3170
|
`}
|
|
3171
|
-
`}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<
|
|
3171
|
+
`}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<ll&&o>n?zt.ABOVE:zt.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===zt.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===zt.BELOW)}optionValueGetter(e){return"string"==typeof e?e:e.value}optionLabelGetter(e){return"string"==typeof e?e:e.label}getItemLabel(e){let t;return e?(t="string"==typeof e?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get areAllOptionsSelected(){const e=this.getEnabledOptionsCount();return e>0&&this.selectedOptions.length===e}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&0===this.findExactMatchOptions().length}isOptionSelected(e){const t=this.optionValueGetter(e);return this.selectedOptions.some(i=>{if("object"==typeof e&&"object"==typeof e.value)try{return JSON.stringify(i)===JSON.stringify(t)}catch(e){return i===t}return i===t})}selectCheckboxOne(e){const t=this.optionValueGetter(e),i=this.selectedOptions.includes(t);this.selectedOptions=i?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}checkboxKeyDown(e,t){return" "===t.key&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){const e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){const e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>{var i,o;const n="string"==typeof t?t:null!==(i=this.optionLabelGetter(t))&&void 0!==i?i:this.optionValueGetter(t);return(null!==(o=null==n?void 0:n.toLowerCase())&&void 0!==o?o:"")===e})}setFilter(){const e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if("string"==typeof t)return t.toLowerCase().includes(e);const i=t.label.toLowerCase(),o="object"==typeof t.value?(n=t.value,Object.values(n).some(t=>t.toLowerCase().includes(e))):String(t.value).toLowerCase().includes(e);var n;return i.includes(e)||o})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?fi(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,ot.warn("Multiselect-datasource is not connected. Please add a datasource to use this functionality."))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){E(e,this)&&(this.open=!1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Escape":if(this.open){this.open=!1;break}break;case"ArrowUp":case"ArrowDown":if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){const{clearSelectedValues:t=!0,clearFilterText:i=!0}=e;t&&(this.selectedOptions=[],this.$emit("selectionChange",this.selectedOptions)),i&&(this.filterSearchValue="",this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value="")),this.$emit("clear",{clearSelectedValues:t,clearFilterText:i})}}(0,C.Cg)([l.attr],gl.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],gl.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gl.prototype,"all",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gl.prototype,"allSelected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gl.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gl.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gl.prototype,"creatable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gl.prototype,"async",void 0),(0,C.Cg)([l.attr],gl.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gl.prototype,"resizable",void 0),(0,C.Cg)([l.attr],gl.prototype,"tabindex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"filter-by-contains"})],gl.prototype,"filterByContains",void 0),(0,C.Cg)([l.observable],gl.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],gl.prototype,"slottedDatasource",void 0),(0,C.Cg)([l.observable],gl.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],gl.prototype,"loading",void 0),(0,C.Cg)([l.observable],gl.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],gl.prototype,"open",void 0),(0,C.Cg)([l.observable],gl.prototype,"options",void 0),(0,C.Cg)([l.observable],gl.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],gl.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],gl.prototype,"scrollContainer",void 0),(0,C.Cg)([l.attr],gl.prototype,"position",void 0),(0,C.Cg)([l.observable],gl.prototype,"onAllSelectedCallback",void 0),(0,C.Cg)([l.observable],gl.prototype,"itemRenderer",void 0),(0,C.Cg)([l.volatile],gl.prototype,"getDisplayValue",null),(0,C.Cg)([l.volatile],gl.prototype,"getPlaceholder",null),(0,C.Cg)([l.volatile],gl.prototype,"isAllOptionsDisabled",null),(0,C.Cg)([l.volatile],gl.prototype,"areAllOptionsSelected",null),(0,C.Cg)([l.volatile],gl.prototype,"showCreatable",null),(0,C.Cg)([l.observable],gl.prototype,"optionsHeaderSlottedNodes",void 0);const vl=gl.compose(Object.assign({baseName:"multiselect",template:hl,styles:dl,shadowOptions:pl},ml)),fl={k:1e3,m:1e6,b:1e9},bl=/^(.*?)([kmb])$/i;class yl{constructor(e){const t=new Intl.NumberFormat(e).formatToParts(12345.6),i=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)].reverse(),o=new Map(i.map((e,t)=>[e,t]));this._group=new RegExp(`[${t.find(e=>"group"===e.type).value}]`,"g"),this._decimal=new RegExp(`[${t.find(e=>"decimal"===e.type).value}]`),this._separator=new RegExp(`[$${t.find(e=>"decimal"===e.type).value}](?:0*$|[^0]0+$)`),this._numeral=new RegExp(`[${i.join("")}]`,"g"),this._index=e=>o.get(e)}parse(e){const t=e.trim().match(bl),i=t?fl[t[2].toLowerCase()]:1;return(e=(t?t[1]:e).trim().replace(this._group,"").replace(this._decimal,".").replace(this._numeral,this._index))?+e*i:NaN}hasSeparator(e){return this._separator.test(e)}}var wl=i(6526);function Cl(e){class t extends e{constructor(){super(...arguments),this.hideAffixFromScreenReader=!1}get controlAriaDescribedby(){var e;const t=null===(e=this.ariaDescribedby)||void 0===e?void 0:e.trim(),i=[];if(t&&i.push(...t.split(/\s+/).filter(Boolean)),!this.hideAffixFromScreenReader){const e=this.id||"control";this.prefix&&i.push(`${e}-prefix`),this.suffix&&i.push(`${e}-suffix`)}const o=new Set,n=[];for(const e of i)o.has(e)||(o.add(e),n.push(e));return n.join(" ")||void 0}}return(0,C.Cg)([l.attr],t.prototype,"prefix",void 0),(0,C.Cg)([l.attr],t.prototype,"suffix",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-affix-from-screen-reader",mode:"boolean"})],t.prototype,"hideAffixFromScreenReader",void 0),t}const xl=l.css`
|
|
3172
3172
|
.label-hidden {
|
|
3173
3173
|
margin: 0;
|
|
3174
3174
|
}
|
|
@@ -3228,7 +3228,7 @@
|
|
|
3228
3228
|
:host(.has-prefix.has-suffix) .control-field .control {
|
|
3229
3229
|
border-radius: 0;
|
|
3230
3230
|
}
|
|
3231
|
-
|
|
3231
|
+
`,$l=(e,t)=>l.css`
|
|
3232
3232
|
${(0,r.numberFieldStyles)(e,t)}
|
|
3233
3233
|
::part(label) {
|
|
3234
3234
|
color: var(--neutral-foreground-rest);
|
|
@@ -3259,8 +3259,8 @@
|
|
|
3259
3259
|
margin-inline-end: unset;
|
|
3260
3260
|
}
|
|
3261
3261
|
|
|
3262
|
-
${
|
|
3263
|
-
|
|
3262
|
+
${xl}
|
|
3263
|
+
`,Sl=(e,t)=>l.html`
|
|
3264
3264
|
<template
|
|
3265
3265
|
class="${e=>[e.readOnly?"readonly":"",e.prefix?"has-prefix":"",e.suffix?"has-suffix":""].filter(Boolean).join(" ")}"
|
|
3266
3266
|
>
|
|
@@ -3353,7 +3353,7 @@
|
|
|
3353
3353
|
${(0,a.endSlotTemplate)(e,t)}
|
|
3354
3354
|
</div>
|
|
3355
3355
|
</template>
|
|
3356
|
-
`,Sl=9,El=new Map,Ol=e=>{var t,i;const o=El.get(e);if(o)return o;const n=new Intl.NumberFormat(e).formatToParts(12345.6),s=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)],a={decimalSeparator:(null===(t=n.find(e=>"decimal"===e.type))||void 0===t?void 0:t.value)||".",groupSeparator:(null===(i=n.find(e=>"group"===e.type))||void 0===i?void 0:i.value)||"",digits:new Set([..."0123456789",...s]),zeroDigits:new Set(["0",s[s.length-1]])};return El.set(e,a),a},Tl=(e,t)=>{const{decimalSeparator:i,groupSeparator:o}=Ol(t);return{decimalSeparator:i,groupSeparator:o}},kl=/[kmb]\s*$/i,Dl=(e,t)=>{const{decimalSeparator:i,digits:o,zeroDigits:n}=Ol(t);let s=!0;return t=>{const a=e[t];return a===i?(s=!1,!0):"-"===a||"−"===a||!!o.has(a)&&((!s||!n.has(a))&&(s=!1,!0))}},Il=(e,t,i,o)=>{const n=Math.min(Math.max(i,0),e.length),s=e.length-t.length;if(s>0&&s<=n&&e.slice(0,n-s)+e.slice(n)===t)return n-s;if(n===e.length&&kl.test(e))return t.length;const a=Dl(e,o);let r=0;for(let e=0;e<n;e+=1)a(e)&&(r+=1);const l=Dl(t,o);if(0===r){for(let e=0;e<t.length;e+=1)if(l(e))return e;return n===e.length?t.length:0}let d=0;for(let e=0;e<t.length;e+=1)if(l(e)&&(d+=1,d===r))return e+1;return t.length},Rl=(e,t)=>{const{groupSeparator:i,decimalSeparator:o}=Ol(t);let n=e.trim();return i&&(n=n.split(i).join("")),"."!==o&&(n=n.replace(o,".")),n},Al=(e,t)=>{const{decimalSeparator:i}=Ol(t);let o=0;for(const t of e)t===i&&(o+=1);return o},Ll=(e,t)=>Al(e,t)>1,Fl=(e,t,i,o)=>((e,t,i)=>{const o=Rl(String(null!=e?e:""),t);return!(!o||!/^-?\d+$/.test(o))&&o.replace(/^-/,"").length>=i})(e,i,o)&&Al(t,i)>0,Nl=(e,t,i)=>{const o=e.startsWith("-"),n=o?e.slice(1):e,s=n.indexOf("."),a=-1===s?n:n.slice(0,s);let r=-1===s?"":n.slice(s+1);const l=i.minimumFractionDigits,d=i.maximumFractionDigits;void 0!==d&&r.length>d&&(r=r.slice(0,d)),void 0!==l&&r.length<l&&(r=r.padEnd(l,"0"));const c=((e,t)=>{const i=e.startsWith("-"),o=i?e.slice(1):e,n=Ol(t).groupSeparator||",",s=[];let a=o;for(;a.length>3;)s.unshift(a.slice(-3)),a=a.slice(0,-3);s.unshift(a);const r=s.join(n);return i?`-${r}`:r})(o?`-${a}`:a,t),{decimalSeparator:u}=Tl(0,t);return-1===s?void 0!==l&&l>0?`${c}${u}${"0".repeat(l)}`:c:0===d?c:`${c}${u}${r}`},Ml=(e,t)=>{const{decimalSeparator:i}=Tl(0,t);return"."===i?e:e.replace(/\./g,i)},_l=(e,t,i)=>""===e?"":(e=>{const t=e.replace(/^-/,""),i=t.indexOf(".");return(-1===i?t:t.slice(0,i)).length>15})(e)&&/^-?\d+(\.\d*)?$/.test(e)?Nl(e,t,i):Intl.NumberFormat(t,i).format(Number(e)),Hl=(e,t)=>{if(!e||""===e)return e;const i=Number(e);if(isNaN(i))return e;const o=e.indexOf("."),n=-1!==o,s=n?e.length-o-1:0,a=t.minimumFractionDigits,r=t.maximumFractionDigits;if(s>=a&&s<=r)return e;let l=e;if(s<a){n||(l=e+".");l+="0".repeat(a-s)}if(s>r){const t=n?e.substring(0,o):e,i=(n?e.substring(o+1):"").substring(0,r);l=0===r?t:`${t}.${i}`}return l},Pl=(e,t,i=!0,o)=>{if(null==e||""===e)return"";const n="number"==typeof e?e.toString():e,s=null!=o?o:12;if(Ll(n,t))return"";let a;if(i)a=((e,t)=>{const i=Rl(String(e),t),o=i.replace(/^-/,"").replace(".","").length;return/^-?\d+(\.\d+)?$/.test(i)&&o>15?i:String(new bl(t).parse(String(e)))})(n,t);else{const{decimalSeparator:e}=Tl(0,t);if("."!==e){a=n.replace(new RegExp(`\\${e}`,"g"),".");const t=a.indexOf(".");-1!==t&&(a=a.substring(0,t))}else a=n}a=String(a);if(!/^-?\d*\.?\d+$/.test(a))return"";if(void 0!==s){if(a.replace(".","").replace(/^0+/,"").length>s){const e=a.indexOf(".");if(-1!==e){const t=a.substring(0,e),i=t.length;if(i>=s)return a.substring(0,s);{const o=s-i;return`${t}.${a.substring(e+1).substring(0,o)}`}}return a.substring(0,s)}}return a},zl=(e,t,i,o)=>{if(void 0!==i&&Al(e,t)>0){const n=Rl(e,t),s=n.indexOf("."),a=-1===s?n:n.slice(0,s);if(Fl(void 0!==o?o:a,e,t,i))return""}return((e,t,i)=>{const{decimalSeparator:o}=Tl(0,i),n=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=new RegExp(`${n}(\\d*?)(0+)$`),a=e.match(s);if(a){const e=a[1],i=a[2],o=String(t);if(!isNaN(Number(t))){if(o.includes(".")){const t=o.split(".")[1],n=Math.max(0,i.length-(t.length-e.length));return o+"0".repeat(n)}return o+"."+e+i}}return String(t)})(e,Pl(e,t,!0,i),t)},Ul=(e,t,i=!0,o,n,s)=>{const a=Pl(e,t,i,s);if(!a)return"";const r=a.replace(/^-/,"").replace(".","").length;if(/^-?\d+$/.test(a)&&r>15)try{return((e,t,i)=>{let o=BigInt(e);if(void 0!==i&&!Number.isNaN(i)){const e=BigInt(Math.trunc(i));o>e&&(o=e)}if(void 0!==t&&!Number.isNaN(t)){const e=BigInt(Math.trunc(t));o<e&&(o=e)}return o.toString()})(a,o,n)}catch(e){return a}let l=parseFloat(a);return isNaN(l)?l="":(l=Math.min(l,null!=n?n:l),l=Math.max(l,null!=o?o:l)),String(l)},Bl=e=>{try{const t="string"==typeof e?e:e.toString(),i=t.indexOf(".");if(-1===i)return 1;const o=t.substring(i+1).length;if(0===o)return 1;const n=Math.pow(10,-o);return parseFloat(n.toFixed(o))}catch(t){const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return 1;const n=i.substring(o+1).length;if(0===n)return 1;const s=Math.pow(10,-n);return parseFloat(s.toFixed(n))}};class Vl extends(wl(r.NumberField)){constructor(){super(...arguments),this.autocomplete="off",this.hideStep=!1,this.value="",this.withFormatting=!1,this.locale="en-US",this.autoStepPrecision=!1,this.maximumInputPrecision=12,this.options={maximumFractionDigits:3,minimumFractionDigits:0}}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}stepUp(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Bl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)+t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))+1;if(a<=Sl){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))+t;o<=Sl?(e=o+e,t=0):(e="0"+e,t=1)}return 1===t?parseInt(i.substring(0,o))+1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)+t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=Ul(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}stepDown(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Bl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)-t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))-1;if(a>=0){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))-t;o>=0?(e=o+e,t=0):(e=Sl.toString()+e,t=1)}return 1===t?parseInt(i.substring(0,o))-1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)-t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=Ul(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}hasSeparatorWithoutDecimals(){return new RegExp("[.]$")}writeControlValue(e){const t=this.control,i=t.value;if(i===e)return;const{selectionStart:o,selectionEnd:n}=t;if(t.value=e,null===o||t.getRootNode().activeElement!==t)return;const s=Il(i,e,o,this.locale),a=null===n||n===o?s:Il(i,e,n,this.locale);t.setSelectionRange(s,a)}restoreControlToCommittedValue(){if(!this.control)return;const e=this.value;this.writeControlValue(e?this.withFormatting?_l(e,this.locale,this.options):Ml(String(e),this.locale):""),this.isUserInput=!1}skipGroupSeparator(e){if(!this.withFormatting||e.ctrlKey||e.metaKey||e.altKey)return;const{value:t,selectionStart:i,selectionEnd:o}=this.control;if(null===i||i!==o)return;const{groupSeparator:n}=Tl(0,this.locale);n&&(e.key===yl.R9&&t[i-1]===n?this.control.setSelectionRange(i-1,i-1):e.key===yl.De&&t[i]===n&&this.control.setSelectionRange(i+1,i+1))}handleKeyDown(e){return e.key===yl.Mm&&(this.isUserInput=!1),!this.control||e.key!==yl.R9&&e.key!==yl.De||this.skipGroupSeparator(e),super.handleKeyDown(e)}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(Ll(this.control.value,this.locale)||Fl(this.value,this.control.value,this.locale,this.maximumInputPrecision)?this.restoreControlToCommittedValue():(this.isUserInput=!0,this.withFormatting&&!new bl(this.locale).hasSeparator(this.control.value)?l.DOM.queueUpdate(()=>{const e=this.value,t=zl(this.control.value,this.locale,this.maximumInputPrecision,this.value);if(t||!e||""===this.control.value){if(this.control){const e=this.withFormatting&&""!==t?_l(t,this.locale,this.options):Ml(t,this.locale);this.writeControlValue(Hl(e,this.options))}this.value=Hl(t,this.options),this.$emit("input")}else this.restoreControlToCommittedValue()}):this.withFormatting||this.hasSeparatorWithoutDecimals().test(this.control.value)||l.DOM.queueUpdate(()=>{var e;this.control&&this.writeControlValue(this.control.value.replace(/[^0-9\-+e.]/g,"")),this.value=(null===(e=this.control)||void 0===e?void 0:e.value)||"",this.$emit("input")})))}valueChanged(e,t){if(null!=t||!this.control)return null!=t&&t!==e?this.isUserInput?void 0:(this.value=Ul(this.value,this.locale,!1,this.min,this.max,this.maximumInputPrecision),void l.DOM.queueUpdate(()=>{this.isUserInput||this.control&&(this.control.value=this.withFormatting&&this.value?_l(this.value,this.locale,this.options):this.value)})):void 0;this.control.value=""}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=Ul(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?Hl(e,this.options):e),this.control.value=this.withFormatting&&this.value?_l(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],Vl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Vl.prototype,"hideStep",void 0),(0,C.Cg)([(0,l.attr)({converter:{fromView:e=>null==e?"":String(e),toView:e=>e}})],Vl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Vl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],Vl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Vl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],Vl.prototype,"maximumInputPrecision",void 0);const Gl={delegatesFocus:!0,mode:"open"},jl={stepDownGlyph:'\n <svg class="step-down-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 8C5.02785 8 4.45387 9.2649 5.16108 10.0731L10.6829 16.3838C11.3801 17.1806 12.6197 17.1806 13.3169 16.3838L18.8388 10.0731C19.5459 9.2649 18.972 8 17.898 8H6.1018Z"/>\n </svg>\n ',stepUpGlyph:'\n <svg class="step-up-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 16.9814C5.02785 16.9814 4.45387 15.7165 5.16108 14.9083L10.6829 8.59762C11.3801 7.80079 12.6197 7.80079 13.3169 8.59762L18.8388 14.9083C19.5459 15.7165 18.972 16.9814 17.898 16.9814H6.1018Z"/>\n </svg>\n '},Yl=Vl.compose(Object.assign({baseName:"number-field",template:$l,styles:xl,shadowOptions:Gl},jl)),Wl=(e,t)=>l.css`
|
|
3356
|
+
`,El=9,Ol=new Map,Tl=e=>{var t,i;const o=Ol.get(e);if(o)return o;const n=new Intl.NumberFormat(e).formatToParts(12345.6),s=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)],a={decimalSeparator:(null===(t=n.find(e=>"decimal"===e.type))||void 0===t?void 0:t.value)||".",groupSeparator:(null===(i=n.find(e=>"group"===e.type))||void 0===i?void 0:i.value)||"",digits:new Set([..."0123456789",...s]),zeroDigits:new Set(["0",s[s.length-1]])};return Ol.set(e,a),a},kl=(e,t)=>{const{decimalSeparator:i,groupSeparator:o}=Tl(t);return{decimalSeparator:i,groupSeparator:o}},Dl=/[kmb]\s*$/i,Il=(e,t)=>{const{decimalSeparator:i,digits:o,zeroDigits:n}=Tl(t);let s=!0;return t=>{const a=e[t];return a===i?(s=!1,!0):"-"===a||"−"===a||!!o.has(a)&&((!s||!n.has(a))&&(s=!1,!0))}},Rl=(e,t,i,o)=>{const n=Math.min(Math.max(i,0),e.length),s=e.length-t.length;if(s>0&&s<=n&&e.slice(0,n-s)+e.slice(n)===t)return n-s;if(n===e.length&&Dl.test(e))return t.length;const a=Il(e,o);let r=0;for(let e=0;e<n;e+=1)a(e)&&(r+=1);const l=Il(t,o);if(0===r){for(let e=0;e<t.length;e+=1)if(l(e))return e;return n===e.length?t.length:0}let d=0;for(let e=0;e<t.length;e+=1)if(l(e)&&(d+=1,d===r))return e+1;return t.length},Al=(e,t)=>{const{groupSeparator:i,decimalSeparator:o}=Tl(t);let n=e.trim();return i&&(n=n.split(i).join("")),"."!==o&&(n=n.replace(o,".")),n},Ll=(e,t)=>{const{decimalSeparator:i}=Tl(t);let o=0;for(const t of e)t===i&&(o+=1);return o},Nl=(e,t)=>Ll(e,t)>1,Fl=(e,t,i,o)=>((e,t,i)=>{const o=Al(String(null!=e?e:""),t);return!(!o||!/^-?\d+$/.test(o))&&o.replace(/^-/,"").length>=i})(e,i,o)&&Ll(t,i)>0,Ml=(e,t,i)=>{const o=e.startsWith("-"),n=o?e.slice(1):e,s=n.indexOf("."),a=-1===s?n:n.slice(0,s);let r=-1===s?"":n.slice(s+1);const l=i.minimumFractionDigits,d=i.maximumFractionDigits;void 0!==d&&r.length>d&&(r=r.slice(0,d)),void 0!==l&&r.length<l&&(r=r.padEnd(l,"0"));const c=((e,t)=>{const i=e.startsWith("-"),o=i?e.slice(1):e,n=Tl(t).groupSeparator||",",s=[];let a=o;for(;a.length>3;)s.unshift(a.slice(-3)),a=a.slice(0,-3);s.unshift(a);const r=s.join(n);return i?`-${r}`:r})(o?`-${a}`:a,t),{decimalSeparator:u}=kl(0,t);return-1===s?void 0!==l&&l>0?`${c}${u}${"0".repeat(l)}`:c:0===d?c:`${c}${u}${r}`},_l=(e,t)=>{const{decimalSeparator:i}=kl(0,t);return"."===i?e:e.replace(/\./g,i)},Hl=(e,t,i)=>""===e?"":(e=>{const t=e.replace(/^-/,""),i=t.indexOf(".");return(-1===i?t:t.slice(0,i)).length>15})(e)&&/^-?\d+(\.\d*)?$/.test(e)?Ml(e,t,i):Intl.NumberFormat(t,i).format(Number(e)),Pl=(e,t)=>{if(!e||""===e)return e;const i=Number(e);if(isNaN(i))return e;const o=e.indexOf("."),n=-1!==o,s=n?e.length-o-1:0,a=t.minimumFractionDigits,r=t.maximumFractionDigits;if(s>=a&&s<=r)return e;let l=e;if(s<a){n||(l=e+".");l+="0".repeat(a-s)}if(s>r){const t=n?e.substring(0,o):e,i=(n?e.substring(o+1):"").substring(0,r);l=0===r?t:`${t}.${i}`}return l},zl=(e,t,i=!0,o)=>{if(null==e||""===e)return"";const n="number"==typeof e?e.toString():e,s=null!=o?o:12;if(Nl(n,t))return"";let a;if(i)a=((e,t)=>{const i=Al(String(e),t),o=i.replace(/^-/,"").replace(".","").length;return/^-?\d+(\.\d+)?$/.test(i)&&o>15?i:String(new yl(t).parse(String(e)))})(n,t);else{const{decimalSeparator:e}=kl(0,t);if("."!==e){a=n.replace(new RegExp(`\\${e}`,"g"),".");const t=a.indexOf(".");-1!==t&&(a=a.substring(0,t))}else a=n}a=String(a);if(!/^-?\d*\.?\d+$/.test(a))return"";if(void 0!==s){if(a.replace(".","").replace(/^0+/,"").length>s){const e=a.indexOf(".");if(-1!==e){const t=a.substring(0,e),i=t.length;if(i>=s)return a.substring(0,s);{const o=s-i;return`${t}.${a.substring(e+1).substring(0,o)}`}}return a.substring(0,s)}}return a},Ul=(e,t,i,o)=>{if(void 0!==i&&Ll(e,t)>0){const n=Al(e,t),s=n.indexOf("."),a=-1===s?n:n.slice(0,s);if(Fl(void 0!==o?o:a,e,t,i))return""}return((e,t,i)=>{const{decimalSeparator:o}=kl(0,i),n=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),s=new RegExp(`${n}(\\d*?)(0+)$`),a=e.match(s);if(a){const e=a[1],i=a[2],o=String(t);if(!isNaN(Number(t))){if(o.includes(".")){const t=o.split(".")[1],n=Math.max(0,i.length-(t.length-e.length));return o+"0".repeat(n)}return o+"."+e+i}}return String(t)})(e,zl(e,t,!0,i),t)},Bl=(e,t,i=!0,o,n,s)=>{const a=zl(e,t,i,s);if(!a)return"";const r=a.replace(/^-/,"").replace(".","").length;if(/^-?\d+$/.test(a)&&r>15)try{return((e,t,i)=>{let o=BigInt(e);if(void 0!==i&&!Number.isNaN(i)){const e=BigInt(Math.trunc(i));o>e&&(o=e)}if(void 0!==t&&!Number.isNaN(t)){const e=BigInt(Math.trunc(t));o<e&&(o=e)}return o.toString()})(a,o,n)}catch(e){return a}let l=parseFloat(a);return isNaN(l)?l="":(l=Math.min(l,null!=n?n:l),l=Math.max(l,null!=o?o:l)),String(l)},Vl=e=>{try{const t="string"==typeof e?e:e.toString(),i=t.indexOf(".");if(-1===i)return 1;const o=t.substring(i+1).length;if(0===o)return 1;const n=Math.pow(10,-o);return parseFloat(n.toFixed(o))}catch(t){const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return 1;const n=i.substring(o+1).length;if(0===n)return 1;const s=Math.pow(10,-n);return parseFloat(s.toFixed(n))}};class Gl extends(Cl(r.NumberField)){constructor(){super(...arguments),this.autocomplete="off",this.hideStep=!1,this.value="",this.withFormatting=!1,this.locale="en-US",this.autoStepPrecision=!1,this.maximumInputPrecision=12,this.options={maximumFractionDigits:3,minimumFractionDigits:0}}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}stepUp(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Vl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)+t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))+1;if(a<=El){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))+t;o<=El?(e=o+e,t=0):(e="0"+e,t=1)}return 1===t?parseInt(i.substring(0,o))+1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)+t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=Bl(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}stepDown(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?Vl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)-t).toString();const n=i.substring(o+1),s=n.length-1,a=parseInt(n.charAt(s))-1;if(a>=0){const e=n.substring(0,s)+a;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=s;i>=0;i-=1){const o=parseInt(n.charAt(i))-t;o>=0?(e=o+e,t=0):(e=El.toString()+e,t=1)}return 1===t?parseInt(i.substring(0,o))-1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)-t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=Bl(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}hasSeparatorWithoutDecimals(){return new RegExp("[.]$")}writeControlValue(e){const t=this.control,i=t.value;if(i===e)return;const{selectionStart:o,selectionEnd:n}=t;if(t.value=e,null===o||t.getRootNode().activeElement!==t)return;const s=Rl(i,e,o,this.locale),a=null===n||n===o?s:Rl(i,e,n,this.locale);t.setSelectionRange(s,a)}restoreControlToCommittedValue(){if(!this.control)return;const e=this.value;this.writeControlValue(e?this.withFormatting?Hl(e,this.locale,this.options):_l(String(e),this.locale):""),this.isUserInput=!1}skipGroupSeparator(e){if(!this.withFormatting||e.ctrlKey||e.metaKey||e.altKey)return;const{value:t,selectionStart:i,selectionEnd:o}=this.control;if(null===i||i!==o)return;const{groupSeparator:n}=kl(0,this.locale);n&&(e.key===wl.R9&&t[i-1]===n?this.control.setSelectionRange(i-1,i-1):e.key===wl.De&&t[i]===n&&this.control.setSelectionRange(i+1,i+1))}handleKeyDown(e){return e.key===wl.Mm&&(this.isUserInput=!1),!this.control||e.key!==wl.R9&&e.key!==wl.De||this.skipGroupSeparator(e),super.handleKeyDown(e)}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(Nl(this.control.value,this.locale)||Fl(this.value,this.control.value,this.locale,this.maximumInputPrecision)?this.restoreControlToCommittedValue():(this.isUserInput=!0,this.withFormatting&&!new yl(this.locale).hasSeparator(this.control.value)?l.DOM.queueUpdate(()=>{const e=this.value,t=Ul(this.control.value,this.locale,this.maximumInputPrecision,this.value);if(t||!e||""===this.control.value){if(this.control){const e=this.withFormatting&&""!==t?Hl(t,this.locale,this.options):_l(t,this.locale);this.writeControlValue(Pl(e,this.options))}this.value=Pl(t,this.options),this.$emit("input")}else this.restoreControlToCommittedValue()}):this.withFormatting||this.hasSeparatorWithoutDecimals().test(this.control.value)||l.DOM.queueUpdate(()=>{var e;this.control&&this.writeControlValue(this.control.value.replace(/[^0-9\-+e.]/g,"")),this.value=(null===(e=this.control)||void 0===e?void 0:e.value)||"",this.$emit("input")})))}valueChanged(e,t){if(null!=t||!this.control)return null!=t&&t!==e?this.isUserInput?void 0:(this.value=Bl(this.value,this.locale,!1,this.min,this.max,this.maximumInputPrecision),void l.DOM.queueUpdate(()=>{this.isUserInput||this.control&&(this.control.value=this.withFormatting&&this.value?Hl(this.value,this.locale,this.options):this.value)})):void 0;this.control.value=""}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=Bl(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?Pl(e,this.options):e),this.control.value=this.withFormatting&&this.value?Hl(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],Gl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gl.prototype,"hideStep",void 0),(0,C.Cg)([(0,l.attr)({converter:{fromView:e=>null==e?"":String(e),toView:e=>e}})],Gl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],Gl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],Gl.prototype,"maximumInputPrecision",void 0);const jl={delegatesFocus:!0,mode:"open"},Yl={stepDownGlyph:'\n <svg class="step-down-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 8C5.02785 8 4.45387 9.2649 5.16108 10.0731L10.6829 16.3838C11.3801 17.1806 12.6197 17.1806 13.3169 16.3838L18.8388 10.0731C19.5459 9.2649 18.972 8 17.898 8H6.1018Z"/>\n </svg>\n ',stepUpGlyph:'\n <svg class="step-up-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 16.9814C5.02785 16.9814 4.45387 15.7165 5.16108 14.9083L10.6829 8.59762C11.3801 7.80079 12.6197 7.80079 13.3169 8.59762L18.8388 14.9083C19.5459 15.7165 18.972 16.9814 17.898 16.9814H6.1018Z"/>\n </svg>\n '},Wl=Gl.compose(Object.assign({baseName:"number-field",template:Sl,styles:$l,shadowOptions:jl},Yl)),ql=(e,t)=>l.css`
|
|
3357
3357
|
:host {
|
|
3358
3358
|
display: block;
|
|
3359
3359
|
}
|
|
@@ -3376,7 +3376,7 @@
|
|
|
3376
3376
|
::slotted(*) {
|
|
3377
3377
|
padding-left: 20px;
|
|
3378
3378
|
}
|
|
3379
|
-
`,
|
|
3379
|
+
`,Kl=(e,t)=>l.html`
|
|
3380
3380
|
<template role="option">
|
|
3381
3381
|
<div class="label" part="label" role="presentation">${e=>e.groupLabel}</div>
|
|
3382
3382
|
|
|
@@ -3384,19 +3384,19 @@
|
|
|
3384
3384
|
<slot></slot>
|
|
3385
3385
|
</div>
|
|
3386
3386
|
</template>
|
|
3387
|
-
`;class
|
|
3387
|
+
`;class Xl extends a.ListboxOption{connectedCallback(){super.connectedCallback(),this.disabled=!0}}(0,C.Cg)([(0,l.attr)({attribute:"label"})],Xl.prototype,"groupLabel",void 0);const Jl=Xl.compose({baseName:"optgroup",template:Kl,styles:ql});var Ql=i(92277);var Zl=i(72154),ed=i.n(Zl),td=i(57565),id=i.n(td),od=i(13160),nd=i(24669),sd=i(5709),ad=i(45230);const rd={windowEvents:["online","offline","pageshow"],documentEvents:["visibilitychange"],genesisConnectEvents:["stream","commit"],ignoredGenesisResources:[],startDelay:5e3,checkInterval:1e4,checkTimeout:3e3,resourceChecks:e=>(0,C.sH)(void 0,void 0,void 0,function*(){const t=(0,hi.tn)(),i=yield t.getMoreColumns(e),o=Date.now(),n=i;return{isConnected:i.MESSAGE_TYPE===di.Go.MORE_COLUMNS_ACK,lastUpdated:o,lastMessage:n}}),resourceDataLogon:({message:e,functions:t})=>{const{onMessage:i,onError:o}=t;(0,ad.Ol)().sendForStream(e,i,o)}},ld=a.DI.createInterface(e=>e.instance(rd)),dd="system-health-changed";var cd;const ud=(0,it.createLogger)("network-monitor",{level:it.LogLevels.info}),hd=Date.now(),pd=(null===(cd=window.navigator)||void 0===cd?void 0:cd.userAgent)?ed().parse(window.navigator.userAgent):void 0,md=(e,t={depthLimit:10,edgesLimit:10})=>e instanceof Event?`'${e.type}' Event`:"string"==typeof e?e:id()(e,void 0,2,t);class gd{constructor(){this.unsubscribableObservers=[],this.runAllChecks=(e,t)=>(0,C.sH)(this,void 0,void 0,function*(){if(!this.isReady||this.isRunningChecks&&!t)return;ud.info("Run health checks, triggered by",md(e),"| Active resources",this.resources.size),this.isRunningChecks=!0,this.synchroniseCheckInterval();let i=this.getFormattedTimestamp(this.getNowTimestamp());const o=yield this.isOnlineCheck();o?ud.debug(`Network connected at ${i}`):ud.warn(`Network disconnected at ${i}`);const n=this.normaliseSerializedSocketStatus(this.socketStatus.serialize(),o),s=this.preFlightSocketChecks(n);if(s||ud.debug("Socket pre-flight checks failed"),!o||!s){ud.debug("Aborting remaining health checks");const e=[...this.resources].reduce((e,[t,i])=>{const n=e[i.resourceName];return n?(n.sourceRef=[...n.sourceRef,i.message.SOURCE_REF],e):Object.assign(Object.assign({},e),{[i.resourceName]:this.normaliseResourceHealth({name:i.resourceName,sourceRef:[i.message.SOURCE_REF],isConnected:i.isConnected,lastUpdated:i.lastUpdated},o)})},{});return this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:o,resources:e,resourcesAllConnected:!1,socket:n}),void(this.isRunningChecks=!1)}let a=!0;const r=[];this.resources.forEach((e,t)=>{const{resourceName:o,message:n,functions:s}=e,{resourceChecks:l=this.config.resourceChecks,resourceDataLogon:d=this.config.resourceDataLogon}=s,{SOURCE_REF:c}=n;let u,h,p,m,g,v=!1;r.push((()=>(0,C.sH)(this,void 0,void 0,function*(){var n,s,r;try{ud.debug(`Running health check against ${o}`);const e=yield Promise.race([l(c,t),(s=this.config.checkTimeout,r=()=>({isConnected:!1,lastUpdated:this.getNowTimestamp(),timeout:!0}),new Promise(e=>{setTimeout(()=>{e(r())},s)}))]);v=e.isConnected,u=e.lastUpdated,h=e.lastMessage,m=e.timeout}catch(e){v=!1,u=this.getNowTimestamp(),p=e,h=null!==(n=null==e?void 0:e.receivedMessage)&&void 0!==n?n:e}return g=(null==h?void 0:h.MESSAGE_TYPE)===di.Go.MSG_NACK||(0,di.z2)(h,od.v.NOT_FOUND),i=this.getFormattedTimestamp(null!=u?u:this.getNowTimestamp()),v?ud.debug(`${o} is healthy at ${i}`):ud.warn(`${o} is not healthy at ${i}`),h&&ud.debug(`${o} messaged at ${i}`,md(h)),p&&ud.error(`${o} errored at ${i}`,md(p)),m&&ud.warn(`${o} timed out at ${i}`),g&&(ud.error(`${o} issue, re-attempting data logon at ${i}`),d(e)),a&&(a=v),{name:o,sourceRef:[c],isConnected:v,lastUpdated:u,lastError:p}}))())});const l=(yield Promise.allSettled(r)).reduce((e,t)=>{if("fulfilled"===t.status){const i=e[t.value.name];return i?(i.sourceRef=[...i.sourceRef,...t.value.sourceRef],e):Object.assign(Object.assign({},e),{[t.value.name]:this.normaliseResourceHealth(t.value)})}return ud.warn("Unexpected promise rejection occurred. Please check any custom resourceChecks return MonitoredResourceChecksResult."),e},{});ud.debug("Health checks complete"),this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:o,resources:l,resourcesAllConnected:a,socket:n}),this.isRunningChecks=!1}),void 0!==this.config.logLevel&&(ud.level=this.config.logLevel)}create(){this.resources?ud.warn("NetworkMonitor already created. If this is intentional, please call NetworkMonitor.destroy first."):(this.addListeners(),this.resources=new Map,setTimeout(()=>{this.isReady=!0,this.synchroniseCheckInterval(),this.runAllChecks("NetworkMonitor.create()")},this.config.startDelay))}destroy(){this.removeListeners(),clearInterval(this.internalId),this.resources.clear(),this.resources=void 0,this.status=void 0,this.isReady=void 0}isOnlineCheck(){return Promise.resolve(navigator.onLine)}addResource(e,t){this.resources||this.create(),this.resources.set(e,t)}removeResource(e){this.resources.delete(e)}addListeners(){var e,t;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.addEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.addEventListener(e,this.runAllChecks)),this.config.genesisConnectEvents.includes("stream")&&this.unsubscribableObservers.push(this.connectEvents.addStreamListener(({detail:e})=>{const{functions:t,message:i,resourceName:o,stream:n}=e;this.config.ignoredGenesisResources.includes(o)||this.addResource(n,{functions:t,message:i,resourceName:o})},({detail:e})=>{const{resourceName:t,stream:i}=e;this.config.ignoredGenesisResources.includes(t)||this.removeResource(i)},({detail:e})=>{var t;const{resourceName:i,stream:o,error:n}=e,s=null!==(t=n.receivedMessage)&&void 0!==t?t:n;let a="";(0,di.z2)(s,od.v.NOT_FOUND)?a="Please check the resource is running.":(0,di.z2)(s,od.v.FORBIDDEN)&&(a="You are not authorised to access this resource, removing it from monitoring.",this.removeResource(o)),ud.error(`${i} errored at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,a,n)})),this.config.genesisConnectEvents.includes("commit")&&this.unsubscribableObservers.push(this.connectEvents.addCommitListener(e=>{this.config.ignoredGenesisResources.includes(e.detail.eventName)||this.runAllChecks(e)})),this.unsubscribableObservers.push(this.connectEvents.addMetadataListener(({detail:e})=>{const{resourceName:t,error:i}=e;i&&ud.error(`${t} had an unrecoverable error at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,"Please check the resource is running.",i)}))}removeListeners(){var e,t;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.removeEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.removeEventListener(e,this.runAllChecks)),this.unsubscribableObservers.forEach(e=>e()),this.unsubscribableObservers.length=0}reportSystemHealth(e){var t;const i=null!==(t=this.config.eventEmitter)&&void 0!==t?t:document;this.status=this.normaliseEventDetail(e);(this.status.isHealthy?ud.debug:ud.warn)("Emitting 'system-health-changed' event",md(this.status)),null==i||i.dispatchEvent(new CustomEvent(dd,{detail:this.status,bubbles:i!==document,composed:!0})),this.status.socket.reconnectionLimitReached&&(ud.debug("Network monitoring no longer required. Please check your network and reload your application."),this.destroy())}reportStabilityToGenesis(e){return(0,C.sH)(this,void 0,void 0,function*(){return ud.debug("User requested report stability to Genesis."),ud.info("Please attach this data to your Genesis Support request: \n",JSON.stringify(e,null,2)),!0})}normaliseResourceHealth(e,t=!0){var i;const o=!!t&&e.isConnected,n=null!==(i=e.lastUpdated)&&void 0!==i?i:this.getNowTimestamp();return Object.assign(Object.assign({},e),{isConnected:o,lastUpdated:n})}normaliseSerializedSocketStatus(e,t=!0){const i=!!t&&e.isConnected,o=!i;return Object.assign(Object.assign({},e),{isConnected:i,isDisconnected:o})}normaliseEventDetail(e){var t,i,o,n;const s=!!((null===(t=e.socket)||void 0===t?void 0:t.isConfigured)?e.isOnline&&(null===(i=e.socket)||void 0===i?void 0:i.isConnected)&&e.resourcesAllConnected:e.isOnline),a=null!==(o=e.lastUpdated)&&void 0!==o?o:this.getNowTimestamp(),r=null!==(n=e.nextUpdate)&&void 0!==n?n:this.getNextTimestamp(),l=e.isAuthenticated&&this.user?this.user.username:void 0,d=Object.assign(Object.assign({},e),{browserInformation:pd,username:l,isHealthy:s,lastUpdated:a,nextUpdate:r,firstUpdated:hd,runAllChecks:()=>{ud.debug("User activated run checks command starting."),this.runAllChecks("user requested")},reportStabilityToGenesis:()=>this.reportStabilityToGenesis(d)});return d}preFlightSocketChecks(e){if(!e.isConfigured)return ud.debug("Socket not configured"),!1;if(e.isReconnecting)return ud.debug("Socket reconnecting"),!1;if(e.isConnecting)return ud.debug("Socket connecting"),!1;if(e.isDisconnected){const t=e.isDisconnectedByServer?`by the server, code: ${e.closedCode}, reason: ${e.closedReason}`:"";return ud.debug(`Socket disconnected ${t}`),e.reconnectionLimitReached&&ud.debug("Socket reconnection limit reached"),!1}const t=this.user.isAuthenticated?"with":"without";return ud.debug(`Socket connected ${t} valid session`),!0}getFormattedTimestamp(e){return(0,mi.zT)(e)}getNowTimestamp(){return Date.now()}getNextTimestamp(){return new Date(Date.now()+this.config.checkInterval).getTime()}synchroniseCheckInterval(){clearInterval(this.internalId),this.internalId=setInterval(()=>this.runAllChecks("check interval"),this.config.checkInterval)}}(0,C.Cg)([ld],gd.prototype,"config",void 0),(0,C.Cg)([sd.S5],gd.prototype,"socketStatus",void 0),(0,C.Cg)([nd.a4],gd.prototype,"connectEvents",void 0),(0,C.Cg)([Ql.KJ],gd.prototype,"user",void 0),(0,C.Cg)([l.observable],gd.prototype,"status",void 0);const vd=a.DI.createInterface(e=>e.singleton(gd));const fd=(e,t)=>l.css`
|
|
3388
3388
|
${(0,r.progressStyles)(e,t)}
|
|
3389
3389
|
:host {
|
|
3390
3390
|
height: calc(var(--design-unit) * 2px);
|
|
3391
3391
|
}
|
|
3392
|
-
`,
|
|
3392
|
+
`,bd=(e,t)=>(0,a.progressTemplate)(e,t);class yd extends r.Progress{}const wd=void 0,Cd={indeterminateIndicator1:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>',indeterminateIndicator2:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>'},xd=yd.compose(Object.assign({baseName:"progress",template:bd,styles:fd,shadowOptions:wd},Cd));function $d(e){return new Proxy(e,{get:(e,t,...i)=>{if(["withPrefix","withShadowRootMode","withElementDisambiguation"].includes(t))throw new Error("Modification of the Design System is not allowed.");return Reflect.get(e,t,...i)}})}const Sd=(e,t="foundation",i,s)=>{e&&Qo(null!=i?i:o,null!=s?s:n,e);return $d(a.DesignSystem.getOrCreate(e).withPrefix(t))},Ed="app",Od="component";Sd().register(xd({prefix:"next-update"}));class Td extends a.FoundationElement{constructor(){super(...arguments),this.timeTillNextUpdate={totalMs:1e4,remainMs:1e4,remainPercent:100},this.mode=Ed,this.status={isOnline:!0,isHealthy:!0,browserInformation:{},socket:{},resources:{}},this.onSystemHealthChanged=e=>{this.status=e.detail,this.resourceList=Object.values(this.status.resources).sort((e,t)=>Number(t.isConnected)-Number(e.isConnected))},this.onOpen=(e=!1)=>{this.isOpen=!0,this.wasOpenedByUser=e,this.isDismissed=!1},this.onClose=()=>{this.isOpen=!1,this.wasOpenedByUser=!1,this.isDismissed=!1},this.onDismiss=()=>{this.isDismissed||this.status.isHealthy?this.onClose():this.isDismissed=!0},this.onUpdateStatus=()=>{this.status.runAllChecks()},this.onReportStatus=()=>{this.status.reportStabilityToGenesis()},this.onReloadWindow=()=>{location.reload()},this.onDocumentKeydown=e=>{if(!e.defaultPrevented)switch(e.key){case wl.Is.ArrowUp:e.ctrlKey&&e.altKey&&!this.isOpen&&(this.onOpen(!0),e.preventDefault());break;case wl.Is.ArrowDown:e.ctrlKey&&e.altKey&&this.isOpen&&(this.onClose(),e.preventDefault());break;case wl.F9:this.isOpen&&(this.onDismiss(),e.preventDefault())}}}isOpenChanged(){this.updateTemplateClassNames()}isDismissedChanged(){this.updateTemplateClassNames()}modeChanged(){this.$fastController.isConnected&&this.mode===Od&&ot.warn("SystemHealthOverlay has support for app overlays only right now.")}logLevelChanged(){ud.level=this.logLevel}statusChanged(e,t){this.updateClassNames(),this.$fastController.isConnected&&(!1!==(null==t?void 0:t.isHealthy)||this.isOpen||this.onOpen(),!0===(null==t?void 0:t.isHealthy)&&this.isOpen&&!this.wasOpenedByUser&&this.onClose(),this.startTimeTillNextUpdateCountdown())}updateClassNames(){this.isOnlineClassNames=(0,x.x)(["healthy",this.status.isOnline],["unhealthy",!this.status.isOnline]),this.isHealthyClassNames=(0,x.x)(["healthy",this.status.isHealthy],["unhealthy",!this.status.isHealthy]),this.isSocketHealthyClassNames=(0,x.x)(["healthy",this.isSocketHealthy],["unhealthy",!this.isSocketHealthy]),this.resourcesAllConnectedClassNames=(0,x.x)(["healthy",this.status.resourcesAllConnected],["unhealthy",!this.status.resourcesAllConnected],["hidden",!this.validResourceList]),this.updateTemplateClassNames()}updateTemplateClassNames(){this.templateClassNames=(0,x.x)(["open",this.isOpen],["dismissed",this.isDismissed]),this.containerClassNames=(0,x.x)(this.isHealthyClassNames,["open",this.isOpen],["dismissed",this.isDismissed])}startTimeTillNextUpdateCountdown(){const e=this.status.nextUpdate-Date.now();let t=e,i=100;clearInterval(this.timeTillNextUpdateInterval),this.timeTillNextUpdate={totalMs:e,remainMs:t,remainPercent:i},this.timeTillNextUpdateInterval=setInterval(()=>{t-=1e3,i=Math.floor(t/e*100),this.timeTillNextUpdate={totalMs:e,remainMs:t,remainPercent:i},t<0&&clearInterval(this.timeTillNextUpdateInterval)},1e3)}connectedCallback(){super.connectedCallback(),this.networkMonitor.create(),this.addEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.networkMonitor.destroy(),this.removeEventListeners()}get isSocketHealthy(){return this.status.isOnline&&(!this.status.socket.isConfigured||this.status.socket.isConfigured&&this.status.socket.isConnected)}get validResourceList(){var e;return(null===(e=this.resourceList)||void 0===e?void 0:e.length)>0}eventBridge(){var e;return null!==(e=this.config.eventEmitter)&&void 0!==e?e:document}addEventListeners(){this.eventBridge().addEventListener(dd,this.onSystemHealthChanged,!0),document.addEventListener("keydown",this.onDocumentKeydown)}removeEventListeners(){this.eventBridge().removeEventListener(dd,this.onSystemHealthChanged,!0),document.removeEventListener("keydown",this.onDocumentKeydown)}static getCheckmarkTemplate(e){return e?l.html`
|
|
3393
3393
|
<span class="checkmark">✔</span>
|
|
3394
3394
|
`:l.html`
|
|
3395
3395
|
<span class="checkmark">✘</span>
|
|
3396
|
-
`}}(0,C.Cg)([
|
|
3396
|
+
`}}(0,C.Cg)([ld],Td.prototype,"config",void 0),(0,C.Cg)([vd],Td.prototype,"networkMonitor",void 0),(0,C.Cg)([l.observable],Td.prototype,"resourceList",void 0),(0,C.Cg)([l.observable],Td.prototype,"isOpen",void 0),(0,C.Cg)([l.observable],Td.prototype,"wasOpenedByUser",void 0),(0,C.Cg)([l.observable],Td.prototype,"isDismissed",void 0),(0,C.Cg)([l.observable],Td.prototype,"templateClassNames",void 0),(0,C.Cg)([l.observable],Td.prototype,"containerClassNames",void 0),(0,C.Cg)([l.observable],Td.prototype,"isOnlineClassNames",void 0),(0,C.Cg)([l.observable],Td.prototype,"isHealthyClassNames",void 0),(0,C.Cg)([l.observable],Td.prototype,"isSocketHealthyClassNames",void 0),(0,C.Cg)([l.observable],Td.prototype,"resourcesAllConnectedClassNames",void 0),(0,C.Cg)([l.observable],Td.prototype,"timeTillNextUpdate",void 0),(0,C.Cg)([l.observable],Td.prototype,"saveDataCallback",void 0),(0,C.Cg)([l.attr],Td.prototype,"mode",void 0),(0,C.Cg)([(0,l.attr)({attribute:"log-level",converter:l.nullableNumberConverter})],Td.prototype,"logLevel",void 0),(0,C.Cg)([l.observable],Td.prototype,"status",void 0);const kd=(e,t)=>l.html`
|
|
3397
3397
|
<template class="${e=>e.templateClassNames}">
|
|
3398
3398
|
<header class="${e=>e.isHealthyClassNames}" part="header">
|
|
3399
|
-
<h1>System ${e=>(0,
|
|
3399
|
+
<h1>System ${e=>(0,ya.fL)(e.isHealthyClassNames)}</h1>
|
|
3400
3400
|
${(0,l.when)(e=>!e.status.isHealthy,l.html`
|
|
3401
3401
|
<span class="data-warning">Data Validity Unknown</span>
|
|
3402
3402
|
`)}
|
|
@@ -3425,7 +3425,7 @@
|
|
|
3425
3425
|
</header>
|
|
3426
3426
|
<div class="container ${e=>e.containerClassNames}" part="container">
|
|
3427
3427
|
<section class="network-section ${e=>e.isOnlineClassNames}" part="network-section">
|
|
3428
|
-
<h2>Network ${e=>(0,
|
|
3428
|
+
<h2>Network ${e=>(0,ya.fL)(e.status.isOnline?"online":"offline")}</h2>
|
|
3429
3429
|
<dl class="resource-list">
|
|
3430
3430
|
<div class="resource ${e=>e.isOnlineClassNames}">
|
|
3431
3431
|
<div class="attributes">
|
|
@@ -3445,11 +3445,11 @@
|
|
|
3445
3445
|
`)}
|
|
3446
3446
|
<div class="platform-type">
|
|
3447
3447
|
<dt>Platform Type</dt>
|
|
3448
|
-
<dd>${e=>{var t;return(0,
|
|
3448
|
+
<dd>${e=>{var t;return(0,ya.fL)(null===(t=e.status.browserInformation.platform)||void 0===t?void 0:t.type)}}</dd>
|
|
3449
3449
|
</div>
|
|
3450
3450
|
<div class="os-name">
|
|
3451
3451
|
<dt>OS Name</dt>
|
|
3452
|
-
<dd>${e=>{var t;return(0,
|
|
3452
|
+
<dd>${e=>{var t;return(0,ya.fL)(null===(t=e.status.browserInformation.os)||void 0===t?void 0:t.name)}}</dd>
|
|
3453
3453
|
</div>
|
|
3454
3454
|
<div class="os-version">
|
|
3455
3455
|
<dt>OS Version</dt>
|
|
@@ -3459,7 +3459,7 @@
|
|
|
3459
3459
|
<div class="attributes">
|
|
3460
3460
|
<div class="browser-name">
|
|
3461
3461
|
<dt>Browser Name</dt>
|
|
3462
|
-
<dd>${e=>{var t;return(0,
|
|
3462
|
+
<dd>${e=>{var t;return(0,ya.fL)(null===(t=e.status.browserInformation.browser)||void 0===t?void 0:t.name)}}</dd>
|
|
3463
3463
|
</div>
|
|
3464
3464
|
<div class="browser-version">
|
|
3465
3465
|
<dt>Browser Version</dt>
|
|
@@ -3467,16 +3467,16 @@
|
|
|
3467
3467
|
</div>
|
|
3468
3468
|
<div class="first-updated">
|
|
3469
3469
|
<dt>First updated</dt>
|
|
3470
|
-
<dd>${e=>(0,
|
|
3470
|
+
<dd>${e=>(0,mi.zT)(e.status.firstUpdated)}</dd>
|
|
3471
3471
|
</div>
|
|
3472
3472
|
<div class="last-updated">
|
|
3473
3473
|
<dt>Last updated</dt>
|
|
3474
|
-
<dd>${e=>(0,
|
|
3474
|
+
<dd>${e=>(0,mi.zT)(e.status.lastUpdated)}</dd>
|
|
3475
3475
|
</div>
|
|
3476
3476
|
${(0,l.when)(e=>!e.status.socket.reconnectionLimitReached,l.html`
|
|
3477
3477
|
<div class="next-update">
|
|
3478
3478
|
<dt>Next update</dt>
|
|
3479
|
-
<dd>${e=>(0,
|
|
3479
|
+
<dd>${e=>(0,mi.zT)(e.status.nextUpdate)}</dd>
|
|
3480
3480
|
</div>
|
|
3481
3481
|
<div class="next-update-progress">
|
|
3482
3482
|
<dt></dt>
|
|
@@ -3489,13 +3489,13 @@
|
|
|
3489
3489
|
`)}
|
|
3490
3490
|
</div>
|
|
3491
3491
|
<div class="controls">
|
|
3492
|
-
${e=>
|
|
3492
|
+
${e=>Td.getCheckmarkTemplate(e.status.isOnline)}
|
|
3493
3493
|
</div>
|
|
3494
3494
|
</div>
|
|
3495
3495
|
</dl>
|
|
3496
3496
|
</section>
|
|
3497
3497
|
<section class="socket-section ${e=>e.isSocketHealthyClassNames}" part="socket-section">
|
|
3498
|
-
<h2>WebSocket ${e=>(0,
|
|
3498
|
+
<h2>WebSocket ${e=>(0,ya.fL)(e.isSocketHealthyClassNames)}</h2>
|
|
3499
3499
|
<dl class="resource-list">
|
|
3500
3500
|
<div class="resource ${e=>e.isSocketHealthyClassNames}">
|
|
3501
3501
|
<div class="attributes">
|
|
@@ -3535,7 +3535,7 @@
|
|
|
3535
3535
|
</div>
|
|
3536
3536
|
</div>
|
|
3537
3537
|
<div class="controls">
|
|
3538
|
-
${e=>
|
|
3538
|
+
${e=>Td.getCheckmarkTemplate(e.isSocketHealthy)}
|
|
3539
3539
|
</div>
|
|
3540
3540
|
</div>
|
|
3541
3541
|
</dl>
|
|
@@ -3544,7 +3544,7 @@
|
|
|
3544
3544
|
class="resource-section ${e=>e.resourcesAllConnectedClassNames}"
|
|
3545
3545
|
part="resource-section"
|
|
3546
3546
|
>
|
|
3547
|
-
<h2>Resources ${e=>(0,
|
|
3547
|
+
<h2>Resources ${e=>(0,ya.fL)(e.resourcesAllConnectedClassNames)}</h2>
|
|
3548
3548
|
<dl class="resource-list">
|
|
3549
3549
|
${(0,l.repeat)(e=>e.resourceList,l.html`
|
|
3550
3550
|
<div class="resource ${e=>e.isConnected?"healthy":"unhealthy"}">
|
|
@@ -3559,7 +3559,7 @@
|
|
|
3559
3559
|
</div>
|
|
3560
3560
|
<div class="last-checked">
|
|
3561
3561
|
<dt>Checked</dt>
|
|
3562
|
-
<dd>${e=>(0,
|
|
3562
|
+
<dd>${e=>(0,mi.zT)(e.lastUpdated)}</dd>
|
|
3563
3563
|
</div>
|
|
3564
3564
|
<div class="subscriptions">
|
|
3565
3565
|
<dt>Subscriptions</dt>
|
|
@@ -3571,7 +3571,7 @@
|
|
|
3571
3571
|
</div>
|
|
3572
3572
|
</div>
|
|
3573
3573
|
<div class="controls">
|
|
3574
|
-
${e=>
|
|
3574
|
+
${e=>Td.getCheckmarkTemplate(e.isConnected)}
|
|
3575
3575
|
</div>
|
|
3576
3576
|
</div>
|
|
3577
3577
|
`)}
|
|
@@ -3579,7 +3579,7 @@
|
|
|
3579
3579
|
</section>
|
|
3580
3580
|
</div>
|
|
3581
3581
|
</template>
|
|
3582
|
-
`,
|
|
3582
|
+
`,Dd=(e,t)=>l.css`
|
|
3583
3583
|
:host {
|
|
3584
3584
|
--font-family: Menlo, Consolas, monospace;
|
|
3585
3585
|
|
|
@@ -3850,7 +3850,7 @@
|
|
|
3850
3850
|
padding: 0.2em 0.5em;
|
|
3851
3851
|
background-color: var(--color-unhealthy-opacity-20);
|
|
3852
3852
|
}
|
|
3853
|
-
`,
|
|
3853
|
+
`,Id=void 0,Rd={},Ad=Td.compose(Object.assign({baseName:"system-health-overlay",template:kd,styles:Dd,shadowOptions:Id},Rd)),Ld=l.css`
|
|
3854
3854
|
:host {
|
|
3855
3855
|
--pill-fill: var(--neutral-fill-rest, #e5e5e5);
|
|
3856
3856
|
--pill-fill-hover: var(--neutral-fill-hover, #d9d9d9);
|
|
@@ -3928,7 +3928,7 @@
|
|
|
3928
3928
|
.pill-remove:hover:not(:disabled) {
|
|
3929
3929
|
background: var(--pill-fill-hover);
|
|
3930
3930
|
}
|
|
3931
|
-
`,
|
|
3931
|
+
`,Nd=e=>l.html`
|
|
3932
3932
|
<div class="pill" part="pill" ?disabled=${e=>e.disabled}>
|
|
3933
3933
|
<button
|
|
3934
3934
|
class="pill-body"
|
|
@@ -3963,8 +3963,8 @@
|
|
|
3963
3963
|
`)}
|
|
3964
3964
|
</div>
|
|
3965
3965
|
`,Fd=l.html`
|
|
3966
|
-
${e=>
|
|
3967
|
-
`,
|
|
3966
|
+
${e=>Nd(T(e))}
|
|
3967
|
+
`,Md=void 0,_d={};class Hd extends a.FoundationElement{constructor(){super(...arguments),this.removable=!0,this.disabled=!1}handleBodyClick(){this.disabled||this.$emit("pill-click")}handleRemoveClick(e){null==e||e.stopPropagation(),this.disabled||this.$emit("remove")}}(0,C.Cg)([l.attr],Hd.prototype,"label",void 0),(0,C.Cg)([l.attr],Hd.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Hd.prototype,"removable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Hd.prototype,"disabled",void 0);const Pd=Hd.compose(Object.assign({baseName:"pill",template:Fd,styles:Ld,shadowOptions:Md},_d));var zd=i(4934);const Ud={toView:e=>JSON.stringify(e),fromView:e=>null==e?e:JSON.parse(e)};class Bd extends a.FoundationElement{constructor(){super(...arguments),this.show=!1,this.event="click",this.placement="bottom",this.flip=!1}selectorChanged(e,t){t!==e&&(this.popper&&this.popper.destroy(),this.target&&this.target.removeEventListener(this.event,this.toggle.bind(this)),this.target=this.getRootNode().querySelector(this.selector),this.target.addEventListener(this.event,this.toggle.bind(this)),this.popper=(0,zd.n4)(this.target,this,this.buildOptions()))}placementChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}offsetChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}flipChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}buildOptions(){return{placement:this.placement,modifiers:[{name:"offset",options:{offset:this.offset||[0,0]}},{name:"flip",enabled:this.flip}]}}toggle(){this.show=!this.show}disconnectedCallback(){super.disconnectedCallback(),this.popper&&(this.popper.destroy(),this.popper=null)}}(0,C.Cg)([l.attr],Bd.prototype,"selector",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Bd.prototype,"show",void 0),(0,C.Cg)([l.attr],Bd.prototype,"event",void 0),(0,C.Cg)([l.attr],Bd.prototype,"placement",void 0),(0,C.Cg)([(0,l.attr)({converter:Ud})],Bd.prototype,"offset",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Bd.prototype,"flip",void 0);const Vd=l.css`
|
|
3968
3968
|
:host {
|
|
3969
3969
|
display: none;
|
|
3970
3970
|
inset: unset !important;
|
|
@@ -3974,24 +3974,24 @@
|
|
|
3974
3974
|
:host([show]) {
|
|
3975
3975
|
display: block;
|
|
3976
3976
|
}
|
|
3977
|
-
`,
|
|
3977
|
+
`,Gd=l.html`
|
|
3978
3978
|
<template>
|
|
3979
3979
|
<slot></slot>
|
|
3980
3980
|
</template>
|
|
3981
|
-
`,
|
|
3981
|
+
`,jd=Bd.compose({baseName:"popper",styles:Vd,template:Gd}),Yd=(e,t)=>l.css`
|
|
3982
3982
|
${(0,r.progressRingStyles)(e,t)}
|
|
3983
|
-
`,
|
|
3983
|
+
`,Wd=(e,t)=>(0,a.progressRingTemplate)(e,t);class qd extends r.Progress{}const Kd=void 0,Xd={indeterminateIndicator:'\n <svg class="progress" part="progress" viewBox="0 0 16 16">\n <circle class="background" part="background" cx="8px" cy="8px" r="7px"></circle>\n <circle class="indeterminate-indicator-1" part="indeterminate-indicator-1" cx="8px" cy="8px" r="7px"></circle>\n </svg>\n '},Jd=qd.compose(Object.assign({baseName:"progress-ring",template:Wd,styles:Yd,shadowOptions:Kd},Xd)),Qd=(e,t)=>l.css`
|
|
3984
3984
|
${(0,r.radioStyles)(e,t)}
|
|
3985
|
-
`,
|
|
3985
|
+
`,Zd=(e,t)=>(0,a.radioTemplate)(e,t);class ec extends r.Radio{}const tc=void 0,ic={checkedIndicator:'\n <div part="checked-indicator" class="checked-indicator"></div>\n '},oc=ec.compose(Object.assign({baseName:"radio",template:Zd,styles:Qd,shadowOptions:tc},ic)),nc=(e,t)=>l.css`
|
|
3986
3986
|
${(0,r.radioGroupStyles)(e,t)}
|
|
3987
|
-
`,
|
|
3987
|
+
`,sc=(e,t)=>(0,a.radioGroupTemplate)(e,t);class ac extends r.RadioGroup{}const rc=void 0,lc={},dc=ac.compose(Object.assign({baseName:"radio-group",template:sc,styles:nc,shadowOptions:rc},lc)),cc=l.css`
|
|
3988
3988
|
/* Host */
|
|
3989
3989
|
:host {
|
|
3990
3990
|
display: flex;
|
|
3991
3991
|
flex-direction: column;
|
|
3992
3992
|
width: 100%;
|
|
3993
3993
|
}
|
|
3994
|
-
`,
|
|
3994
|
+
`,uc=e=>l.html`
|
|
3995
3995
|
<template>
|
|
3996
3996
|
<${e}-scheduler-timezone
|
|
3997
3997
|
:timezone=${(0,U.O)(e=>e.timezone)}
|
|
@@ -4004,9 +4004,9 @@
|
|
|
4004
4004
|
?disable-tooltips=${e=>e.disableTooltips}
|
|
4005
4005
|
></${e}-scheduler-cron-builder>
|
|
4006
4006
|
</template>
|
|
4007
|
-
`,
|
|
4008
|
-
${e=>
|
|
4009
|
-
`;class
|
|
4007
|
+
`,hc=l.html`
|
|
4008
|
+
${e=>uc(T(e))}
|
|
4009
|
+
`;class pc extends a.FoundationElement{constructor(){super(...arguments),this.disableTooltips=!1,this.timezone="",this.cron=""}cronConfigChanged(){var e,t;this.timezone=(null===(e=this.cronConfig)||void 0===e?void 0:e.timezone)||"",this.cron=(null===(t=this.cronConfig)||void 0===t?void 0:t.cronExpression)||""}handleChange(e,t){e.stopPropagation();const{value:i}=e.target;this.cronConfig=Object.assign(Object.assign({},this.cronConfig),{[t]:i}),this.$emit("change",this.cronConfig)}}(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],pc.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],pc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],pc.prototype,"timezone",void 0),(0,C.Cg)([l.observable],pc.prototype,"cron",void 0),(0,C.Cg)([l.observable],pc.prototype,"cronConfig",void 0);const mc=void 0,gc={},vc=pc.compose(Object.assign({baseName:"scheduler",styles:cc,template:hc,shadowOptions:mc},gc)),fc=(e,t,i)=>{if(!e.title)throw new Error("Title is required");if(!e.body)throw new Error("Missing required param 'body'");let o={title:e.title,body:e.body,iconName:e.iconName},n={};e.createdAt&&(o=Object.assign({createdAt:e.createdAt},o)),null!=e.logLevel&&(o=Object.assign({logLevel:e.logLevel},o)),e.toast&&(n=Object.assign({toast:e.toast},n),o=Object.assign({config:n},o)),ye(o,t,i)};var bc,yc,wc;!function(e){e.MINUTES="Minutes",e.HOURLY="Hourly",e.DAILY="Daily",e.WEEKLY="Weekly",e.MONTHLY="Monthly",e.YEARLY="Yearly"}(bc||(bc={})),function(e){e.WEEK="Week",e.WORK_WEEK="Work week"}(yc||(yc={})),function(e){e.DATE="Date",e.DAY_OF_MONTH="Day of month"}(wc||(wc={}));const Cc=[{value:"2",label:"Monday"},{value:"3",label:"Tuesday"},{value:"4",label:"Wednesday"},{value:"5",label:"Thursday"},{value:"6",label:"Friday"},{value:"7",label:"Saturday"},{value:"1",label:"Sunday"}],xc=[{value:"1",label:"First"},{value:"2",label:"Second"},{value:"3",label:"Third"},{value:"4",label:"Fourth"},{value:"-1",label:"Last"}],$c=[{value:"1",label:"January"},{value:"2",label:"February"},{value:"3",label:"March"},{value:"4",label:"April"},{value:"5",label:"May"},{value:"6",label:"June"},{value:"7",label:"July"},{value:"8",label:"August"},{value:"9",label:"September"},{value:"10",label:"October"},{value:"11",label:"November"},{value:"12",label:"December"}],Sc=12,Ec=31,Oc=6,Tc=7,kc=24,Dc=60,Ic=4,Rc=30;var Ac;!function(e){e.updateCronConfig="update-cron-config"}(Ac||(Ac={}));const Lc=e=>Number(e)>1?`/${e}`:"";const Nc=(e,t,i)=>{const o=Number(e);return!isNaN(o)&&o<=i&&o>=t};function Fc(e,t,i,o=!1,n=Nc){if("*"===e)return!0;if(o&&("?"===e||"L"===e))return!0;if(o&&e.endsWith("L"))return n(e.slice(0,-1),t,i);if(e.startsWith("*/"))return n(e.substring(2),1,i);if(e.startsWith("0/"))return n(e.substring(2),1,i);if(o&&e.includes("#")){const[o,s]=e.split("#");return n(o,t,i)&&n(s,1,Ic)}if(n(e,t,i))return!0;if(e.includes("-")){const[o,s]=e.split("-");return n(o,t,i)&&n(s,t,i)}return!!e.includes(",")&&e.split(",").every(e=>Fc(e,t,i,o,n))}function Mc(e,t){return{type:bc.DAILY,frequency:e.startsWith("*/")?e.split("*/")[1]:"1",weekType:"?"===t?yc.WEEK:yc.WORK_WEEK}}function _c(e){const t=e.includes("/");return{type:bc.HOURLY,frequency:t?e.split("/")[1]:"1",during:t?"every_hour":"specific_hours",hours:t?void 0:e}}function Hc(e,t="*"){const i="*"!==t&&"0/1"!==t;return{type:bc.MINUTES,frequency:e.includes("/")?e.split("/")[1]:"1",during:i?"specific_hours":"every_hour",hours:i?t:void 0}}function Pc(e){return{type:bc.WEEKLY,selectedDays:"*"!==e?new Set(e.split(",")):new Set}}const zc=(e,t,i,o)=>{let n;return n="?"===t?{type:wc.DAY_OF_MONTH,day:o.split(/[L#]/)[0],weekNumber:o.includes("#")?o.split("#")[1]:"-1"}:{type:wc.DATE,dayDate:t},e===bc.YEARLY&&(n.month=i),n};function Uc(e,t,i,o=zc){return{type:bc.YEARLY,frequency:2===i.split("/").length?i.split("/")[1]:"1",dateOrDay:o(bc.YEARLY,e,t,i.split("/")[0])}}function Bc(e,t,i,o=zc){return{type:bc.MONTHLY,frequency:t.startsWith("*/")?t.split("*/")[1]:"1",dateOrDay:o(bc.MONTHLY,e,t,i.split("/")[0])}}const Vc=l.css`
|
|
4010
4010
|
.input-container {
|
|
4011
4011
|
display: flex;
|
|
4012
4012
|
flex-direction: column;
|
|
@@ -4042,8 +4042,8 @@
|
|
|
4042
4042
|
width: 100%;
|
|
4043
4043
|
height: 0;
|
|
4044
4044
|
}
|
|
4045
|
-
`,
|
|
4046
|
-
${
|
|
4045
|
+
`,Gc=l.css`
|
|
4046
|
+
${Vc}
|
|
4047
4047
|
/* Host */
|
|
4048
4048
|
:host {
|
|
4049
4049
|
display: flex;
|
|
@@ -4103,32 +4103,32 @@
|
|
|
4103
4103
|
font-size: var(--type-ramp-minus-1-font-size);
|
|
4104
4104
|
white-space: nowrap;
|
|
4105
4105
|
}
|
|
4106
|
-
`;var
|
|
4106
|
+
`;var jc=i(20633);const Yc=(e,t,i)=>l.html`
|
|
4107
4107
|
<${t}-icon tooltip="${()=>e}" name="${()=>i}"></${t}-icon>
|
|
4108
|
-
`,
|
|
4109
|
-
${
|
|
4110
|
-
`,
|
|
4108
|
+
`,Wc=e=>class extends e{$emit(...e){const[t,i,o]=((...e)=>{let[t,i,o]=e,n=i;var s;if(((null==(s=i)?void 0:s.hasOwnProperty("bubbles"))||(null==s?void 0:s.hasOwnProperty("cancelable"))||(null==s?void 0:s.hasOwnProperty("composed"))||(null==s?void 0:s.hasOwnProperty("broadcast")))&&(o=i,n=void 0),"string"!=typeof t)throw new Error("$emit event types must be typeof string.");return[t,n,o]})(...e);if(null==o?void 0:o.broadcast){const e=new CustomEvent(t,Object.assign({detail:i,bubbles:!0,composed:!0,cancelable:!0},o));return e.broadcast=!0,this.dispatchEvent(e)}return super.$emit(t,i,o)}},qc=l.css`
|
|
4109
|
+
${Vc}
|
|
4110
|
+
`,Kc="\n <p>Select one or more hours.</p>\n",Xc=l.html`
|
|
4111
4111
|
${e=>{return t=e.prefix,l.html`
|
|
4112
4112
|
<template>
|
|
4113
4113
|
<div class="input-container">
|
|
4114
|
-
<label class="label">Of ${e=>e.disableTooltips?"":
|
|
4114
|
+
<label class="label">Of ${e=>e.disableTooltips?"":Yc("\n <p>Controls the daily frequency:</p>\n <ul>\n <li><strong>Week:</strong> allows you to configure the frequency of repeating days, including both weekdays and weekends.</li>\n <li><strong>Work week:</strong> runs the schedule at the specified time on every weekday (Monday - Friday). When this option is selected you cannot change the day frequency, it's every weekday.</li>\n </ul>\n",t)}</label>
|
|
4115
4115
|
<${t}-select
|
|
4116
4116
|
data-test-id="select-week-type"
|
|
4117
4117
|
:value=${(0,U.O)(e=>e.weekType)}
|
|
4118
4118
|
@change="${e=>e.updateCronConfig()}"
|
|
4119
4119
|
>
|
|
4120
|
-
<${t}-option data-test-id="${
|
|
4121
|
-
${
|
|
4120
|
+
<${t}-option data-test-id="${yc.WEEK}">
|
|
4121
|
+
${yc.WEEK}
|
|
4122
4122
|
</${t}-option>
|
|
4123
|
-
<${t}-option data-test-id="${
|
|
4124
|
-
${
|
|
4123
|
+
<${t}-option data-test-id="${yc.WORK_WEEK}">
|
|
4124
|
+
${yc.WORK_WEEK}
|
|
4125
4125
|
</${t}-option>
|
|
4126
4126
|
</${t}-select>
|
|
4127
4127
|
</div>
|
|
4128
4128
|
</template>
|
|
4129
4129
|
`;var t}}
|
|
4130
|
-
`;let
|
|
4131
|
-
${
|
|
4130
|
+
`;let Jc=class extends(Wc(a.FoundationElement)){constructor(){super(...arguments),this.disableTooltips=!1,this.prefix=""}configChanged(){var e;this.weekType=(null===(e=this.config)||void 0===e?void 0:e.weekType)||yc.WORK_WEEK}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{weekType:this.weekType}),this.$emit(Ac.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],Jc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],Jc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],Jc.prototype,"config",void 0),(0,C.Cg)([l.observable],Jc.prototype,"weekType",void 0),Jc=(0,C.Cg)([(0,l.customElement)({name:"daily-recurrence",template:Xc,styles:qc})],Jc);const Qc=l.css`
|
|
4131
|
+
${Vc}
|
|
4132
4132
|
:host {
|
|
4133
4133
|
display: flex;
|
|
4134
4134
|
flex-direction: column;
|
|
@@ -4149,18 +4149,18 @@
|
|
|
4149
4149
|
.day-date-number-field::part(root) {
|
|
4150
4150
|
width: 40%;
|
|
4151
4151
|
}
|
|
4152
|
-
`,
|
|
4152
|
+
`,Zc=e=>l.html`
|
|
4153
4153
|
<div class="input-container">
|
|
4154
4154
|
<label class="label">Month</label>
|
|
4155
4155
|
<${e}-select data-test-id="month-dropdown" :value=${(0,U.O)(e=>e.selectedMonth)} @change="${e=>e.updateCronConfig()}" >
|
|
4156
|
-
${(0,l.repeat)(()
|
|
4156
|
+
${(0,l.repeat)(()=>$c,l.html`
|
|
4157
4157
|
<${e}-option value="${e=>e.value}">
|
|
4158
4158
|
${e=>e.label}
|
|
4159
4159
|
</${e}-option>
|
|
4160
4160
|
`)}
|
|
4161
4161
|
</${e}-select>
|
|
4162
4162
|
</div>
|
|
4163
|
-
`,
|
|
4163
|
+
`,eu=e=>l.html`
|
|
4164
4164
|
${(e=>l.html`
|
|
4165
4165
|
<div class="input-container">
|
|
4166
4166
|
<label class="label">On</label>
|
|
@@ -4169,22 +4169,22 @@
|
|
|
4169
4169
|
:value=${(0,U.O)(e=>e.dayOrDate)}
|
|
4170
4170
|
@change="${e=>e.updateCronConfig()}"
|
|
4171
4171
|
>
|
|
4172
|
-
<${e}-option data-test-id="${
|
|
4173
|
-
${
|
|
4172
|
+
<${e}-option data-test-id="${wc.DATE}">
|
|
4173
|
+
${wc.DATE}
|
|
4174
4174
|
</${e}-option>
|
|
4175
|
-
<${e}-option data-test-id="${
|
|
4176
|
-
${
|
|
4175
|
+
<${e}-option data-test-id="${wc.DAY_OF_MONTH}">
|
|
4176
|
+
${wc.DAY_OF_MONTH}
|
|
4177
4177
|
</${e}-option>
|
|
4178
4178
|
</${e}-select>
|
|
4179
4179
|
</div>
|
|
4180
4180
|
`)(e)}
|
|
4181
|
-
${(0,
|
|
4181
|
+
${(0,On.q)(e=>e.dayOrDate===wc.DATE,(e=>l.html`
|
|
4182
4182
|
<div class="row">
|
|
4183
|
-
${(0,l.when)(e=>e.config.type===
|
|
4184
|
-
${
|
|
4183
|
+
${(0,l.when)(e=>e.config.type===bc.YEARLY,l.html`
|
|
4184
|
+
${Zc(e)}
|
|
4185
4185
|
`)}
|
|
4186
4186
|
<div class="input-container">
|
|
4187
|
-
<label class="label"> ${e=>e.config.type===
|
|
4187
|
+
<label class="label"> ${e=>e.config.type===bc.MONTHLY?"Day date":"Day"}</label>
|
|
4188
4188
|
<${e}-select data-test-id="day-date-dropdown" :value=${(0,U.O)(e=>e.dayDate)} @change="${e=>e.updateCronConfig()}" >
|
|
4189
4189
|
${(0,l.repeat)(()=>Array.from({length:31},(e,t)=>t+1),l.html`
|
|
4190
4190
|
<${e}-option value="${e=>e}">
|
|
@@ -4197,8 +4197,8 @@
|
|
|
4197
4197
|
|
|
4198
4198
|
`)(e),(e=>l.html`
|
|
4199
4199
|
<div class="day-of-month-row">
|
|
4200
|
-
${(0,l.when)(e=>e.config.type===
|
|
4201
|
-
${
|
|
4200
|
+
${(0,l.when)(e=>e.config.type===bc.YEARLY,l.html`
|
|
4201
|
+
${Zc(e)}
|
|
4202
4202
|
`)}
|
|
4203
4203
|
<div class="input-container">
|
|
4204
4204
|
<label class="label">Day of Month</label>
|
|
@@ -4207,7 +4207,7 @@
|
|
|
4207
4207
|
:value=${(0,U.O)(e=>e.weekNumber)}
|
|
4208
4208
|
@change="${e=>e.updateCronConfig()}"
|
|
4209
4209
|
>
|
|
4210
|
-
${(0,l.repeat)(()=>
|
|
4210
|
+
${(0,l.repeat)(()=>xc,l.html`
|
|
4211
4211
|
<${e}-option value="${e=>e.value}">
|
|
4212
4212
|
${e=>e.label}
|
|
4213
4213
|
</${e}-option>
|
|
@@ -4221,7 +4221,7 @@
|
|
|
4221
4221
|
:value=${(0,U.O)(e=>e.day)}
|
|
4222
4222
|
@change="${e=>e.updateCronConfig()}"
|
|
4223
4223
|
>
|
|
4224
|
-
${(0,l.repeat)(()=>
|
|
4224
|
+
${(0,l.repeat)(()=>Cc,l.html`
|
|
4225
4225
|
<${e}-option value="${e=>e.value}">
|
|
4226
4226
|
${e=>e.label}
|
|
4227
4227
|
</${e}-option>
|
|
@@ -4230,24 +4230,24 @@
|
|
|
4230
4230
|
</div>
|
|
4231
4231
|
</div>
|
|
4232
4232
|
`)(e))}
|
|
4233
|
-
`,
|
|
4234
|
-
${e=>
|
|
4235
|
-
`;let
|
|
4236
|
-
${
|
|
4233
|
+
`,tu=l.html`
|
|
4234
|
+
${e=>eu(e.prefix)}
|
|
4235
|
+
`;let iu=class extends(Wc(a.FoundationElement)){constructor(){super(...arguments),this.prefix="",this.dayOrDate=wc.DATE,this.weekNumber="1",this.day="1",this.selectedMonth="1"}configChanged(){this.config.type!==bc.YEARLY&&this.config.type!==bc.MONTHLY||(this.dayOrDate=this.config.dateOrDay.type||wc.DATE,this.setFieldsFromConfig())}setFieldsFromConfig(){this.config.type===bc.YEARLY&&(this.selectedMonth=this.config.dateOrDay.month),this.config.dateOrDay.type===wc.DAY_OF_MONTH?(this.weekNumber=this.config.dateOrDay.weekNumber||"1",this.day=this.config.dateOrDay.day||"1"):this.dayDate=this.config.dateOrDay.dayDate||"1"}getDayOrDateConfig(){let e;return e=this.dayOrDate===wc.DATE?{type:wc.DATE,dayDate:this.dayDate||"1"}:{type:wc.DAY_OF_MONTH,day:this.day||"1",weekNumber:this.weekNumber||"1"},e}updateCronConfig(){this.config.type===bc.MONTHLY?this.config=Object.assign(Object.assign({},this.config),{dateOrDay:this.getDayOrDateConfig()}):this.config=Object.assign(Object.assign({},this.config),{dateOrDay:Object.assign(Object.assign({},this.getDayOrDateConfig()),{month:this.selectedMonth||"1"})}),this.$emit(Ac.updateCronConfig,this.config)}};(0,C.Cg)([l.observable],iu.prototype,"prefix",void 0),(0,C.Cg)([l.observable],iu.prototype,"config",void 0),(0,C.Cg)([l.observable],iu.prototype,"dayOrDate",void 0),(0,C.Cg)([l.observable],iu.prototype,"dayDate",void 0),(0,C.Cg)([l.observable],iu.prototype,"weekNumber",void 0),(0,C.Cg)([l.observable],iu.prototype,"day",void 0),(0,C.Cg)([l.observable],iu.prototype,"selectedMonth",void 0),iu=(0,C.Cg)([(0,l.customElement)({name:"monthly-yearly-recurrence",template:tu,styles:Qc})],iu);const ou=l.css`
|
|
4236
|
+
${Vc}
|
|
4237
4237
|
.weekdays-row {
|
|
4238
4238
|
display: flex;
|
|
4239
4239
|
gap: calc(var(--design-unit) * 3px);
|
|
4240
4240
|
flex-wrap: wrap;
|
|
4241
4241
|
}
|
|
4242
|
-
`,
|
|
4242
|
+
`,nu=l.html`
|
|
4243
4243
|
${e=>{return t=e.prefix,l.html`
|
|
4244
4244
|
<template>
|
|
4245
4245
|
<div class="input-container">
|
|
4246
4246
|
<label class="label">
|
|
4247
|
-
On ${e=>e.disableTooltips?"":
|
|
4247
|
+
On ${e=>e.disableTooltips?"":Yc("\n <p>Select which days to run this recurrence on. It's not valid to select no days, so if there is only a single day selected then its checkbox is disabled. </p>\n <p>If you need to change the day you can enable other days which will allow you to disable days until you only have a single day selected again.</p>\n",t)}
|
|
4248
4248
|
</label>
|
|
4249
4249
|
<div class="weekdays-row">
|
|
4250
|
-
${(0,l.repeat)(()=>
|
|
4250
|
+
${(0,l.repeat)(()=>Cc,l.html`
|
|
4251
4251
|
<${t}-checkbox
|
|
4252
4252
|
part="weekdays-checkbox"
|
|
4253
4253
|
class="weekdays-checkbox"
|
|
@@ -4263,12 +4263,12 @@
|
|
|
4263
4263
|
</div>
|
|
4264
4264
|
</template>
|
|
4265
4265
|
`;var t}}
|
|
4266
|
-
`;let
|
|
4266
|
+
`;let su=class extends(Wc(a.FoundationElement)){constructor(){super(...arguments),this.disableTooltips=!1,this.prefix="",this.selectedDays=new Set}configChanged(){var e;this.selectedDays=(null===(e=this.config)||void 0===e?void 0:e.selectedDays)?new Set(this.config.selectedDays):new Set}isDisabled(e){return 1===this.selectedDays.size&&this.selectedDays.has(e)}checkboxChangeHandler(e){const{checked:t,value:i}=e.target;t?this.selectedDays.add(i):this.selectedDays.size>1&&this.selectedDays.delete(i),this.updateCronConfig()}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{selectedDays:this.selectedDays}),this.$emit(Ac.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],su.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],su.prototype,"prefix",void 0),(0,C.Cg)([l.observable],su.prototype,"config",void 0),(0,C.Cg)([l.observable],su.prototype,"selectedDays",void 0),su=(0,C.Cg)([(0,l.customElement)({name:"weekly-recurrence",template:nu,styles:ou})],su),(0,jc.N)(Jc,su,iu);const au=(e,t)=>l.html`
|
|
4267
4267
|
<monthly-yearly-recurrence
|
|
4268
4268
|
:prefix=${()=>e}
|
|
4269
4269
|
:config=${()=>t.cronConfig}
|
|
4270
4270
|
></monthly-yearly-recurrence>
|
|
4271
|
-
`,
|
|
4271
|
+
`,ru=(e,t,i)=>l.html`
|
|
4272
4272
|
<div class="input-container">
|
|
4273
4273
|
${(0,l.when)(()=>i,l.html`
|
|
4274
4274
|
<label class="label">${i}</label>
|
|
@@ -4286,38 +4286,38 @@
|
|
|
4286
4286
|
<div slot="end" class="suffix-label">${()=>t.frequencySuffix}</div>
|
|
4287
4287
|
</${e}-select>
|
|
4288
4288
|
</div>
|
|
4289
|
-
`,
|
|
4289
|
+
`,lu=(e,t,i,o)=>l.html`
|
|
4290
4290
|
<div class="input-container">
|
|
4291
4291
|
<label class="label">Time </label>
|
|
4292
4292
|
<div class="flex-row">
|
|
4293
4293
|
${(0,l.when)(()=>i,l.html`
|
|
4294
4294
|
<${e}-select class="time-select" data-test-id="hours-dropdown" :value=${(0,U.O)(()=>t.hours)} @change="${()=>t.handleChange("hours")}" >
|
|
4295
|
-
${(0,l.repeat)(()=>Array.from({length:
|
|
4295
|
+
${(0,l.repeat)(()=>Array.from({length:kc},(e,t)=>t),l.html`
|
|
4296
4296
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4297
4297
|
`)}
|
|
4298
4298
|
<div slot="end" class="suffix-label">hr</div>
|
|
4299
4299
|
</${e}-select>`)}
|
|
4300
4300
|
${(0,l.when)(()=>o,l.html`
|
|
4301
4301
|
<${e}-select class="time-select" data-test-id="mins-dropdown" :value=${(0,U.O)(()=>t.minutes)} @change="${()=>t.handleChange("minutes")}" >
|
|
4302
|
-
${(0,l.repeat)(()=>Array.from({length:
|
|
4302
|
+
${(0,l.repeat)(()=>Array.from({length:Dc},(e,t)=>t),l.html`
|
|
4303
4303
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4304
4304
|
`)}
|
|
4305
4305
|
<div slot="end" class="suffix-label">min</div>
|
|
4306
4306
|
</${e}-select>`)}
|
|
4307
4307
|
<${e}-select class="time-select" data-test-id="seconds-dropdown" :value=${(0,U.O)(()=>t.seconds)} @change="${()=>t.handleChange("seconds")}" >
|
|
4308
|
-
${(0,l.repeat)(()=>Array.from({length:
|
|
4308
|
+
${(0,l.repeat)(()=>Array.from({length:Dc},(e,t)=>t),l.html`
|
|
4309
4309
|
<${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
|
|
4310
4310
|
`)}
|
|
4311
4311
|
<div slot="end" class="suffix-label">sec</div>
|
|
4312
4312
|
</${e}-select>
|
|
4313
4313
|
</div>
|
|
4314
4314
|
</div>
|
|
4315
|
-
`,
|
|
4315
|
+
`,du=(e,t,i)=>{switch(e){case bc.MINUTES:return l.html`
|
|
4316
4316
|
<div class="minutes-options-row">
|
|
4317
4317
|
<div class="input-container">
|
|
4318
4318
|
<label class="label"
|
|
4319
4319
|
>During
|
|
4320
|
-
${()=>i.disableTooltips?"":
|
|
4320
|
+
${()=>i.disableTooltips?"":Yc("\n <p>Which hours in the day to run this schedule for:</p>\n <ul>\n <li><strong>Every hour:</strong> runs the minute schedule during every hour of the day.</li>\n <li><strong>Specific hours:</strong> specify which hours the minute schedule runs for. For example, just trading hours. Selecting every hour will configure the schedule as <strong>Every hour</strong>.</li>\n </ul>\n",t)}</label
|
|
4321
4321
|
>
|
|
4322
4322
|
<${t}-select
|
|
4323
4323
|
data-test-id="during-select"
|
|
@@ -4337,7 +4337,7 @@
|
|
|
4337
4337
|
${(0,l.when)(()=>i.isSpecificHours,l.html`
|
|
4338
4338
|
<div class="input-container">
|
|
4339
4339
|
<label class="label"
|
|
4340
|
-
>Hours ${
|
|
4340
|
+
>Hours ${Yc(Kc,t)}</label
|
|
4341
4341
|
>
|
|
4342
4342
|
<${t}-multiselect
|
|
4343
4343
|
class="time-select"
|
|
@@ -4352,15 +4352,15 @@
|
|
|
4352
4352
|
`)}
|
|
4353
4353
|
</div>
|
|
4354
4354
|
<div class="row">
|
|
4355
|
-
${
|
|
4356
|
-
${
|
|
4355
|
+
${ru(t,i,"Every")}
|
|
4356
|
+
${lu(t,i,!1,!1)}
|
|
4357
4357
|
</div>
|
|
4358
|
-
`;case
|
|
4358
|
+
`;case bc.HOURLY:return l.html`
|
|
4359
4359
|
<div class="row">
|
|
4360
4360
|
<div class="input-container">
|
|
4361
4361
|
<label class="label"
|
|
4362
4362
|
>Mode
|
|
4363
|
-
${()=>i.disableTooltips?"":
|
|
4363
|
+
${()=>i.disableTooltips?"":Yc("\n <p>Select the type of hourly recurrence:</p>\n <ul>\n <li><strong>Interval:</strong> runs at a repeating interval of hours (e.g. every 2 hours).</li>\n <li><strong>Selected Hours:</strong> allows you to choose specific hours of the day (e.g. 9, 10, and 14).</li>\n </ul>\n",t)}</label
|
|
4364
4364
|
>
|
|
4365
4365
|
<${t}-select
|
|
4366
4366
|
data-test-id="hourly-during-select"
|
|
@@ -4371,12 +4371,12 @@
|
|
|
4371
4371
|
<${t}-option value="specific_hours">Selected Hours</${t}-option>
|
|
4372
4372
|
</${t}-select>
|
|
4373
4373
|
</div>
|
|
4374
|
-
${(0,l.when)(()=>"every_hour"===i.during,
|
|
4374
|
+
${(0,l.when)(()=>"every_hour"===i.during,ru(t,i,"Every"))}
|
|
4375
4375
|
${(0,l.when)(()=>i.isSpecificHours,l.html`
|
|
4376
4376
|
<div class="break"></div>
|
|
4377
4377
|
<div class="input-container">
|
|
4378
4378
|
<label class="label">
|
|
4379
|
-
Hours ${
|
|
4379
|
+
Hours ${Yc(Kc,t)}
|
|
4380
4380
|
</label>
|
|
4381
4381
|
<${t}-multiselect
|
|
4382
4382
|
class="time-select"
|
|
@@ -4388,9 +4388,9 @@
|
|
|
4388
4388
|
></${t}-multiselect>
|
|
4389
4389
|
</div>
|
|
4390
4390
|
`)}
|
|
4391
|
-
${
|
|
4391
|
+
${lu(t,i,!1,!0)}
|
|
4392
4392
|
</div>
|
|
4393
|
-
`;case
|
|
4393
|
+
`;case bc.DAILY:return l.html`
|
|
4394
4394
|
${((e,t)=>l.html`
|
|
4395
4395
|
<daily-recurrence
|
|
4396
4396
|
:prefix=${()=>e}
|
|
@@ -4399,10 +4399,10 @@
|
|
|
4399
4399
|
></daily-recurrence>
|
|
4400
4400
|
`)(t,i)}
|
|
4401
4401
|
<div class="row">
|
|
4402
|
-
${
|
|
4403
|
-
${
|
|
4402
|
+
${ru(t,i,"Every")}
|
|
4403
|
+
${lu(t,i,!0,!0)}
|
|
4404
4404
|
</div>
|
|
4405
|
-
`;case
|
|
4405
|
+
`;case bc.WEEKLY:return l.html`
|
|
4406
4406
|
<div class="row">
|
|
4407
4407
|
${((e,t)=>l.html`
|
|
4408
4408
|
<weekly-recurrence
|
|
@@ -4410,25 +4410,25 @@
|
|
|
4410
4410
|
:config=${()=>t.cronConfig}
|
|
4411
4411
|
?disable-tooltips=${()=>t.disableTooltips}
|
|
4412
4412
|
></weekly-recurrence>
|
|
4413
|
-
`)(t,i)} ${
|
|
4413
|
+
`)(t,i)} ${lu(t,i,!0,!0)}
|
|
4414
4414
|
</div>
|
|
4415
|
-
`;case
|
|
4415
|
+
`;case bc.MONTHLY:return l.html`
|
|
4416
4416
|
<div class="row">
|
|
4417
|
-
${
|
|
4418
|
-
${
|
|
4417
|
+
${ru(t,i,"Every")}
|
|
4418
|
+
${lu(t,i,!0,!0)}
|
|
4419
4419
|
</div>
|
|
4420
|
-
${
|
|
4421
|
-
`;case
|
|
4422
|
-
<div class="row">${
|
|
4423
|
-
${
|
|
4424
|
-
`;default:return l.html``}},
|
|
4420
|
+
${au(t,i)}
|
|
4421
|
+
`;case bc.YEARLY:return l.html`
|
|
4422
|
+
<div class="row">${lu(t,i,!0,!0)}</div>
|
|
4423
|
+
${au(t,i)}
|
|
4424
|
+
`;default:return l.html``}},cu=e=>l.html`
|
|
4425
4425
|
<template>
|
|
4426
4426
|
<div class="container">
|
|
4427
4427
|
<div class="input-container">
|
|
4428
4428
|
<label class="label"
|
|
4429
4429
|
>Recurrence
|
|
4430
4430
|
${(0,l.when)(e=>!e.disableTooltips,l.html`
|
|
4431
|
-
${t=>
|
|
4431
|
+
${t=>Yc(`\n <p>Select how often the event should occur:</p>\n <ul>\n${!t.minMinuteInterval||t.minMinuteInterval<Rc?"<li><strong>Minutes:</strong> Runs at every interval of minutes from the hour. Can be for every or specific hours.</li>":""}\n <li><strong>Hourly:</strong> Runs at a specific time in the hour, for one or more hours in the day.</li>\n <li><strong>Daily:</strong> Runs at a specific time of day, for a frequency interval of days per week (or work week).</li>\n <li><strong>Weekly:</strong> Runs at a specific time of day, for specific days of the week.</li>\n <li><strong>Monthly:</strong> Runs at a specific time of day in monthly intervals, on a specific date or day of month .</li>\n <li><strong>Yearly:</strong> Runs at a specific time, every year on a specific date or day of month.</li>\n </ul>\n`,e)}
|
|
4432
4432
|
`)}
|
|
4433
4433
|
</label>
|
|
4434
4434
|
<${e}-select
|
|
@@ -4437,36 +4437,36 @@
|
|
|
4437
4437
|
@change="${e=>e.handleRecurrenceChange()}"
|
|
4438
4438
|
>
|
|
4439
4439
|
${(0,l.when)(e=>e.isMinutesRecurrenceEnabled,l.html`
|
|
4440
|
-
<${e}-option data-test-id="${
|
|
4441
|
-
${
|
|
4440
|
+
<${e}-option data-test-id="${bc.MINUTES}">
|
|
4441
|
+
${bc.MINUTES}
|
|
4442
4442
|
</${e}-option>
|
|
4443
4443
|
`)}
|
|
4444
|
-
<${e}-option data-test-id="${
|
|
4445
|
-
${
|
|
4444
|
+
<${e}-option data-test-id="${bc.HOURLY}">
|
|
4445
|
+
${bc.HOURLY}
|
|
4446
4446
|
</${e}-option>
|
|
4447
|
-
<${e}-option data-test-id="${
|
|
4448
|
-
${
|
|
4447
|
+
<${e}-option data-test-id="${bc.DAILY}">
|
|
4448
|
+
${bc.DAILY}
|
|
4449
4449
|
</${e}-option>
|
|
4450
|
-
<${e}-option data-test-id="${
|
|
4451
|
-
${
|
|
4450
|
+
<${e}-option data-test-id="${bc.WEEKLY}">
|
|
4451
|
+
${bc.WEEKLY}
|
|
4452
4452
|
</${e}-option>
|
|
4453
|
-
<${e}-option data-test-id="${
|
|
4454
|
-
${
|
|
4453
|
+
<${e}-option data-test-id="${bc.MONTHLY}">
|
|
4454
|
+
${bc.MONTHLY}
|
|
4455
4455
|
</${e}-option>
|
|
4456
|
-
<${e}-option data-test-id="${
|
|
4457
|
-
${
|
|
4456
|
+
<${e}-option data-test-id="${bc.YEARLY}">
|
|
4457
|
+
${bc.YEARLY}
|
|
4458
4458
|
</${e}-option>
|
|
4459
4459
|
</${e}-select>
|
|
4460
4460
|
</div>
|
|
4461
4461
|
|
|
4462
4462
|
${(0,l.repeat)(e=>[`${e.recurrence}-${e.during}`],l.html`
|
|
4463
|
-
${(t,i)=>
|
|
4463
|
+
${(t,i)=>du(i.parent.recurrence,e,i.parent)}
|
|
4464
4464
|
`,{recycle:!1})}
|
|
4465
4465
|
</div>
|
|
4466
4466
|
</template>
|
|
4467
|
-
`,
|
|
4468
|
-
${e=>
|
|
4469
|
-
`;class uu extends a.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:_c,buildConfigForHourlyRecurrence:Mc,buildConfigForDailyRecurrence:Nc,buildConfigForWeeklyRecurrence:Hc,buildConfigForMonthlyRecurrence:Uc,buildConfigForYearlyRecurrence:zc},this.recurrence=fc.DAILY,this.cron="",this.value=this.cron,this.cronConfig={type:fc.DAILY,weekType:bc.WEEK,hours:"0",minutes:"0",seconds:"0"},this.frequency="1",this.during="every_hour",this.hours="0",this.minutes="0",this.seconds="0",this.disableTooltips=!1,this.timezone=""}cronChanged(){if(this.cron)try{if(!((e,t=Fc)=>{const i=e.trim().split(" ");if(i.length!=Ec)return!1;const[o,n,s,a,r,l]=i;return t(o,0,kc-1)&&t(n,0,kc-1)&&t(s,0,Tc-1)&&t(a,1,Sc,!0)&&t(r,1,$c)&&t(l,0,Oc,!0)})(this.cron))return void vc({title:"Cron Scheduler",body:"Invalid Cron Expression",toast:{type:"critical"}},T(this));this.setsFieldsFromCronEx()}catch(e){return console.error("Error:",e),void vc({title:"Cron Scheduler",body:e,toast:{type:"critical"}},T(this))}}get duringOptions(){return[{label:"Every hour",value:"every_hour"},{label:"Specific hours",value:"specific_hours"}]}get frequencySuffix(){switch(this.cronConfig.type){case fc.MINUTES:return"Minute(s)";case fc.HOURLY:return"Hour(s)";case fc.DAILY:return"Day(s)";case fc.MONTHLY:return"Month(s)";default:return""}}get frequencyList(){switch(this.cronConfig.type){case fc.MINUTES:const e=[1,2,3,4,5,6,10,12,15,20,30],t=this.minMinuteInterval?Number(this.minMinuteInterval):1;return e.filter(e=>e>=t);case fc.HOURLY:return Array.from({length:Tc-1},(e,t)=>t+1);case fc.DAILY:return Array.from({length:Sc},(e,t)=>t+1);case fc.MONTHLY:case fc.YEARLY:return Array.from({length:$c},(e,t)=>t+1);case fc.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:Tc},(e,t)=>({label:t.toString(),value:t.toString()}))}get selectedHours(){return this.hours&&"*"!==this.hours&&"0"!==this.hours?this.hours.split(","):"*"===this.hours?this.hourOptions.map(e=>e.value):[this.hours]}handleHoursChange(e){const t=e.detail;t.length===Tc?(this.hours="*",this.frequency="1",this.cronConfig.frequency="1"):t&&0!==t.length?this.hours=t.sort((e,t)=>Number(e)-Number(t)).join(","):this.hours="0",this.handleChange("hours")}get isMinutesRecurrenceEnabled(){return!this.minMinuteInterval||Number(this.minMinuteInterval)<=30}get isSpecificHours(){return"specific_hours"===this.during}get isDailyFrequencyDisabled(){return this.cronConfig.type===fc.DAILY&&this.cronConfig.weekType===bc.WORK_WEEK}minMinuteIntervalChanged(){this.minMinuteInterval>=60&&console.warn("Minimum minute interval has no effect on schedules with an hourly or longer recurrance")}connectedCallback(){super.connectedCallback(),this.addEventListener(Rc.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(Rc.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case fc.MINUTES:const e=this.getBaseConfigFields(),{minutes:t}=e,i=(0,C.Tt)(e,["minutes"]);this.during="every_hour",this.hours="*";const o=[1,2,3,4,5,6,10,12,15,20,30],n=this.minMinuteInterval?Number(this.minMinuteInterval):1,s=o.find(e=>e>=n)||1;this.cronConfig=Object.assign(Object.assign({type:fc.MINUTES},i),{frequency:s.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case fc.HOURLY:const a=this.getBaseConfigFields(),{hours:r}=a,l=(0,C.Tt)(a,["hours"]);this.during="every_hour",this.hours="0",this.cronConfig=Object.assign(Object.assign({type:fc.HOURLY},l),{frequency:"1",during:"every_hour",hours:"0"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case fc.DAILY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:fc.DAILY},this.getBaseConfigFields()),{frequency:"1",weekType:bc.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case fc.WEEKLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:fc.WEEKLY},this.getBaseConfigFields()),{frequency:"1",selectedDays:new Set(["2"])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case fc.MONTHLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:fc.MONTHLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:yc.DATE,dayDate:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case fc.YEARLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:fc.YEARLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:yc.DATE,dayDate:"1",month:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:vc({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}}handleChange(e){if("frequency"===e&&0===Number(this.frequency))throw new Error("Frequency must be greater than 0");this.cronConfig[e]=this[e],this.generateCronExpressionFromConfig(this.cronConfig)}handleDuringChange(){"every_hour"===this.during?this.hours="*":"*"===this.hours&&(this.hours="0"),this.cronConfig.type!==fc.MINUTES&&this.cronConfig.type!==fc.HOURLY||(this.cronConfig.during=this.during,this.cronConfig.hours=this.hours),this.generateCronExpressionFromConfig(this.cronConfig)}handleCronConfigUpdate({detail:e}){this.cronConfig=Object.assign(Object.assign({},this.getBaseConfigFields()),e),this.generateCronExpressionFromConfig(this.cronConfig)}generateCronExpressionFromConfig(e){switch(e.type){case fc.MINUTES:this.cron=function(e){const t="specific_hours"===e.during&&e.hours?e.hours:"*";return`${e.seconds} 0/${e.frequency} ${t} ? * *`}(e);break;case fc.HOURLY:this.cron=function(e){return"specific_hours"===e.during&&e.hours&&"*"!==e.hours?`${e.seconds} ${e.minutes} ${e.hours} ? * *`:`${e.seconds} ${e.minutes} 0/${e.frequency} ? * *`}(e);break;case fc.DAILY:this.cron=function(e,t=Ac){const i=e.weekType===bc.WORK_WEEK?"?":`*${t(e.frequency)}`;return`${e.seconds} ${e.minutes} ${e.hours} ${i} * ${e.weekType===bc.WORK_WEEK?"2-6":"?"}`}(e,Ac);break;case fc.WEEKLY:this.cron=function(e){const t=[...e.selectedDays].join(",")||"*";return`${e.seconds} ${e.minutes} ${e.hours} ? * ${t}`}(e);break;case fc.MONTHLY:this.cron=function(e,t=Ac){const{dateOrDay:i,minutes:o,hours:n,seconds:s,frequency:a}=e,r=t(a);return i.type===yc.DATE?`${s} ${o} ${n} ${i.dayDate} *${r} ?`:"-1"===i.weekNumber?`${s} ${o} ${n} ? *${r} ${i.day}L`:`${e.seconds} ${o} ${n} ? *${r} ${i.day}#${i.weekNumber}`}(e,Ac);break;case fc.YEARLY:this.cron=function(e){const{dateOrDay:t,minutes:i,seconds:o,hours:n}=e;return t.type===yc.DATE?`${o} ${i} ${n} ${t.dayDate} ${t.month} ?`:"-1"===t.weekNumber?`${o} ${i} ${n} ? ${t.month} ${t.day}L`:`${o} ${i} ${n} ? ${t.month} ${t.day}#${t.weekNumber}`}(e);break;default:vc({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}this.value=this.cron,this.$emit("change")}setsFieldsFromCronEx(){this.cronConfig=function(e,t){if(!e)return;const i=e.split(" "),[o,n,s,a,r,l]=i;if("?"!==l&&"?"!==a)throw new Error("Support for specifying both a day-of-week AND a day-of-month parameter is not implemented");if(/^(0|\*)\/\d+$/.test(n))return Object.assign({seconds:o},t.buildConfigForMinutesRecurrence(n,s));if(/^(0|\*)\/\d+$/.test(s))return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(s));if("?"===a&&"*"===l)return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(s));if("2-6"===l||"?"===l&&("*"===a||a.startsWith("*")))return Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForDailyRecurrence(a,l));if(/^([1-7](,[1-7])*)$/.test(l)||"*"===l)return Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForWeeklyRecurrence(l));if(l.includes("L")||l.includes("#")||/^([1-9]|[12]\d|3[01])$/.test(a)&&"?"===l)return"*"==r||r.startsWith("*/")?Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForMonthlyRecurrence(a,r,l)):Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForYearlyRecurrence(a,r,l));throw new Error("Invalid Cron Expression")}(this.cron,this.getConfigs),this.recurrence=this.cronConfig.type,this.frequency=this.cronConfig.frequency;const e=this.cronConfig;"minutes"in e&&(this.minutes=e.minutes),e.type!==fc.MINUTES&&e.type!==fc.HOURLY||(this.during=e.during||"every_hour",e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==fc.HOURLY&&e.type!==fc.MINUTES&&(this.hours=e.hours)}}(0,C.Cg)([l.observable],uu.prototype,"recurrence",void 0),(0,C.Cg)([l.observable],uu.prototype,"cron",void 0),(0,C.Cg)([l.observable],uu.prototype,"cronConfig",void 0),(0,C.Cg)([l.observable],uu.prototype,"frequency",void 0),(0,C.Cg)([l.observable],uu.prototype,"during",void 0),(0,C.Cg)([l.volatile],uu.prototype,"duringOptions",null),(0,C.Cg)([l.observable],uu.prototype,"hours",void 0),(0,C.Cg)([l.observable],uu.prototype,"minutes",void 0),(0,C.Cg)([l.observable],uu.prototype,"seconds",void 0),(0,C.Cg)([l.volatile],uu.prototype,"frequencySuffix",null),(0,C.Cg)([l.volatile],uu.prototype,"frequencyList",null),(0,C.Cg)([l.volatile],uu.prototype,"hourOptions",null),(0,C.Cg)([l.volatile],uu.prototype,"selectedHours",null),(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],uu.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],uu.prototype,"disableTooltips",void 0),(0,C.Cg)([l.volatile],uu.prototype,"isMinutesRecurrenceEnabled",null),(0,C.Cg)([l.volatile],uu.prototype,"isSpecificHours",null),(0,C.Cg)([l.volatile],uu.prototype,"isDailyFrequencyDisabled",null),(0,C.Cg)([l.attr],uu.prototype,"timezone",void 0);const hu=void 0,pu={},mu=uu.compose(Object.assign({baseName:"scheduler-cron-builder",styles:Vc,template:cu,shadowOptions:hu},pu)),gu=l.css`
|
|
4467
|
+
`,uu=l.html`
|
|
4468
|
+
${e=>cu(T(e))}
|
|
4469
|
+
`;class hu extends a.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:Hc,buildConfigForHourlyRecurrence:_c,buildConfigForDailyRecurrence:Mc,buildConfigForWeeklyRecurrence:Pc,buildConfigForMonthlyRecurrence:Bc,buildConfigForYearlyRecurrence:Uc},this.recurrence=bc.DAILY,this.cron="",this.value=this.cron,this.cronConfig={type:bc.DAILY,weekType:yc.WEEK,hours:"0",minutes:"0",seconds:"0"},this.frequency="1",this.during="every_hour",this.hours="0",this.minutes="0",this.seconds="0",this.disableTooltips=!1,this.timezone=""}cronChanged(){if(this.cron)try{if(!((e,t=Fc)=>{const i=e.trim().split(" ");if(i.length!=Oc)return!1;const[o,n,s,a,r,l]=i;return t(o,0,Dc-1)&&t(n,0,Dc-1)&&t(s,0,kc-1)&&t(a,1,Ec,!0)&&t(r,1,Sc)&&t(l,0,Tc,!0)})(this.cron))return void fc({title:"Cron Scheduler",body:"Invalid Cron Expression",toast:{type:"critical"}},T(this));this.setsFieldsFromCronEx()}catch(e){return console.error("Error:",e),void fc({title:"Cron Scheduler",body:e,toast:{type:"critical"}},T(this))}}get duringOptions(){return[{label:"Every hour",value:"every_hour"},{label:"Specific hours",value:"specific_hours"}]}get frequencySuffix(){switch(this.cronConfig.type){case bc.MINUTES:return"Minute(s)";case bc.HOURLY:return"Hour(s)";case bc.DAILY:return"Day(s)";case bc.MONTHLY:return"Month(s)";default:return""}}get frequencyList(){switch(this.cronConfig.type){case bc.MINUTES:const e=[1,2,3,4,5,6,10,12,15,20,30],t=this.minMinuteInterval?Number(this.minMinuteInterval):1;return e.filter(e=>e>=t);case bc.HOURLY:return Array.from({length:kc-1},(e,t)=>t+1);case bc.DAILY:return Array.from({length:Ec},(e,t)=>t+1);case bc.MONTHLY:case bc.YEARLY:return Array.from({length:Sc},(e,t)=>t+1);case bc.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:kc},(e,t)=>({label:t.toString(),value:t.toString()}))}get selectedHours(){return this.hours&&"*"!==this.hours&&"0"!==this.hours?this.hours.split(","):"*"===this.hours?this.hourOptions.map(e=>e.value):[this.hours]}handleHoursChange(e){const t=e.detail;t.length===kc?(this.hours="*",this.frequency="1",this.cronConfig.frequency="1"):t&&0!==t.length?this.hours=t.sort((e,t)=>Number(e)-Number(t)).join(","):this.hours="0",this.handleChange("hours")}get isMinutesRecurrenceEnabled(){return!this.minMinuteInterval||Number(this.minMinuteInterval)<=30}get isSpecificHours(){return"specific_hours"===this.during}get isDailyFrequencyDisabled(){return this.cronConfig.type===bc.DAILY&&this.cronConfig.weekType===yc.WORK_WEEK}minMinuteIntervalChanged(){this.minMinuteInterval>=60&&console.warn("Minimum minute interval has no effect on schedules with an hourly or longer recurrance")}connectedCallback(){super.connectedCallback(),this.addEventListener(Ac.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(Ac.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case bc.MINUTES:const e=this.getBaseConfigFields(),{minutes:t}=e,i=(0,C.Tt)(e,["minutes"]);this.during="every_hour",this.hours="*";const o=[1,2,3,4,5,6,10,12,15,20,30],n=this.minMinuteInterval?Number(this.minMinuteInterval):1,s=o.find(e=>e>=n)||1;this.cronConfig=Object.assign(Object.assign({type:bc.MINUTES},i),{frequency:s.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case bc.HOURLY:const a=this.getBaseConfigFields(),{hours:r}=a,l=(0,C.Tt)(a,["hours"]);this.during="every_hour",this.hours="0",this.cronConfig=Object.assign(Object.assign({type:bc.HOURLY},l),{frequency:"1",during:"every_hour",hours:"0"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case bc.DAILY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:bc.DAILY},this.getBaseConfigFields()),{frequency:"1",weekType:yc.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case bc.WEEKLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:bc.WEEKLY},this.getBaseConfigFields()),{frequency:"1",selectedDays:new Set(["2"])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case bc.MONTHLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:bc.MONTHLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:wc.DATE,dayDate:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case bc.YEARLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:bc.YEARLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:wc.DATE,dayDate:"1",month:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:fc({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}}handleChange(e){if("frequency"===e&&0===Number(this.frequency))throw new Error("Frequency must be greater than 0");this.cronConfig[e]=this[e],this.generateCronExpressionFromConfig(this.cronConfig)}handleDuringChange(){"every_hour"===this.during?this.hours="*":"*"===this.hours&&(this.hours="0"),this.cronConfig.type!==bc.MINUTES&&this.cronConfig.type!==bc.HOURLY||(this.cronConfig.during=this.during,this.cronConfig.hours=this.hours),this.generateCronExpressionFromConfig(this.cronConfig)}handleCronConfigUpdate({detail:e}){this.cronConfig=Object.assign(Object.assign({},this.getBaseConfigFields()),e),this.generateCronExpressionFromConfig(this.cronConfig)}generateCronExpressionFromConfig(e){switch(e.type){case bc.MINUTES:this.cron=function(e){const t="specific_hours"===e.during&&e.hours?e.hours:"*";return`${e.seconds} 0/${e.frequency} ${t} ? * *`}(e);break;case bc.HOURLY:this.cron=function(e){return"specific_hours"===e.during&&e.hours&&"*"!==e.hours?`${e.seconds} ${e.minutes} ${e.hours} ? * *`:`${e.seconds} ${e.minutes} 0/${e.frequency} ? * *`}(e);break;case bc.DAILY:this.cron=function(e,t=Lc){const i=e.weekType===yc.WORK_WEEK?"?":`*${t(e.frequency)}`;return`${e.seconds} ${e.minutes} ${e.hours} ${i} * ${e.weekType===yc.WORK_WEEK?"2-6":"?"}`}(e,Lc);break;case bc.WEEKLY:this.cron=function(e){const t=[...e.selectedDays].join(",")||"*";return`${e.seconds} ${e.minutes} ${e.hours} ? * ${t}`}(e);break;case bc.MONTHLY:this.cron=function(e,t=Lc){const{dateOrDay:i,minutes:o,hours:n,seconds:s,frequency:a}=e,r=t(a);return i.type===wc.DATE?`${s} ${o} ${n} ${i.dayDate} *${r} ?`:"-1"===i.weekNumber?`${s} ${o} ${n} ? *${r} ${i.day}L`:`${e.seconds} ${o} ${n} ? *${r} ${i.day}#${i.weekNumber}`}(e,Lc);break;case bc.YEARLY:this.cron=function(e){const{dateOrDay:t,minutes:i,seconds:o,hours:n}=e;return t.type===wc.DATE?`${o} ${i} ${n} ${t.dayDate} ${t.month} ?`:"-1"===t.weekNumber?`${o} ${i} ${n} ? ${t.month} ${t.day}L`:`${o} ${i} ${n} ? ${t.month} ${t.day}#${t.weekNumber}`}(e);break;default:fc({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}this.value=this.cron,this.$emit("change")}setsFieldsFromCronEx(){this.cronConfig=function(e,t){if(!e)return;const i=e.split(" "),[o,n,s,a,r,l]=i;if("?"!==l&&"?"!==a)throw new Error("Support for specifying both a day-of-week AND a day-of-month parameter is not implemented");if(/^(0|\*)\/\d+$/.test(n))return Object.assign({seconds:o},t.buildConfigForMinutesRecurrence(n,s));if(/^(0|\*)\/\d+$/.test(s))return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(s));if("?"===a&&"*"===l)return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(s));if("2-6"===l||"?"===l&&("*"===a||a.startsWith("*")))return Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForDailyRecurrence(a,l));if(/^([1-7](,[1-7])*)$/.test(l)||"*"===l)return Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForWeeklyRecurrence(l));if(l.includes("L")||l.includes("#")||/^([1-9]|[12]\d|3[01])$/.test(a)&&"?"===l)return"*"==r||r.startsWith("*/")?Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForMonthlyRecurrence(a,r,l)):Object.assign({hours:s,minutes:n,seconds:o},t.buildConfigForYearlyRecurrence(a,r,l));throw new Error("Invalid Cron Expression")}(this.cron,this.getConfigs),this.recurrence=this.cronConfig.type,this.frequency=this.cronConfig.frequency;const e=this.cronConfig;"minutes"in e&&(this.minutes=e.minutes),e.type!==bc.MINUTES&&e.type!==bc.HOURLY||(this.during=e.during||"every_hour",e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==bc.HOURLY&&e.type!==bc.MINUTES&&(this.hours=e.hours)}}(0,C.Cg)([l.observable],hu.prototype,"recurrence",void 0),(0,C.Cg)([l.observable],hu.prototype,"cron",void 0),(0,C.Cg)([l.observable],hu.prototype,"cronConfig",void 0),(0,C.Cg)([l.observable],hu.prototype,"frequency",void 0),(0,C.Cg)([l.observable],hu.prototype,"during",void 0),(0,C.Cg)([l.volatile],hu.prototype,"duringOptions",null),(0,C.Cg)([l.observable],hu.prototype,"hours",void 0),(0,C.Cg)([l.observable],hu.prototype,"minutes",void 0),(0,C.Cg)([l.observable],hu.prototype,"seconds",void 0),(0,C.Cg)([l.volatile],hu.prototype,"frequencySuffix",null),(0,C.Cg)([l.volatile],hu.prototype,"frequencyList",null),(0,C.Cg)([l.volatile],hu.prototype,"hourOptions",null),(0,C.Cg)([l.volatile],hu.prototype,"selectedHours",null),(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],hu.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],hu.prototype,"disableTooltips",void 0),(0,C.Cg)([l.volatile],hu.prototype,"isMinutesRecurrenceEnabled",null),(0,C.Cg)([l.volatile],hu.prototype,"isSpecificHours",null),(0,C.Cg)([l.volatile],hu.prototype,"isDailyFrequencyDisabled",null),(0,C.Cg)([l.attr],hu.prototype,"timezone",void 0);const pu=void 0,mu={},gu=hu.compose(Object.assign({baseName:"scheduler-cron-builder",styles:Gc,template:uu,shadowOptions:pu},mu)),vu=l.css`
|
|
4470
4470
|
/* Host */
|
|
4471
4471
|
:host {
|
|
4472
4472
|
display: flex;
|
|
@@ -4493,7 +4493,7 @@
|
|
|
4493
4493
|
.timezone-combobox::part(listbox) {
|
|
4494
4494
|
max-height: 20vh;
|
|
4495
4495
|
}
|
|
4496
|
-
`,
|
|
4496
|
+
`,fu=e=>l.html`
|
|
4497
4497
|
<template>
|
|
4498
4498
|
<div class="container">
|
|
4499
4499
|
<label class="label">Time Zone</label>
|
|
@@ -4509,9 +4509,9 @@
|
|
|
4509
4509
|
</${e}-combobox>
|
|
4510
4510
|
</div>
|
|
4511
4511
|
</template>
|
|
4512
|
-
`,
|
|
4513
|
-
${e=>
|
|
4514
|
-
`;class
|
|
4512
|
+
`,bu=l.html`
|
|
4513
|
+
${e=>fu(T(e))}
|
|
4514
|
+
`;class yu extends a.FoundationElement{constructor(){super(...arguments),this.timezone="",this.value=this.timezone}timezoneChanged(){this.value=this.timezone,this.$emit("change")}connectedCallback(){super.connectedCallback(),this.getTimeZones()}getTimeZones(){return(0,C.sH)(this,void 0,void 0,function*(){const e=["Europe/London","America/New_York"];try{const t=yield this.connect.request("VALID_TIME_ZONE",{REQUEST:{}});if(!t.REPLY||!Array.isArray(t.REPLY))throw new Error("Invalid data returned for Timezones");this.timeZones=t.REPLY.map(e=>e.ZONE_ID).sort((t,i)=>e.includes(t)&&!e.includes(i)?-1:!e.includes(t)&&e.includes(i)?1:t.localeCompare(i))}catch(e){fc({title:"Cron Scheduler",body:"Unable to fetch timezones data.",toast:{type:"critical"}},"rapid"),Ys.v.error(e)}})}}(0,C.Cg)([l.observable],yu.prototype,"timezone",void 0),(0,C.Cg)([hi.dm],yu.prototype,"connect",void 0),(0,C.Cg)([l.observable],yu.prototype,"timeZones",void 0);const wu=void 0,Cu={},xu=yu.compose(Object.assign({baseName:"scheduler-timezone",styles:vu,template:bu,shadowOptions:wu},Cu)),$u=l.css`
|
|
4515
4515
|
.search-bar-combobox {
|
|
4516
4516
|
width: 100%;
|
|
4517
4517
|
min-width: auto;
|
|
@@ -4587,7 +4587,7 @@
|
|
|
4587
4587
|
.close-icon {
|
|
4588
4588
|
color: var(--accent-fill-rest);
|
|
4589
4589
|
}
|
|
4590
|
-
|
|
4590
|
+
`,Su=(e="start")=>'\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="10px" height="10px">\n <g transform="matrix(1 0 0 1 -256 -14 )">\n <path class="cross-icon" fill="white" d="M 9.9265625 8.865937499999998 L 6.060625000000001 5 L 9.265625 1.795 L 9.9265625 1.1340624999999993 C 10.0240625 1.0365624999999996 10.0240625 0.8781249999999996 9.9265625 0.7806249999999992 L 9.219375 0.07343749999999982 C 9.121875 -0.024062500000000542 8.9634375 -0.024062500000000542 8.8659375 0.07343749999999982 L 5 3.9393750000000005 L 1.1340625 0.073125 C 1.0365625 -0.02437500000000037 0.8781250000000002 -0.02437500000000037 0.7806249999999999 0.073125 L 0.073125 0.7803125 C -0.024375000000000008 0.8778124999999998 -0.024375000000000008 1.0362499999999997 0.073125 1.13375 L 3.9393750000000005 5 L 0.073125 8.865937499999998 C -0.024375000000000008 8.9634375 -0.024375000000000008 9.121875 0.073125 9.219375000000001 L 0.7803125 9.9265625 C 0.8778125000000001 10.0240625 1.03625 10.0240625 1.13375 9.9265625 L 5 6.060625 L 8.205 9.265625 L 8.8659375 9.9265625 C 8.9634375 10.0240625 9.121875 10.0240625 9.219375 9.9265625 L 9.9265625 9.219375000000001 C 10.0240625 9.121875 10.0240625 8.9634375 9.9265625 8.865937499999998 Z " fill-rule="nonzero" fill="#c9c9c9" stroke="none" fill-opacity="0.8" transform="matrix(1 0 0 1 256 14 )"/>\n </g>\n</svg>\n',Eu=()=>'\n<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="30px" height="30px" class="bi bi-plus" viewBox="0 0 16 16">\n <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>\n</svg>',Ou=e=>l.html`
|
|
4591
4591
|
|
|
4592
4592
|
<label part="label" for="control" data-test-id="label" class=${e=>{var t;return(0,x.x)("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}
|
|
4593
4593
|
>
|
|
@@ -4667,10 +4667,10 @@
|
|
|
4667
4667
|
</${e}-button>
|
|
4668
4668
|
`)}
|
|
4669
4669
|
</${e}-search-bar-combobox>
|
|
4670
|
-
`,
|
|
4671
|
-
${e=>
|
|
4672
|
-
`,
|
|
4673
|
-
${
|
|
4670
|
+
`,Tu=l.html`
|
|
4671
|
+
${e=>Ou(T(e))}
|
|
4672
|
+
`,ku=10,Du=3,Iu=1,Ru=(e,t)=>(new j.b).withExpression((new G.K).withField(e).withValue(t).withSerialiser(V.n.containsIgnoreCase).build()).build();class Au extends a.FoundationElement{constructor(){super(...arguments),this.searchTerm="",this.appearance="neutral",this.minlength=Du,this.position=zt.BELOW,this.placeholder="Start typing to search",this.clearButton=!0,this.selectedOptions=[],this.normalizeDelimiter=e=>e.trim().replace(/\t|\r\n|\n|\r|,/g," "),this.addOrReplaceSelectedText=(e,t,i)=>(null==t?void 0:t.length)>0?e.replace(t,i):e.concat(i)}clear(){this.selectedOptions=[],this.searchTerm="",this.combobox&&(this.combobox.currentValue="",this.combobox.value=""),this.$emit("selectionChange",[])}clearSearch(){this.clear()}get showClearAffordance(){var e,t,i;if(!this.clearButton)return!1;const o=(null!==(i=null!==(e=this.searchTerm)&&void 0!==e?e:null===(t=this.combobox)||void 0===t?void 0:t.value)&&void 0!==i?i:"").trim();return this.selectedOptions.length>0||o.length>0}get allSearchFieldsUsed(){var e;return!!(null===(e=this.options)||void 0===e?void 0:e.length)&&this.options.every(e=>this.selectedOptions.some(t=>t.field===e.field))}isOptionEnabled(e){return e.isEnabled?e.isEnabled(this.searchTerm,this.selectedOptions,this.minlength):this.searchTerm.length>=this.minlength&&!this.selectedOptions.some(t=>t.field===e.field)}selectedOptionsChanged(){this.applySearchInputLock()}optionsChanged(){this.applySearchInputLock()}applySearchInputLock(){this.combobox&&this.allSearchFieldsUsed&&(this.searchTerm="",this.combobox.value="",this.combobox.currentValue="",this.combobox.open=!1,this.filteredOptions=[])}inputdeleted(){this.selectedOptions.length>0&&this.unselectOption(this.selectedOptions[this.selectedOptions.length-1])}changeHandler(){const e=[];this.combobox.selectedOptions.forEach(t=>{var i,o,n;const s=t.value,a=this.searchTerm.trim();e.push({field:s,term:a,label:(null===(i=this.options.find(e=>e.field===s))||void 0===i?void 0:i.label(a))||t.text,createCriteria:null===(o=this.options.find(e=>e.field===s))||void 0===o?void 0:o.createCriteria,resourceType:null===(n=this.options.find(e=>e.field===s))||void 0===n?void 0:n.resourceType})}),this.selectedOptions=[...this.selectedOptions,...e],this.selectedOptions=this.selectedOptions.filter((e,t,i)=>t===i.findIndex(t=>e.field===t.field&&e.term===t.term)),this.combobox.value="",this.combobox.open=!1,this.$emit("selectionChange",this.selectedOptions),l.DOM.queueUpdate(()=>{setTimeout(()=>{this.selectedOptionsDiv.scrollTo(this.selectedOptionsDiv.scrollWidth,0)},ku)})}pasteHandler(e){var t;if(this.allSearchFieldsUsed)return void e.preventDefault();this.loading=!0;const i=e.clipboardData.getData("text/plain"),o=this.normalizeDelimiter(i),n=null===(t=window.getSelection())||void 0===t?void 0:t.toString(),s=this.addOrReplaceSelectedText(this.combobox.value,n,o);(null==s?void 0:s.length)>=this.minlength&&(this.combobox.value=s,this.searchTerm=s,this.options&&this.filterSelectedOptions(s),this.combobox.open=!0),this.loading=!1}hasSelectedOption(e,t){return this.selectedOptions.some(i=>i.term===e&&i.field===t)}unselectOption(e){this.selectedOptions=this.selectedOptions.filter(t=>t!==e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){return(0,C.sH)(this,void 0,void 0,function*(){this.allSearchFieldsUsed?this.applySearchInputLock():(this.loading=!0,this.searchTerm=this.combobox.value,this.combobox.value.length>=this.minlength&&this.filterSelectedOptions(this.combobox.value),this.loading=!1)})}filterSelectedOptions(e){this.filteredOptions=this.options.filter(t=>!this.selectedOptions.find(i=>i.field===t.field&&i.term.trim()===e.trim()))}}(0,C.Cg)([l.observable],Au.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Au.prototype,"options",void 0),(0,C.Cg)([l.observable],Au.prototype,"searchTerm",void 0),(0,C.Cg)([l.attr],Au.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Au.prototype,"minlength",void 0),(0,C.Cg)([l.attr],Au.prototype,"position",void 0),(0,C.Cg)([l.attr],Au.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],Au.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({attribute:"clear-button",mode:"boolean"})],Au.prototype,"clearButton",void 0),(0,C.Cg)([l.observable],Au.prototype,"loading",void 0),(0,C.Cg)([l.observable],Au.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Au.prototype,"filteredOptions",void 0);const Lu=void 0,Nu={},Fu=Au.compose(Object.assign({baseName:"search-bar",template:Tu,styles:$u,shadowOptions:Lu},Nu)),Mu=(e,t)=>l.css`
|
|
4673
|
+
${wi(e,t)}
|
|
4674
4674
|
.control {
|
|
4675
4675
|
width: auto;
|
|
4676
4676
|
padding-left: calc(${r.designUnit} * 1px);
|
|
@@ -4706,7 +4706,7 @@
|
|
|
4706
4706
|
:host(.input-locked) .selected-value {
|
|
4707
4707
|
display: none;
|
|
4708
4708
|
}
|
|
4709
|
-
`,
|
|
4709
|
+
`,_u=(e,t)=>l.html`
|
|
4710
4710
|
<template
|
|
4711
4711
|
aria-disabled="${e=>e.ariaDisabled}"
|
|
4712
4712
|
autocomplete="${e=>e.autocomplete}"
|
|
@@ -4758,7 +4758,7 @@
|
|
|
4758
4758
|
></slot>
|
|
4759
4759
|
</div>
|
|
4760
4760
|
</template>
|
|
4761
|
-
`,
|
|
4761
|
+
`,Hu=new Set(["Backspace","Delete","Tab","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]);class Pu extends r.Combobox{constructor(){super(...arguments),this.minlength=Iu,this.previousLength=-1,this.changeListener=e=>{this.previousLength=0}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",this.changeListener)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",this.changeListener)}clickHandler(e){if(!this.disabled){if(this.open){const t=e.target.closest("option,[role=option]");if(!t||t.disabled)return;this.selectedOptions=[t],this.control.value=t.text,this.value=this.control.value,this.$emit("change")}this.control.focus()}}keyupHandler(e){switch(e.key){case"Backspace":case"Delete":this.previousLength<0?this.$emit("inputdeleted"):this.previousLength=this.previousLength-1;break;case"Enter":if(this.open&&-1!==this.selectedIndex){const e=this.slottedOptions[0];this.selectedOptions=[e],this.control.value=e.text,this.value=this.control.value,this.$emit("change")}}super.keyupHandler(e)}keydownHandler(e){const t=e.key;if(this.inputLocked){const i=e.ctrlKey||e.metaKey||e.altKey;if(!(Hu.has(t)||i))return e.preventDefault(),!1}switch(t){case"ArrowUp":case"ArrowDown":return this.control.value.length<this.minlength?void 0:super.keydownHandler(e);case"Enter":return-1!==this.selectedIndex&&super.keydownHandler(e);case"Tab":if(!this.open)return!0;e.shiftKey?this.selectPreviousOption():this.selectNextOption();break;default:return super.keydownHandler(e)}}inputHandler(e){if(this.inputLocked)return this.control.value="",this.value="",this.open=!1,void e.stopImmediatePropagation();this.control.value.length>=this.minlength?this.open=!0:(e.stopImmediatePropagation(),this.open=!1),this.value=this.control.value,this.previousLength=this.control.value.length}openChanged(){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),void this.focusAndScrollOptionIntoView();this.ariaControls="",this.ariaExpanded="false"}}(0,C.Cg)([l.attr],Pu.prototype,"minlength",void 0),(0,C.Cg)([l.observable],Pu.prototype,"inputLocked",void 0);const zu={delegatesFocus:!0,mode:"open"},Uu={},Bu=Pu.compose(Object.assign({baseName:"search-bar-combobox",template:_u,styles:Mu,shadowOptions:zu},Uu)),Vu=l.css`
|
|
4762
4762
|
:host {
|
|
4763
4763
|
display: block;
|
|
4764
4764
|
width: 100%;
|
|
@@ -4951,7 +4951,7 @@
|
|
|
4951
4951
|
.section-link.state-none {
|
|
4952
4952
|
color: var(--neutral-foreground-rest);
|
|
4953
4953
|
}
|
|
4954
|
-
`,
|
|
4954
|
+
`,Gu=l.html`
|
|
4955
4955
|
${e=>{return t=T(e),l.html`
|
|
4956
4956
|
<template>
|
|
4957
4957
|
<div
|
|
@@ -4996,7 +4996,7 @@
|
|
|
4996
4996
|
</div>
|
|
4997
4997
|
</template>
|
|
4998
4998
|
`;var t}}
|
|
4999
|
-
`,Gu=(0,it.createLogger)("SectionNavigator"),ju="section-navigator",Yu={setState:`${ju}-set-state`,setStates:`${ju}-set-states`,clearState:`${ju}-clear-state`,clearAllStates:`${ju}-clear-all-states`},Wu={active:"Active",inactive:"Inactive",pending:"Pending",disabled:"Disabled",error:"Error",completed:"Completed"},qu={active:{name:"circle-dot",variant:"solid"},inactive:{name:"times-circle",variant:"regular"},pending:{name:"clock",variant:"solid"},disabled:{name:"ban",variant:"solid"},error:{name:"times",variant:"solid"},completed:{name:"check",variant:"solid"}};class Ku extends a.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=Wu,this.stateIcons=qu,this.disableAutoScrollDetection=!1,this.userClickedSection=!1,this.isUserScrolling=!1,this.sectionItems=[],this.activeSection=""}sectionsChanged(){this.setSectionItems(),this.setActiveSection(),this.updateScrollDetection()}disableAutoScrollDetectionChanged(){this.updateScrollDetection()}scrollBehaviorChanged(){this.updateSpacer()}connectedCallback(){super.connectedCallback(),this.setSectionItems(),this.setActiveSection(),this.updateSpacer(),this.setupStateEventListeners(),this.updateScrollDetection()}setSectionItems(){if(!Array.isArray(this.sections))return Gu.warn("Sections must be an array"),void(this.sectionItems=[]);this.sectionItems=this.sections}setActiveSection(){this.sectionItems.length>0&&!this.activeSection&&(this.activeSection=this.sectionItems[0].name)}handleSectionClick(e){this.activeSection=e,this.userClickedSection=!0,this.scrollToSection(e)}updateSpacer(){var e;if(this.sectionContent){if(null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0,"top"===this.scrollBehavior)try{const e=this.sectionContent.clientHeight,t=this.sectionContent.querySelector(".content-section:last-child");if(t){const i=t.offsetHeight,o=20,n=Math.max(0,e-i-o);this.spacerElement=document.createElement("div"),this.spacerElement.className="scroll-spacer",this.spacerElement.style.height=`${n}px`,this.spacerElement.style.pointerEvents="none",this.sectionContent.appendChild(this.spacerElement)}}catch(e){Gu.error("Error updating spacer:",e)}}else Gu.warn("Section content element not found")}scrollToSection(e){if(this.sectionContent)try{const t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t)return void Gu.warn(`Section "${e}" not found`);const i=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:i,behavior:"smooth"}),this.setupScrollEndDetection()}catch(e){Gu.error("Error scrolling to section:",e)}else Gu.warn("Section content not available")}updateScrollDetection(){this.cleanupScrollDetection(),!this.disableAutoScrollDetection&&this.sectionContent&&this.setupScrollDetection()}setupScrollDetection(){if(this.sectionContent)try{this.scrollCheckHandler=()=>{this.isUserScrolling&&!this.userClickedSection&&(this.scrollDebounceTimeout&&clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=window.setTimeout(()=>{this.updateActiveSectionBasedOnScrollPosition()},Ku.SCROLL_DEBOUNCE_TIMEOUT))},this.sectionContent.addEventListener("scroll",this.scrollCheckHandler,{passive:!0});const e=()=>{this.isUserScrolling=!0},t=()=>{this.isUserScrolling=!1,this.userClickedSection=!1};let i;this.sectionContent.addEventListener("wheel",e,{passive:!0}),this.sectionContent.addEventListener("touchstart",e,{passive:!0}),this.sectionContent.addEventListener("mousedown",e,{passive:!0}),this.sectionContent.addEventListener("scrollend",t,{passive:!0}),this.sectionContent.addEventListener("scroll",()=>{clearTimeout(i),i=window.setTimeout(t,Ku.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){Gu.error("Error setting up scroll detection:",e)}else Gu.warn("Section content not available for scroll detection")}updateActiveSectionBasedOnScrollPosition(){if(!this.sectionContent)return;const e=this.sectionContent.scrollTop+this.sectionContent.clientHeight/2;let t=null,i=1/0;this.sectionItems.forEach(o=>{const n=this.sectionContent.querySelector(`[data-section="${o.name}"]`);if(n){const s=n.offsetTop+n.clientHeight/2,a=Math.abs(s-e);a<i&&(i=a,t=o.name)}}),t&&t!==this.activeSection&&(this.activeSection=t)}setupScrollEndDetection(){this.sectionContent&&(this.cleanupScrollEndDetection(),this.scrollEndHandler=()=>{this.userClickedSection=!1,this.cleanupScrollEndDetection()},this.sectionContent.addEventListener("scroll",this.scrollEndHandler,{passive:!0}))}cleanupScrollEndDetection(){this.scrollEndHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollEndHandler),this.scrollEndHandler=void 0)}cleanupScrollDetection(){this.scrollCheckHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollCheckHandler),this.scrollCheckHandler=void 0),this.scrollDebounceTimeout&&(clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=void 0),this.cleanupScrollEndDetection()}setupStateEventListeners(){this.sectionContent?(this.handleSetStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.addState(t,i)}catch(e){Gu.error("Error handling set-state event:",e)}},this.handleSetStatesRef=e=>{try{const{sectionName:t,stateNames:i}=e.detail;this.addStates(t,i)}catch(e){Gu.error("Error handling set-states event:",e)}},this.handleClearStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.clearState(t,i)}catch(e){Gu.error("Error handling clear-state event:",e)}},this.handleClearAllStatesRef=e=>{try{const{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){Gu.error("Error handling clear-all-states event:",e)}},this.handleGenericStateEventRef=e=>{try{const t=e.type,i=e.detail;if(null==i?void 0:i.sectionName)return;const o=e.target.closest("[data-section]");let n=null==o?void 0:o.getAttribute("data-section");if(!n){const t=e.target.closest("[slot]");n=(null==t?void 0:t.getAttribute("slot"))||this.activeSection}n||(n=this.activeSection),e.stopPropagation(),e.preventDefault();const s=Object.assign(Object.assign({},i),{sectionName:n}),a=new CustomEvent(t,{detail:s,bubbles:!0,cancelable:!0});this.dispatchEvent(a)}catch(e){Gu.error("Error handling generic state event:",e)}},this.addEventListener(Yu.setState,this.handleSetStateRef),this.addEventListener(Yu.setStates,this.handleSetStatesRef),this.addEventListener(Yu.clearState,this.handleClearStateRef),this.addEventListener(Yu.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(Yu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Yu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Yu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Yu.clearAllStates,this.handleGenericStateEventRef,!0)):Gu.warn("Section content not available for event listeners")}updateSectionStates(e,t){const i=this.sectionItems.findIndex(t=>t.name===e);if(-1!==i){const e=Object.assign(Object.assign({},this.sectionItems[i]),{states:t});this.sectionItems=[...this.sectionItems.slice(0,i),e,...this.sectionItems.slice(i+1)]}}addState(e,t){if(!e||!t)return void Gu.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Gu.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[];if(!o.includes(t)){const i=[...o,t];this.updateSectionStates(e,i)}}addStates(e,t){if(!e||!Array.isArray(t))return void Gu.warn("Section name and state names array are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Gu.warn(`Section "${e}" not found`);const o=[...this.sectionItems[i].states||[]];t.forEach(e=>{o.includes(e)||o.push(e)}),this.updateSectionStates(e,o)}clearState(e,t){if(!e||!t)return void Gu.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Gu.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[],n=o.indexOf(t);if(n>-1){const t=o.filter((e,t)=>t!==n);this.updateSectionStates(e,t)}}clearAllStates(e){if(!e)return void Gu.warn("Section name is required");-1!==this.sectionItems.findIndex(t=>t.name===e)?this.updateSectionStates(e,[]):Gu.warn(`Section "${e}" not found`)}clearAllStatesInAllSections(){this.sectionItems=this.sectionItems.map(e=>Object.assign(Object.assign({},e),{states:[]}))}getStateTooltip(e){return e?this.stateTooltips[e]||"":(Gu.warn("State name is required"),"")}getSectionStateClass(e){if(!e)return Gu.warn("Section is required"),"state-none";const t=e.states||[];if(0===t.length)return"state-none";if(t.length>1)return"state-multiple";return`state-${t[0]}`}getStateIcon(e){return e?this.stateIcons[e]||qu[e]:(Gu.warn("State name is required"),qu.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(Yu.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(Yu.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(Yu.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(Yu.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(Yu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Yu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Yu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Yu.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0}}Ku.SCROLL_END_TIMEOUT=150,Ku.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],Ku.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],Ku.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],Ku.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],Ku.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],Ku.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],Ku.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],Ku.prototype,"activeSection",void 0);const Xu={mode:"open"},Ju={},Qu=Ku.compose(Object.assign({baseName:"foundation-section-navigator",template:Vu,styles:Bu,shadowOptions:Xu},Ju)),Zu=(e,t)=>l.css`
|
|
4999
|
+
`,ju=(0,it.createLogger)("SectionNavigator"),Yu="section-navigator",Wu={setState:`${Yu}-set-state`,setStates:`${Yu}-set-states`,clearState:`${Yu}-clear-state`,clearAllStates:`${Yu}-clear-all-states`},qu={active:"Active",inactive:"Inactive",pending:"Pending",disabled:"Disabled",error:"Error",completed:"Completed"},Ku={active:{name:"circle-dot",variant:"solid"},inactive:{name:"times-circle",variant:"regular"},pending:{name:"clock",variant:"solid"},disabled:{name:"ban",variant:"solid"},error:{name:"times",variant:"solid"},completed:{name:"check",variant:"solid"}};class Xu extends a.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=qu,this.stateIcons=Ku,this.disableAutoScrollDetection=!1,this.userClickedSection=!1,this.isUserScrolling=!1,this.sectionItems=[],this.activeSection=""}sectionsChanged(){this.setSectionItems(),this.setActiveSection(),this.updateScrollDetection()}disableAutoScrollDetectionChanged(){this.updateScrollDetection()}scrollBehaviorChanged(){this.updateSpacer()}connectedCallback(){super.connectedCallback(),this.setSectionItems(),this.setActiveSection(),this.updateSpacer(),this.setupStateEventListeners(),this.updateScrollDetection()}setSectionItems(){if(!Array.isArray(this.sections))return ju.warn("Sections must be an array"),void(this.sectionItems=[]);this.sectionItems=this.sections}setActiveSection(){this.sectionItems.length>0&&!this.activeSection&&(this.activeSection=this.sectionItems[0].name)}handleSectionClick(e){this.activeSection=e,this.userClickedSection=!0,this.scrollToSection(e)}updateSpacer(){var e;if(this.sectionContent){if(null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0,"top"===this.scrollBehavior)try{const e=this.sectionContent.clientHeight,t=this.sectionContent.querySelector(".content-section:last-child");if(t){const i=t.offsetHeight,o=20,n=Math.max(0,e-i-o);this.spacerElement=document.createElement("div"),this.spacerElement.className="scroll-spacer",this.spacerElement.style.height=`${n}px`,this.spacerElement.style.pointerEvents="none",this.sectionContent.appendChild(this.spacerElement)}}catch(e){ju.error("Error updating spacer:",e)}}else ju.warn("Section content element not found")}scrollToSection(e){if(this.sectionContent)try{const t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t)return void ju.warn(`Section "${e}" not found`);const i=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:i,behavior:"smooth"}),this.setupScrollEndDetection()}catch(e){ju.error("Error scrolling to section:",e)}else ju.warn("Section content not available")}updateScrollDetection(){this.cleanupScrollDetection(),!this.disableAutoScrollDetection&&this.sectionContent&&this.setupScrollDetection()}setupScrollDetection(){if(this.sectionContent)try{this.scrollCheckHandler=()=>{this.isUserScrolling&&!this.userClickedSection&&(this.scrollDebounceTimeout&&clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=window.setTimeout(()=>{this.updateActiveSectionBasedOnScrollPosition()},Xu.SCROLL_DEBOUNCE_TIMEOUT))},this.sectionContent.addEventListener("scroll",this.scrollCheckHandler,{passive:!0});const e=()=>{this.isUserScrolling=!0},t=()=>{this.isUserScrolling=!1,this.userClickedSection=!1};let i;this.sectionContent.addEventListener("wheel",e,{passive:!0}),this.sectionContent.addEventListener("touchstart",e,{passive:!0}),this.sectionContent.addEventListener("mousedown",e,{passive:!0}),this.sectionContent.addEventListener("scrollend",t,{passive:!0}),this.sectionContent.addEventListener("scroll",()=>{clearTimeout(i),i=window.setTimeout(t,Xu.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){ju.error("Error setting up scroll detection:",e)}else ju.warn("Section content not available for scroll detection")}updateActiveSectionBasedOnScrollPosition(){if(!this.sectionContent)return;const e=this.sectionContent.scrollTop+this.sectionContent.clientHeight/2;let t=null,i=1/0;this.sectionItems.forEach(o=>{const n=this.sectionContent.querySelector(`[data-section="${o.name}"]`);if(n){const s=n.offsetTop+n.clientHeight/2,a=Math.abs(s-e);a<i&&(i=a,t=o.name)}}),t&&t!==this.activeSection&&(this.activeSection=t)}setupScrollEndDetection(){this.sectionContent&&(this.cleanupScrollEndDetection(),this.scrollEndHandler=()=>{this.userClickedSection=!1,this.cleanupScrollEndDetection()},this.sectionContent.addEventListener("scroll",this.scrollEndHandler,{passive:!0}))}cleanupScrollEndDetection(){this.scrollEndHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollEndHandler),this.scrollEndHandler=void 0)}cleanupScrollDetection(){this.scrollCheckHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollCheckHandler),this.scrollCheckHandler=void 0),this.scrollDebounceTimeout&&(clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=void 0),this.cleanupScrollEndDetection()}setupStateEventListeners(){this.sectionContent?(this.handleSetStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.addState(t,i)}catch(e){ju.error("Error handling set-state event:",e)}},this.handleSetStatesRef=e=>{try{const{sectionName:t,stateNames:i}=e.detail;this.addStates(t,i)}catch(e){ju.error("Error handling set-states event:",e)}},this.handleClearStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.clearState(t,i)}catch(e){ju.error("Error handling clear-state event:",e)}},this.handleClearAllStatesRef=e=>{try{const{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){ju.error("Error handling clear-all-states event:",e)}},this.handleGenericStateEventRef=e=>{try{const t=e.type,i=e.detail;if(null==i?void 0:i.sectionName)return;const o=e.target.closest("[data-section]");let n=null==o?void 0:o.getAttribute("data-section");if(!n){const t=e.target.closest("[slot]");n=(null==t?void 0:t.getAttribute("slot"))||this.activeSection}n||(n=this.activeSection),e.stopPropagation(),e.preventDefault();const s=Object.assign(Object.assign({},i),{sectionName:n}),a=new CustomEvent(t,{detail:s,bubbles:!0,cancelable:!0});this.dispatchEvent(a)}catch(e){ju.error("Error handling generic state event:",e)}},this.addEventListener(Wu.setState,this.handleSetStateRef),this.addEventListener(Wu.setStates,this.handleSetStatesRef),this.addEventListener(Wu.clearState,this.handleClearStateRef),this.addEventListener(Wu.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(Wu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Wu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Wu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(Wu.clearAllStates,this.handleGenericStateEventRef,!0)):ju.warn("Section content not available for event listeners")}updateSectionStates(e,t){const i=this.sectionItems.findIndex(t=>t.name===e);if(-1!==i){const e=Object.assign(Object.assign({},this.sectionItems[i]),{states:t});this.sectionItems=[...this.sectionItems.slice(0,i),e,...this.sectionItems.slice(i+1)]}}addState(e,t){if(!e||!t)return void ju.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void ju.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[];if(!o.includes(t)){const i=[...o,t];this.updateSectionStates(e,i)}}addStates(e,t){if(!e||!Array.isArray(t))return void ju.warn("Section name and state names array are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void ju.warn(`Section "${e}" not found`);const o=[...this.sectionItems[i].states||[]];t.forEach(e=>{o.includes(e)||o.push(e)}),this.updateSectionStates(e,o)}clearState(e,t){if(!e||!t)return void ju.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void ju.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[],n=o.indexOf(t);if(n>-1){const t=o.filter((e,t)=>t!==n);this.updateSectionStates(e,t)}}clearAllStates(e){if(!e)return void ju.warn("Section name is required");-1!==this.sectionItems.findIndex(t=>t.name===e)?this.updateSectionStates(e,[]):ju.warn(`Section "${e}" not found`)}clearAllStatesInAllSections(){this.sectionItems=this.sectionItems.map(e=>Object.assign(Object.assign({},e),{states:[]}))}getStateTooltip(e){return e?this.stateTooltips[e]||"":(ju.warn("State name is required"),"")}getSectionStateClass(e){if(!e)return ju.warn("Section is required"),"state-none";const t=e.states||[];if(0===t.length)return"state-none";if(t.length>1)return"state-multiple";return`state-${t[0]}`}getStateIcon(e){return e?this.stateIcons[e]||Ku[e]:(ju.warn("State name is required"),Ku.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(Wu.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(Wu.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(Wu.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(Wu.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(Wu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Wu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Wu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(Wu.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0}}Xu.SCROLL_END_TIMEOUT=150,Xu.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],Xu.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],Xu.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],Xu.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],Xu.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],Xu.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],Xu.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],Xu.prototype,"activeSection",void 0);const Ju={mode:"open"},Qu={},Zu=Xu.compose(Object.assign({baseName:"foundation-section-navigator",template:Gu,styles:Vu,shadowOptions:Ju},Qu)),eh=(e,t)=>l.css`
|
|
5000
5000
|
${(0,r.radioGroupStyles)(e,t)}
|
|
5001
5001
|
::slotted(foundation-segmented-item:first-of-type) {
|
|
5002
5002
|
border-radius: calc(var(--control-corner-radius) * 1px) 0 0
|
|
@@ -5009,7 +5009,7 @@
|
|
|
5009
5009
|
calc(var(--control-corner-radius) * 1px) 0;
|
|
5010
5010
|
border-left-width: 0;
|
|
5011
5011
|
}
|
|
5012
|
-
`,
|
|
5012
|
+
`,th=(e,t)=>(0,a.radioGroupTemplate)(e,t);class ih extends a.RadioGroup{valueChanged(){void 0===this.value&&this.slottedRadioButtons&&this.slottedRadioButtons.forEach(e=>{e.checked=!1}),super.valueChanged()}}const oh=void 0,nh={},sh=ih.compose(Object.assign({baseName:"segmented-control",template:th,styles:eh,shadowOptions:oh},nh)),ah=(e,t)=>l.css`
|
|
5013
5013
|
${(0,r.radioStyles)(e,t)}
|
|
5014
5014
|
:host {
|
|
5015
5015
|
padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);
|
|
@@ -5020,7 +5020,7 @@
|
|
|
5020
5020
|
:host([aria-checked='true']) {
|
|
5021
5021
|
background: var(--accent-foreground-rest);
|
|
5022
5022
|
}
|
|
5023
|
-
`,
|
|
5023
|
+
`,rh=(e,t)=>l.html`
|
|
5024
5024
|
<template
|
|
5025
5025
|
role="radio"
|
|
5026
5026
|
aria-checked="${e=>e.checked}"
|
|
@@ -5034,7 +5034,7 @@
|
|
|
5034
5034
|
<slot></slot>
|
|
5035
5035
|
</span>
|
|
5036
5036
|
</template>
|
|
5037
|
-
`;class
|
|
5037
|
+
`;class lh extends r.Radio{}const dh=void 0,ch={},uh=lh.compose(Object.assign({baseName:"segmented-item",template:rh,styles:ah,shadowOptions:dh},ch)),hh=(e,t)=>l.css`
|
|
5038
5038
|
${(0,r.selectStyles)(e,t)}
|
|
5039
5039
|
|
|
5040
5040
|
:host(:not([size]):not([multiple]):not([open]):focus-visible), :host([multiple]:focus-visible), :host([size]:focus-visible),
|
|
@@ -5042,19 +5042,19 @@
|
|
|
5042
5042
|
box-shadow: none;
|
|
5043
5043
|
outline: none;
|
|
5044
5044
|
}
|
|
5045
|
-
`,
|
|
5045
|
+
`,ph=(e,t)=>(0,a.selectTemplate)(e,t);class mh extends r.Select{get scrollableListbox(){var e,t;return null!==(e=this.listbox)&&void 0!==e?e:null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".listbox")}slottedOptionsChanged(e,t){const i=this.value;super.slottedOptionsChanged(e,t),this.selectedIndex=-1;const o=[];this.slottedOptions&&this.slottedOptions.forEach(e=>{const t=e.nodeName.toLowerCase();if(t.endsWith("-optgroup")){const t=Array.from(e.children).filter(e=>{const t=e.nodeName.toLowerCase();return"option"===e.getAttribute("role")||t.endsWith("-option")});o.push(...t)}else("option"===e.getAttribute("role")||t.endsWith("-option"))&&o.push(e)}),this.options=o,i&&(this.value=i),-1===this.selectedIndex&&this.options.length>0&&(this.selectedIndex=0)}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(function(e){const t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement:document.activeElement}(this))&&null!==e&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:"nearest"})}))}openChanged(e,t){if(this.collapsible){if(this.$emit("open-change",{open:this.open}),this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,void l.DOM.queueUpdate(()=>this.focus());this.ariaControls="",this.ariaExpanded="false"}}keydownHandler(e){switch(e.key){case"ArrowDown":case"ArrowUp":if(this.open){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView({block:"center",behavior:"auto"})}else this.open=!0}return super.keydownHandler(e)}}const gh=void 0,vh={indicator:'\n <svg\n class="select-indicator"\n part="select-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '},fh=mh.compose(Object.assign({baseName:"select",template:ph,styles:hh,shadowOptions:gh},vh)),bh=(e,t)=>l.css`
|
|
5046
5046
|
${(0,r.skeletonStyles)(e,t)}
|
|
5047
|
-
`,
|
|
5047
|
+
`,yh=(e,t)=>(0,a.skeletonTemplate)(e,t);class wh extends r.Skeleton{}const Ch=void 0,xh={},$h=wh.compose(Object.assign({baseName:"skeleton",template:yh,styles:bh,shadowOptions:Ch},xh)),Sh=(e,t)=>l.css`
|
|
5048
5048
|
${(0,r.sliderStyles)(e,t)}
|
|
5049
5049
|
.track-progress {
|
|
5050
5050
|
background-color: var(--accent-fill-rest);
|
|
5051
5051
|
border-radius: calc(var(--control-corner-radius) * 1px);
|
|
5052
5052
|
}
|
|
5053
|
-
`;var
|
|
5053
|
+
`;var Eh=i(17733),Oh=i(54120);const Th=(e,t)=>l.html`
|
|
5054
5054
|
<template
|
|
5055
5055
|
role="slider"
|
|
5056
5056
|
class="${e=>e.readOnly?"readonly":""}
|
|
5057
|
-
${e=>e.orientation||
|
|
5057
|
+
${e=>e.orientation||Eh.t.horizontal}"
|
|
5058
5058
|
tabindex="${e=>e.disabled?null:0}"
|
|
5059
5059
|
aria-valuetext="${e=>e.valueTextFormatter(e.value)}"
|
|
5060
5060
|
aria-valuenow="${e=>e.value}"
|
|
@@ -5069,7 +5069,7 @@
|
|
|
5069
5069
|
<div ${(0,l.ref)("track")} part="track-container" class="track">
|
|
5070
5070
|
<div
|
|
5071
5071
|
class="track-progress"
|
|
5072
|
-
style="${e=>{const t=1-(0,
|
|
5072
|
+
style="${e=>{const t=1-(0,Oh.AB)(0,1,(parseInt(e.value)-e.min)/(e.max-e.min)),i=Math.round(100*(1-t));return"horizontal"===e.orientation?e.isDragging?`height: calc(var(--track-width) * 1px); width: ${i}%;`:`height: calc(var(--track-width) * 1px); width: ${i}%; transition: all 0.2s ease;`:e.isDragging?`width: calc(var(--track-width) * 1px); height: ${i}%;`:`width: calc(var(--track-width) * 1px); height: ${i}%; transition: all 0.2s ease;`}}"
|
|
5073
5073
|
></div>
|
|
5074
5074
|
</div>
|
|
5075
5075
|
<slot></slot>
|
|
@@ -5083,9 +5083,9 @@
|
|
|
5083
5083
|
</div>
|
|
5084
5084
|
</div>
|
|
5085
5085
|
</template>
|
|
5086
|
-
`;class
|
|
5086
|
+
`;class kh extends r.Slider{}const Dh=void 0,Ih={thumb:'\n <div class="thumb-cursor"></div>\n '},Rh=kh.compose(Object.assign({baseName:"slider",template:Th,styles:Sh,shadowOptions:Dh},Ih)),Ah=(e,t)=>l.css`
|
|
5087
5087
|
${(0,r.sliderLabelStyles)(e,t)}
|
|
5088
|
-
`,
|
|
5088
|
+
`,Lh=(e,t)=>(0,a.sliderLabelTemplate)(e,t);class Nh extends r.SliderLabel{}const Fh=void 0,Mh={},_h=Nh.compose(Object.assign({baseName:"slider-label",template:Lh,styles:Ah,shadowOptions:Fh},Mh)),Hh="default",Ph={DEFAULT:Hh,ERROR:"error",SUCCESS:"success"},zh=1e4,Uh={DISMISS:"dismiss",AUTO_DISMISS:"autoDismiss"},Bh=l.css`
|
|
5089
5089
|
@keyframes append-from-left-animate {
|
|
5090
5090
|
from {
|
|
5091
5091
|
transform: translateX(100%);
|
|
@@ -5206,7 +5206,7 @@
|
|
|
5206
5206
|
flex: 1;
|
|
5207
5207
|
overflow: hidden;
|
|
5208
5208
|
}
|
|
5209
|
-
`,
|
|
5209
|
+
`,Vh=e=>l.html`
|
|
5210
5210
|
<div
|
|
5211
5211
|
role="alert"
|
|
5212
5212
|
aria-live="polite"
|
|
@@ -5235,10 +5235,10 @@
|
|
|
5235
5235
|
</div>
|
|
5236
5236
|
`)}
|
|
5237
5237
|
</div>
|
|
5238
|
-
`,
|
|
5239
|
-
${e=>
|
|
5240
|
-
`,
|
|
5241
|
-
${
|
|
5238
|
+
`,Gh=l.html`
|
|
5239
|
+
${e=>Vh(T(e))}
|
|
5240
|
+
`,jh={mode:"open",delegatesFocus:!0};class Yh extends a.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=zh,this.autoClose=!0,this.type=Hh,this.dismissEventListener=this.handleDissmis.bind(this)}autoCloseChanged(){this.autoClose&&(this.timeoutRef=setTimeout(()=>{this.handleDissmis(!0)},this.closeTimeout)),!this.autoClose&&this.timeoutRef&&clearTimeout(this.timeoutRef)}connectedCallback(){super.connectedCallback(),this.addEventListener(Uh.DISMISS,this.dismissEventListener)}errorChanged(e,t){var i,o,n;this.type=null!==(n=null===(o=null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.type)&&void 0!==n?n:Hh}notificationChanged(e,t){var i,o,n,s,a,r,l,d,c;this.type=null!==(n=null===(o=null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.type)&&void 0!==n?n:Hh,this.autoClose=null===(r=null===(a=null===(s=null==t?void 0:t.config)||void 0===s?void 0:s.snackbar)||void 0===a?void 0:a.autoClose)||void 0===r||r,this.closeTimeout=null!==(c=null===(d=null===(l=null==t?void 0:t.config)||void 0===l?void 0:l.snackbar)||void 0===d?void 0:d.closeTimeout)&&void 0!==c?c:zh}handleDissmis(e=!1){this.deleteAnimation="snackbar-delete",this.snackbar.onanimationend=()=>{this.dismiss(),e&&this.dispatchEvent(new CustomEvent(Uh.AUTO_DISMISS,{bubbles:!0,composed:!0,detail:this.identifier}))}}dismiss(){this.remove(),this.timeoutRef&&clearTimeout(this.timeoutRef)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Uh.DISMISS,this.dismissEventListener),this.timeoutRef&&clearTimeout(this.timeoutRef)}}(0,C.Cg)([l.observable],Yh.prototype,"error",void 0),(0,C.Cg)([l.observable],Yh.prototype,"notification",void 0),(0,C.Cg)([l.observable],Yh.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"identifier"})],Yh.prototype,"identifier",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],Yh.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],Yh.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],Yh.prototype,"type",void 0);const Wh=Yh.compose({baseName:"snackbar",styles:Bh,template:Gh,shadowOptions:jh}),qh=(e,t)=>l.css`
|
|
5241
|
+
${Cr()}
|
|
5242
5242
|
|
|
5243
5243
|
.fa-stack {
|
|
5244
5244
|
display: inline-block;
|
|
@@ -5263,14 +5263,14 @@
|
|
|
5263
5263
|
.fa-stack-1x {
|
|
5264
5264
|
z-index: 1;
|
|
5265
5265
|
}
|
|
5266
|
-
`,
|
|
5266
|
+
`,Kh=l.html`
|
|
5267
5267
|
<span
|
|
5268
5268
|
class=${e=>`fa-stack fa-${e.size}`}
|
|
5269
5269
|
style=${e=>`vertical-align: ${e["vertical-align"]};`}
|
|
5270
5270
|
>
|
|
5271
5271
|
<slot></slot>
|
|
5272
5272
|
</span>
|
|
5273
|
-
`;class
|
|
5273
|
+
`;class Xh extends a.FoundationElement{constructor(){super(...arguments),this.size=kr,this["vertical-align"]="baseline"}}(0,C.Cg)([l.attr],Xh.prototype,"size",void 0),(0,C.Cg)([l.attr],Xh.prototype,"vertical-align",void 0);const Jh=Xh.compose({baseName:"stacking-icons",template:Kh,styles:qh}),Qh=l.css`
|
|
5274
5274
|
.status-pill {
|
|
5275
5275
|
font-size: var(--ag-data-font-size);
|
|
5276
5276
|
display: inline-flex;
|
|
@@ -5305,7 +5305,7 @@
|
|
|
5305
5305
|
.status-pill-image {
|
|
5306
5306
|
height: 14px;
|
|
5307
5307
|
}
|
|
5308
|
-
`,
|
|
5308
|
+
`,Zh=l.html`
|
|
5309
5309
|
${e=>{return t=T(e),l.html`
|
|
5310
5310
|
${(0,l.when)(e=>e.isCountdownVisible&&!(e.hideWhenCountdownCompleted&&e.isCountdownExpired),l.html`
|
|
5311
5311
|
<div
|
|
@@ -5336,7 +5336,7 @@
|
|
|
5336
5336
|
</div>
|
|
5337
5337
|
`)}
|
|
5338
5338
|
`;var t}}
|
|
5339
|
-
`,
|
|
5339
|
+
`,ep=(e,t="second")=>{let i=e/1e3;const o=Math.floor(i/86400);i%=86400;const n=Math.floor(i/3600);i%=3600;const s=Math.floor(i/60),a=Math.floor(i%60),r=[];switch(o&&r.push(`${o}d`),t){case"minute":n&&r.push(`${n}h`),s&&r.push(`${s}m`),!s&&a&&r.push("< 1m");break;case"hour":n&&r.push(`${n}h`),n||!s&&!a||r.push("< 1h");break;default:n&&r.push(`${n}h`),s&&r.push(`${s}m`),a&&r.push(`${a}s`)}return r.length?r.join(" "):"0s"};class tp extends a.FoundationElement{constructor(){super(...arguments),this.iconSize="sm",this.dateCountdownCompletedMessage="Expired",this.dateCountdownUnit="second",this.hideWhenCountdownCompleted=!1,this.isCountdownExpired=!1,this.isCountdownVisible=!0}dateCountdownChanged(e,t){if(e!==t){if(!t)return void this.clearCountdownTimer();this.isCountdownExpired=!1,this.setUpDateCountdown(t)}}dateCountdownVisibleAfterChanged(e,t){e!==t&&this.updateVisibilityFromStartTime()}connectedCallback(){this.updateVisibilityFromStartTime(),super.connectedCallback()}disconnectedCallback(){this.clearCountdownTimer(),super.disconnectedCallback()}setUpDateCountdown(e){if(this.clearCountdownTimer(),isNaN(parseInt(e)))ot.warn("invalid date-countdown value passed. Must be a number");else{e=parseInt(e);const t=new Date(e);this.updateCountdown(t),this.dateInterval=setInterval(()=>this.updateCountdown(t),1e3)}}updateCountdown(e){const t=(new Date).getTime(),i=Math.floor(e.getTime()-t),o=void 0!==this.dateCountdownVisibleAfter&&null!==this.dateCountdownVisibleAfter?Number(this.dateCountdownVisibleAfter):void 0;if(void 0!==o&&!isNaN(o)&&t<o)return this.isCountdownVisible=!1,this.countdown=null,void(this.isCountdownExpired=!1);this.isCountdownVisible=!0,i<=0?this.hideWhenCountdownCompleted?(this.isCountdownExpired=!0,this.clearCountdownTimer()):(this.countdown=this.dateCountdownCompletedMessage,clearInterval(this.dateInterval)):this.countdown=ep(i,this.dateCountdownUnit)}updateVisibilityFromStartTime(){const e=void 0!==this.dateCountdownVisibleAfter&&null!==this.dateCountdownVisibleAfter?Number(this.dateCountdownVisibleAfter):void 0;if(void 0===e||isNaN(e))this.isCountdownVisible=!0;else{const t=Date.now();this.isCountdownVisible=t>=e}}clearCountdownTimer(){this.dateInterval&&(clearInterval(this.dateInterval),this.dateInterval=null),this.countdown=null}}(0,C.Cg)([(0,l.attr)({attribute:"background-color"})],tp.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-name"})],tp.prototype,"iconName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-src"})],tp.prototype,"iconSrc",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial"})],tp.prototype,"iconInitial",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial-background-color"})],tp.prototype,"iconInitialBackgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],tp.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],tp.prototype,"textColor",void 0),(0,C.Cg)([l.attr],tp.prototype,"text",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown"})],tp.prototype,"dateCountdown",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-completed-message"})],tp.prototype,"dateCountdownCompletedMessage",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-unit"})],tp.prototype,"dateCountdownUnit",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-visible-after"})],tp.prototype,"dateCountdownVisibleAfter",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"hide-when-countdown-completed"})],tp.prototype,"hideWhenCountdownCompleted",void 0),(0,C.Cg)([l.observable],tp.prototype,"countdown",void 0),(0,C.Cg)([l.observable],tp.prototype,"isCountdownExpired",void 0),(0,C.Cg)([l.observable],tp.prototype,"isCountdownVisible",void 0);const ip=tp.compose({baseName:"status-pill",styles:Qh,template:Zh}),op=(e,t)=>l.css`
|
|
5340
5340
|
.tree-item {
|
|
5341
5341
|
cursor: default;
|
|
5342
5342
|
}
|
|
@@ -5446,12 +5446,12 @@
|
|
|
5446
5446
|
width: calc(100% - 28px);
|
|
5447
5447
|
background-color: var(--accent-fill-rest); /* Choose a color */
|
|
5448
5448
|
}
|
|
5449
|
-
`,
|
|
5450
|
-
${(0,
|
|
5449
|
+
`,np=(e,t)=>{const i=["step",`step-${t}`];return e.selected&&i.push("step-selected"),e.completed&&i.push("step-completed"),e.error&&i.push("step-error"),i.join(" ")},sp=["positioning-region: step-positioning-region","content-region: step-content-region","expand-collapse-button: step-expand-collapse-button","items: step-items"].join(", "),ap=e=>l.html`
|
|
5450
|
+
${(0,On.q)(e=>e.orientation===a.TabsOrientation.vertical,l.html`
|
|
5451
5451
|
<${e}-tree-item ${(0,l.ref)("treeItem")}
|
|
5452
5452
|
class=${e=>(0,x.x)("tree-item",["cursor-pointer",e.showCursorPointer])}
|
|
5453
|
-
part="${e=>
|
|
5454
|
-
exportparts="${
|
|
5453
|
+
part="${e=>np(e,"vertical")}"
|
|
5454
|
+
exportparts="${sp}"
|
|
5455
5455
|
@click="${(e,t)=>e.$emit("tab-clicked",e.tabPosition-1)}">
|
|
5456
5456
|
${(0,l.when)(e=>e.completed,l.html`
|
|
5457
5457
|
<${e}-icon
|
|
@@ -5476,7 +5476,7 @@
|
|
|
5476
5476
|
`,l.html`
|
|
5477
5477
|
<div
|
|
5478
5478
|
class=${e=>(0,x.x)("step-container",["selected",e.selected])}
|
|
5479
|
-
part="${e=>
|
|
5479
|
+
part="${e=>np(e,"horizontal")}"
|
|
5480
5480
|
>
|
|
5481
5481
|
<div
|
|
5482
5482
|
class=${e=>(0,x.x)("step-number-container",["cursor-pointer",e.showCursorPointer])}
|
|
@@ -5499,13 +5499,13 @@
|
|
|
5499
5499
|
`)}
|
|
5500
5500
|
</div>
|
|
5501
5501
|
`)}
|
|
5502
|
-
`,
|
|
5503
|
-
${e=>
|
|
5504
|
-
`;class
|
|
5502
|
+
`,rp=l.html`
|
|
5503
|
+
${e=>ap(T(e))}
|
|
5504
|
+
`;class lp extends a.FoundationElement{constructor(){super(...arguments),this.slot="tab",this.orientation=a.TabsOrientation.vertical}isCompleted(){return this.completed}selectedChanged(){this.treeItem&&(this.treeItem.selected=this.selected)}disconnectedCallback(){super.disconnectedCallback(),this.completed=void 0,this.error=void 0,this.selected=void 0}}(0,C.Cg)([l.attr],lp.prototype,"slot",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],lp.prototype,"selected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],lp.prototype,"completed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],lp.prototype,"error",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],lp.prototype,"isLast",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],lp.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],lp.prototype,"showCursorPointer",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tab-position"})],lp.prototype,"tabPosition",void 0),(0,C.Cg)([l.attr],lp.prototype,"orientation",void 0);const dp=void 0,cp={},up=lp.compose(Object.assign({baseName:"stepper-tab",template:rp,styles:op,shadowOptions:dp},cp)),hp=()=>l.html`
|
|
5505
5505
|
<template slot="tab-panel" role="stepper-tab-panel">
|
|
5506
5506
|
<slot></slot>
|
|
5507
5507
|
</template>
|
|
5508
|
-
`;class
|
|
5508
|
+
`;class pp extends a.FoundationElement{}const mp=void 0,gp={},vp=pp.compose(Object.assign({baseName:"stepper-tab-panel",template:hp,shadowOptions:mp},gp)),fp=(e,t)=>l.css`
|
|
5509
5509
|
${(0,r.switchStyles)(e,t)}
|
|
5510
5510
|
.checked-indicator {
|
|
5511
5511
|
transform: scale(1.3);
|
|
@@ -5518,20 +5518,20 @@
|
|
|
5518
5518
|
.checked-indicator {
|
|
5519
5519
|
border-radius: calc(var(--control-corner-radius) * 2px);
|
|
5520
5520
|
}
|
|
5521
|
-
`,
|
|
5521
|
+
`,bp=(e,t)=>(0,a.switchTemplate)(e,t);class yp extends r.Switch{}const wp=void 0,Cp={switch:'<div class="checked-indicator" part="checked-indicator"></div>'},xp=yp.compose(Object.assign({baseName:"switch",template:bp,styles:fp,shadowOptions:wp},Cp)),$p="--alert-flash-t",Sp="--alert-flash-duration",Ep="alert-flash-clock";let Op=!1;function Tp(){var e;if(!Op&&"undefined"!=typeof document){Op=!0;try{CSS.registerProperty({name:$p,syntax:"<number>",inherits:!0,initialValue:"0"});const t=new CSSStyleSheet;t.replaceSync(`\n @keyframes ${Ep} {\n 0%, 100% { ${$p}: 0; }\n 50% { ${$p}: 1; }\n }\n\n :root {\n animation: ${Ep} var(${Sp}, 1s) ease-in-out\n infinite;\n }\n\n @media (prefers-reduced-motion: reduce) {\n :root {\n animation: none;\n }\n }\n `),document.adoptedStyleSheets=[...null!==(e=document.adoptedStyleSheets)&&void 0!==e?e:[],t]}catch(e){}}}const kp=(e,t)=>l.css`
|
|
5522
5522
|
${(0,r.tabStyles)(e,t)}
|
|
5523
5523
|
|
|
5524
5524
|
:host {
|
|
5525
5525
|
user-select: none;
|
|
5526
5526
|
}
|
|
5527
|
-
`,
|
|
5527
|
+
`,Dp=(e,t)=>(0,a.tabTemplate)(e,t);class Ip extends r.Tab{constructor(){super(...arguments),this.alert=!1}alertChanged(){this.alert&&Tp()}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ip.prototype,"alert",void 0);const Rp=void 0,Ap={},Lp=Ip.compose(Object.assign({baseName:"tab",template:Dp,styles:kp,shadowOptions:Rp},Ap)),Np=(e,t)=>l.css`
|
|
5528
5528
|
${(0,r.tabPanelStyles)(e,t)}
|
|
5529
5529
|
|
|
5530
5530
|
:host {
|
|
5531
5531
|
height: 100%;
|
|
5532
5532
|
padding: 0;
|
|
5533
5533
|
}
|
|
5534
|
-
`,Fp=(e,t)=>(0,a.tabPanelTemplate)(e,t);class
|
|
5534
|
+
`,Fp=(e,t)=>(0,a.tabPanelTemplate)(e,t);class Mp extends r.TabPanel{}const _p=void 0,Hp={},Pp=Mp.compose(Object.assign({baseName:"tab-panel",template:Fp,styles:Np,shadowOptions:_p},Hp)),zp=(e,t)=>l.css`
|
|
5535
5535
|
${(0,r.tabsStyles)(e,t)}
|
|
5536
5536
|
|
|
5537
5537
|
:host {
|
|
@@ -5548,20 +5548,20 @@
|
|
|
5548
5548
|
:host([scrollable]) ::slotted([role='tab']) {
|
|
5549
5549
|
flex: 0 0 auto;
|
|
5550
5550
|
}
|
|
5551
|
-
`,
|
|
5551
|
+
`,Up=(e,t)=>(0,a.tabsTemplate)(e,t);class Bp extends r.Tabs{constructor(){super(...arguments),this.scrollable=!1}get currentTabIndex(){return this.activeTabIndex}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Bp.prototype,"scrollable",void 0);const Vp=void 0,Gp={},jp=Bp.compose(Object.assign({baseName:"tabs",template:Up,styles:zp,shadowOptions:Vp},Gp)),Yp=(e,t)=>l.css`
|
|
5552
5552
|
${(0,r.textAreaStyles)(e,t)}
|
|
5553
5553
|
:host .control {
|
|
5554
5554
|
padding: calc(var(--design-unit) * 3px);
|
|
5555
5555
|
}
|
|
5556
|
-
`,
|
|
5556
|
+
`,Wp=(e,t)=>(0,a.textAreaTemplate)(e,t);class qp extends r.TextArea{}const Kp=void 0,Xp={},Jp=qp.compose(Object.assign({baseName:"text-area",template:Wp,styles:Yp,shadowOptions:Kp},Xp)),{create:Qp}=a.DesignToken,Zp=Qp("active-color-scheme").withDefault(e=>r.baseLayerLuminance.getValueFor(e)===r.StandardLuminance.LightMode?"light":"dark"),em=(e,t)=>l.css`
|
|
5557
5557
|
${(0,r.textFieldStyles)(e,t)}
|
|
5558
5558
|
/* Override FAST .root align-items: baseline for this flex child so it still fills the row. */
|
|
5559
|
-
${
|
|
5559
|
+
${xl}
|
|
5560
5560
|
|
|
5561
5561
|
input {
|
|
5562
|
-
color-scheme: ${
|
|
5562
|
+
color-scheme: ${Zp};
|
|
5563
5563
|
}
|
|
5564
|
-
`,
|
|
5564
|
+
`,tm=(e,t)=>l.html`
|
|
5565
5565
|
<template
|
|
5566
5566
|
class="${e=>(0,x.x)(["readonly",e.readOnly],["has-prefix",!!e.prefix],["has-suffix",!!e.suffix])}"
|
|
5567
5567
|
>
|
|
@@ -5643,7 +5643,7 @@
|
|
|
5643
5643
|
${(0,a.endSlotTemplate)(e,t)}
|
|
5644
5644
|
</div>
|
|
5645
5645
|
</template>
|
|
5646
|
-
`;class
|
|
5646
|
+
`;class im extends(Cl(r.TextField)){constructor(){super(...arguments),this.autocomplete="off",this.autocapitalize="off"}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}autocapitalizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocapitalize=this.autocapitalize)}}(0,C.Cg)([l.attr],im.prototype,"autocomplete",void 0),(0,C.Cg)([l.attr],im.prototype,"autocapitalize",void 0),(0,C.Cg)([l.attr],im.prototype,"step",void 0);const om={mode:"open",delegatesFocus:!0},nm={},sm=im.compose(Object.assign({baseName:"text-field",template:tm,styles:em,shadowOptions:om},nm)),am=l.css`
|
|
5647
5647
|
@keyframes append-animate {
|
|
5648
5648
|
from {
|
|
5649
5649
|
transform: translateX(100%);
|
|
@@ -5754,7 +5754,7 @@
|
|
|
5754
5754
|
margin-left: auto;
|
|
5755
5755
|
color: #879ba6;
|
|
5756
5756
|
}
|
|
5757
|
-
`,
|
|
5757
|
+
`,rm=(e="zero")=>l.html`
|
|
5758
5758
|
<div
|
|
5759
5759
|
role="alert"
|
|
5760
5760
|
part="root"
|
|
@@ -5781,13 +5781,13 @@
|
|
|
5781
5781
|
</div>
|
|
5782
5782
|
</div>
|
|
5783
5783
|
</div>
|
|
5784
|
-
`,
|
|
5785
|
-
${e=>
|
|
5786
|
-
`,
|
|
5784
|
+
`,lm=l.html`
|
|
5785
|
+
${e=>rm(T(e))}
|
|
5786
|
+
`,dm={mode:"open",delegatesFocus:!0},cm={};class um extends a.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=1e4,this.autoClose=!1,this.closeTimer=null}connectedCallback(){super.connectedCallback(),this.autoClose&&(this.closeTimer=setTimeout(()=>{this.deleteAnimation="toast-delete",this.toast.onanimationend=()=>{this.remove()}},this.closeTimeout))}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.closeTimer),this.closeTimer=null}close(){this.remove()}}(0,C.Cg)([l.observable],um.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],um.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close"})],um.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"notification-icon"})],um.prototype,"notificationIcon",void 0);const hm=um.compose(Object.assign({baseName:"toast",styles:am,template:lm,shadowOptions:dm},cm)),pm=(e,t)=>l.css`
|
|
5787
5787
|
${(0,r.toolbarStyles)(e,t)}
|
|
5788
|
-
`,
|
|
5788
|
+
`,mm=(e,t)=>(0,a.toolbarTemplate)(e,t);class gm extends r.Toolbar{}const vm=void 0,fm={},bm=gm.compose(Object.assign({baseName:"toolbar",template:mm,styles:pm,shadowOptions:vm},fm)),ym=(e,t)=>l.css`
|
|
5789
5789
|
${(0,r.tooltipStyles)(e,t)}
|
|
5790
|
-
`,
|
|
5790
|
+
`,wm=(e,t)=>(0,a.tooltipTemplate)(e,t);class Cm extends r.Tooltip{}const xm=void 0,$m={},Sm=Cm.compose(Object.assign({baseName:"tooltip",template:wm,styles:ym,shadowOptions:xm},$m)),Em=(e,t)=>l.css`
|
|
5791
5791
|
${(0,r.treeItemStyles)(e,t)}
|
|
5792
5792
|
:host {
|
|
5793
5793
|
--focus-stroke-width: 0;
|
|
@@ -5804,9 +5804,9 @@
|
|
|
5804
5804
|
.positioning-region {
|
|
5805
5805
|
height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px);
|
|
5806
5806
|
}
|
|
5807
|
-
`,
|
|
5807
|
+
`,Om=(e,t)=>(0,a.treeItemTemplate)(e,t);class Tm extends r.TreeItem{}const km=void 0,Dm={expandCollapseGlyph:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" class="expand-collapse-glyph">\n <path d="M5.00001 12.3263C5.00124 12.5147 5.05566 12.699 5.15699 12.8578C5.25831 13.0167 5.40243 13.1437 5.57273 13.2242C5.74304 13.3047 5.9326 13.3354 6.11959 13.3128C6.30659 13.2902 6.4834 13.2152 6.62967 13.0965L10.8988 8.83532C11.0739 8.69473 11.2153 8.51658 11.3124 8.31402C11.4096 8.11146 11.46 7.88966 11.46 7.66499C11.46 7.44033 11.4096 7.21853 11.3124 7.01597C11.2153 6.81341 11.0739 6.63526 10.8988 6.49467L6.62967 2.22347C6.48274 2.10422 6.30501 2.02912 6.11712 2.00691C5.92923 1.9847 5.73889 2.01628 5.56823 2.09799C5.39757 2.17969 5.25358 2.30817 5.153 2.46849C5.05241 2.62882 4.99936 2.8144 5.00001 3.00369V12.3263Z"></path>\n </svg>'},Im=Tm.compose(Object.assign({baseName:"tree-item",template:Om,styles:Em,shadowOptions:km},Dm)),Rm=(e,t)=>l.css`
|
|
5808
5808
|
${(0,r.treeViewStyles)(e,t)}
|
|
5809
|
-
`,
|
|
5809
|
+
`,Am=(e,t)=>(0,a.treeViewTemplate)(e,t);class Lm extends a.TreeView{}const Nm=void 0,Fm={},Mm=Lm.compose(Object.assign({baseName:"tree-view",template:Am,styles:Rm,shadowOptions:Nm},Fm)),_m=(e,t)=>l.css`
|
|
5810
5810
|
.container {
|
|
5811
5811
|
position: relative;
|
|
5812
5812
|
width: 100%;
|
|
@@ -5826,7 +5826,7 @@
|
|
|
5826
5826
|
overflow: hidden;
|
|
5827
5827
|
text-overflow: ellipsis;
|
|
5828
5828
|
}
|
|
5829
|
-
`,
|
|
5829
|
+
`,Hm=e=>l.html`
|
|
5830
5830
|
<div class="container" value=${e=>e.value}>
|
|
5831
5831
|
<${e}-text-field
|
|
5832
5832
|
class="url-input"
|
|
@@ -5841,9 +5841,9 @@
|
|
|
5841
5841
|
<a class="url-input-link" href=${e=>e.value} target="_blank">${e=>e.value}</a>
|
|
5842
5842
|
`)}
|
|
5843
5843
|
</div>
|
|
5844
|
-
`,
|
|
5845
|
-
${e=>
|
|
5846
|
-
`,
|
|
5844
|
+
`,Pm=l.html`
|
|
5845
|
+
${e=>Hm(T(e))}
|
|
5846
|
+
`,zm=void 0,Um={};class Bm extends r.TextField{constructor(){super(...arguments),this.value=""}saveUrl(e){this.value=e.startsWith("http")?e:"https://"+e,this.focused=!1}focus(){this.focused=!0}}(0,C.Cg)([l.observable],Bm.prototype,"value",void 0),(0,C.Cg)([l.observable],Bm.prototype,"focused",void 0);const Vm=Bm.compose(Object.assign({baseName:"url-input",template:Pm,styles:_m,shadowOptions:zm},Um)),Gm=l.css`
|
|
5847
5847
|
:host {
|
|
5848
5848
|
display: block;
|
|
5849
5849
|
font-family: var(--body-font);
|
|
@@ -5912,7 +5912,7 @@
|
|
|
5912
5912
|
line-height: var(--type-ramp-base-line-height);
|
|
5913
5913
|
text-align: center;
|
|
5914
5914
|
outline: none;
|
|
5915
|
-
color-scheme: ${
|
|
5915
|
+
color-scheme: ${Zp};
|
|
5916
5916
|
}
|
|
5917
5917
|
|
|
5918
5918
|
.digit[appearance='filled'] .root {
|
|
@@ -5946,8 +5946,8 @@
|
|
|
5946
5946
|
background: var(--neutral-fill-hover);
|
|
5947
5947
|
}
|
|
5948
5948
|
|
|
5949
|
-
${
|
|
5950
|
-
`,
|
|
5949
|
+
${xl}
|
|
5950
|
+
`,jm=l.html`
|
|
5951
5951
|
<label
|
|
5952
5952
|
part="label"
|
|
5953
5953
|
id="${e=>e.labelId}"
|
|
@@ -5995,7 +5995,7 @@
|
|
|
5995
5995
|
</div>
|
|
5996
5996
|
`)}
|
|
5997
5997
|
</div>
|
|
5998
|
-
`,jm={mode:"open",delegatesFocus:!0},Ym={},Wm=/^\d$/;class qm extends a.FoundationElement{}class Km extends((0,a.FormAssociated)(qm)){constructor(){super(),this.values=[],this.controlListeners=new Map,this.syncingFromDigits=!1,this.appearance="outline",this.digits=6,this.readOnly=!1,this.autofocus=!1,this.error=!1,this.proxy=document.createElement("input")}get digitsIndexes(){return Array.from({length:this.digits},(e,t)=>t)}get controlIdPrefix(){return this.id||"verification-code"}get labelId(){return`${this.controlIdPrefix}-label`}get hasLabel(){var e;return!!(null===(e=this.defaultSlottedNodes)||void 0===e?void 0:e.length)}getControlId(e){return`${this.controlIdPrefix}-${e}`}clear(){this.value="",this.emitChange(),this.$fastController.isConnected&&this.focusDigit(0)}focus(){this.focusDigit(0)}valueChanged(e,t){const i=this.sanitizeCode(t);this.syncingFromDigits||this.syncDigitsFromValue(i),String(null!=t?t:"")===i?super.valueChanged(e,i):this.value=i}validate(e){var t,i;if(!(this.proxy instanceof HTMLElement))return;const o=null!==(t=null!=e?e:this.getControlElement(0))&&void 0!==t?t:void 0;String(null!==(i=this.value)&&void 0!==i?i:"").length>0&&!this.isComplete()?this.setValidity({patternMismatch:!0},`Please enter a ${this.digits}-digit code.`,o):!this.required||this.isComplete()?this.setValidity({},"",o):this.setValidity({valueMissing:!0},"Please fill out this field.",o)}connectedCallback(){super.connectedCallback(),this.proxy.type="text",this.proxy.inputMode="numeric",l.DOM.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners(),this.autofocus&&!this.readOnly&&this.focus()})}disconnectedCallback(){super.disconnectedCallback(),this.unbindControlListeners()}digitsChanged(){var e;this.syncDigitsFromValue(this.sanitizeCode(this.value));const t=(null!==(e=this.values)&&void 0!==e?e:[]).join("");this.value!==t?this.value=t:this.validate(),l.DOM.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners()})}get digitClassnames(){return[this.error&&"error",(this.disabled||this.readOnly)&&"disabled"].filter(Boolean).join(" ")}sanitizeCode(e){const t=Math.max(1,Number(this.digits)||6);return String(null!=e?e:"").replace(/\D/g,"").slice(0,t)}bindControlListeners(){this.unbindControlListeners();this.rootNode.querySelectorAll("[data-digit-index] input.control").forEach(e=>{const t=this.getIndexFromInput(e);if(null===t)return;const i={paste:e=>this.onPaste(e,t),keydown:e=>this.onKeyDown(e,t),input:e=>this.onInput(e,t)};e.addEventListener("paste",i.paste,!0),e.addEventListener("keydown",i.keydown),e.addEventListener("input",i.input),this.controlListeners.set(e,i)})}unbindControlListeners(){var e,t;null===(e=this.controlListeners)||void 0===e||e.forEach((e,t)=>{t.removeEventListener("paste",e.paste,!0),t.removeEventListener("keydown",e.keydown),t.removeEventListener("input",e.input)}),null===(t=this.controlListeners)||void 0===t||t.clear()}onKeyDown(e,t){if(!this.readOnly&&!this.disabled){if(Wm.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey)return e.preventDefault(),this.updateDigit(t,e.key),void this.focusDigit(t+1);switch(e.key){case"Backspace":e.preventDefault(),this.handleBackspace(t);break;case"Delete":e.preventDefault(),this.handleDelete(t);break;case"ArrowLeft":e.preventDefault(),this.focusDigit(t-1);break;case"ArrowRight":e.preventDefault(),this.focusDigit(t+1);break;case"Tab":case"Home":case"End":break;default:this.isBlockedCharacter(e)&&e.preventDefault()}}}isBlockedCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(1===e.key.length&&!Wm.test(e.key))}onInput(e,t){if(this.readOnly||this.disabled)return;const i=e.target,o=i.value.replace(/\D/g,"");if(o.length>1)return void this.applyDigits(o,t);const n=o.slice(-1);i.value!==n&&(i.value=n),n&&this.values[t]!==n?(this.updateDigit(t,n),this.focusDigit(t+1)):!n&&this.values[t]&&this.updateDigit(t,"")}onPaste(e,t){var i,o;if(this.readOnly||this.disabled)return;e.preventDefault();const n=null!==(o=null===(i=e.clipboardData)||void 0===i?void 0:i.getData("text"))&&void 0!==o?o:"";n&&this.applyDigits(n,t)}handleBackspace(e){this.values[e]?this.updateDigit(e,""):e>0&&(this.updateDigit(e-1,""),this.focusDigit(e-1))}handleDelete(e){this.values[e]&&this.updateDigit(e,"")}getIndexFromInput(e){var t;const i=Number(null===(t=e.closest("[data-digit-index]"))||void 0===t?void 0:t.getAttribute("data-digit-index"));return Number.isNaN(i)?null:i}syncDigitsFromValue(e){var t,i;const o=Math.max(1,Number(this.digits)||6),n=Array.from({length:o},(t,i)=>{var o;return null!==(o=e[i])&&void 0!==o?o:""}),s=null!==(t=this.values)&&void 0!==t?t:[];n.length===s.length&&n.every((e,t)=>e===s[t])||(this.values=n,(null===(i=this.$fastController)||void 0===i?void 0:i.isConnected)&&this.syncFieldValues())}updateDigit(e,t){if(e<0||e>=this.digits)return;const i=[...this.values];i[e]=t,this.values=i,this.syncFieldValue(e),this.commitValues(i)}applyDigits(e,t){const i=e.replace(/\D/g,"").slice(0,this.digits-t);if(!i.length)return;const o=[...this.values];for(let e=0;e<i.length;e+=1)o[t+e]=i[e];this.values=o,this.syncFieldValues(),this.commitValues(o),this.focusDigit(this.isComplete()?this.digits-1:t+i.length)}commitValues(e){const t=e.join("");this.syncingFromDigits=!0;try{this.value!==t?this.value=t:this.validate()}finally{this.syncingFromDigits=!1}this.emitChange(),this.isComplete()&&this.$emit("complete",{value:this.value})}syncFieldValues(){for(let e=0;e<this.digits;e+=1)this.syncFieldValue(e)}syncFieldValue(e){var t;const i=this.getControlElement(e);i&&(i.value=null!==(t=this.values[e])&&void 0!==t?t:"")}focusDigit(e){var t;e<0||e>=this.digits||null===(t=this.getControlElement(e))||void 0===t||t.focus()}get rootNode(){var e;return null!==(e=this.shadowRoot)&&void 0!==e?e:this}getControlElement(e){return this.rootNode.querySelector(`[data-digit-index="${e}"] input.control`)}isComplete(){var e;const t=null!==(e=this.values)&&void 0!==e?e:[];return t.length===this.digits&&t.every(e=>Wm.test(e))}emitChange(){this.$emit("change",{value:this.value})}}(0,C.Cg)([l.observable],Km.prototype,"values",void 0),(0,C.Cg)([l.observable],Km.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.attr],Km.prototype,"id",void 0),(0,C.Cg)([l.attr],Km.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Km.prototype,"digits",void 0),(0,C.Cg)([(0,l.attr)({attribute:"readonly",mode:"boolean"})],Km.prototype,"readOnly",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Km.prototype,"autofocus",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Km.prototype,"error",void 0);const Xm=Km.compose(Object.assign({baseName:"verification-code-input",template:Gm,styles:Vm,shadowOptions:jm},Ym)),Jm={foundationAccordion:m,foundationAiCriteriaSearch:Oe,foundationAiIndicator:Ie,foundationAccordionItem:w,foundationActionsMenu:A,foundationAnchor:Me,foundationAnchoredRegion:Be,foundationAvatar:Ke,foundationBadge:tt,foundationBanner:dt,foundationBreadcrumb:gt,foundationBreadcrumbItem:Ct,foundationButton:Tt,foundationCalendar:Lt,foundationCard:Pt,foundationCategorizedMultiselect:qt,foundationCheckbox:ei,foundationCombobox:Oi,foundationConnectionIndicator:Ri,foundationDataGrid:_i,foundationDataGridCell:Bi,foundationDataGridRow:Wi,foundationDatePicker:Eo,foundationDesignSystemProvider:xn,foundationDialog:Ln,foundationDisclosure:Pn,foundationDivider:jn,foundationDropdownMenu:Qn,foundationErrorBanner:fs,foundationErrorBoundary:Rs,foundationErrorDialog:_s,foundationFileReader:Gs,foundationFileUpload:aa,foundationFilter:fa,foundationFilterBar:Oa,foundationFlexLayout:Fa,foundationFlipper:za,foundationFlyout:qa,foundationGridLayout:or,foundationGridLayoutItem:lr,foundationHorizontalScroll:mr,foundationIcon:Ir,foundationListbox:Mr,foundationListboxOption:Br,foundationMenu:qr,foundationMenuItem:el,foundationModal:al,foundationMultiselect:gl,foundationNumberField:Yl,foundationOptgroup:Xl,foundationPill:Hd,foundationPopper:Gd,foundationProgress:Cd,foundationProgressRing:Xd,foundationRadio:ic,foundationRadioGroup:lc,foundationScheduler:gc,foundationSchedulerCronBuilder:mu,foundationSchedulerTimezone:Cu,foundationSearchBar:Fu,foundationSearchBarCombobox:Uu,foundationSegmentedControl:nh,foundationSegmentedItem:ch,foundationSelect:vh,foundationSkeleton:xh,foundationSlider:Ih,foundationSliderLabel:Mh,foundationSnackbar:Yh,foundationStackingIcons:Xh,foundationStatusPill:tp,foundationEnvironmentIndicator:hs,foundationStepperTab:cp,foundationStepperTabPanel:gp,foundationSwitch:Cp,foundationSystemHealthOverlay:Rd,foundationTab:Ap,foundationTabPanel:Hp,foundationTabs:Gp,foundationTextArea:Xp,foundationTextField:nm,foundationToast:um,foundationToolbar:fm,foundationTooltip:$m,foundationTreeItem:Dm,foundationTreeView:Nm,foundationUrlInput:Bm,foundationVerificationCodeInput:Xm,foundationSectionNavigator:Qu,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};class Qm extends l.CSSDirective{constructor(e){super(),this.tokenMap=e}createTokenPartial(e,t){return l.cssPartial`${e}: ${t}`}createTokensCSS(){const e=[];for(const[t,i]of Object.entries(this.tokenMap))e.push(this.createTokenPartial(t,i).createCSS());return e}createCSS(){return this.createTokensCSS().join(";")}}let Zm=class extends gi{constructor(){super(...arguments),this.isSnapshot=!0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.dataGrid=this.parentElement,this.dataGrid&&this.resourceName&&this.connect.isConnected&&this.fetchGenesisData()})}getColumnDefs(e){return null==e?void 0:e.flatMap(e=>this.fields&&!this.fields.includes(e.name)?[]:{columnDataKey:e.name})}clearData(){ot.debug("clearData - Method not implemented.")}syncComponentData(e){const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values()),i=this.getColumnDefs(this.datasource.fieldMetadata);this.dataGrid.columnDefinitions=i,this.dataGrid.rowsData=t}handleStreamInserts(e){ot.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){ot.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ot.debug("handleStreamUpdates - Method not implemented.")}};Zm=(0,C.Cg)([(0,l.customElement)({name:"data-grid-datasource"})],Zm);const eg=[{type:"AND",maxRules:"many"},{type:"OR",maxRules:"many"}],tg=[...eg,{type:"NOT",maxRules:2},{type:"NAND",maxRules:"many"},{type:"NOR",maxRules:"many"},{type:"XOR",maxRules:2}],ig={type:"NULL",maxRules:1,invisible:!0},og=["int","short","long","bigdecimal","double"],ng=["date","date-time"],sg=["enum",...og,"string",...ng,"boolean"],ag=[{type:"equal",nbInputs:1,applyTo:sg,optgroup:"Equality"},{type:"not_equal",nbInputs:1,applyTo:sg,optgroup:"Equality"},{type:"greater",nbInputs:1,applyTo:[...og,...ng],optgroup:"Comparison"},{type:"less",nbInputs:1,applyTo:[...og,...ng],optgroup:"Comparison"},{type:"contains",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"starts_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"ends_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"one_of",nbInputs:"many",applyTo:[...sg].filter(e=>"boolean"!==e)},{type:"not_any_of",nbInputs:"many",applyTo:[...sg].filter(e=>"boolean"!==e)},{type:"within_inclusive",nbInputs:2,applyTo:[...og,...ng],optgroup:"Range"},{type:"within_exclusive",nbInputs:2,applyTo:[...og,...ng],optgroup:"Range"},{type:"is_null",nbInputs:0,applyTo:[...sg],optgroup:"Null"},{type:"not_null",nbInputs:0,applyTo:[...sg],optgroup:"Null"}];var rg=i(93678);const lg=i.n(rg)()();function dg(e,t,i){const o=function e(o){const n=lg(o);if(n.groupId===t)return n.children=i(n.children),n;const s=[];let a=!1;for(const t of n.children)if("children"in t){const i=e(t);i?(s.push(i),a=!0):s.push(t)}else s.push(t);return n.children=s,a?n:null}(e);if(!o)throw new Error(`Unable to find group with groupId ${t}`);return o}function cg(e,t,i){return function e(o){for(const n of o.children){if(i(n,t))return o;if("children"in n){const t=e(n);if(t)return t}}return null}(e)}function ug(e,t){const i=cg(e,t,(e,t)=>"children"in e&&e.groupId===t);if(!i)throw new Error(`No parent group found for group with ID ${t}`);return i}function hg(e,t){const i=cg(e,t,(e,t)=>"ruleId"in e&&e.ruleId===t);if(!i)throw new Error(`No parent group found for rule with ID ${t}`);return i}function pg(e,t,i){return dg(e,t,e=>[...e,i])}const mg="group-root";function gg(e,t){const i=(e,o)=>{return"children"in e?function(e,o){return Object.assign(Object.assign({},e),{level:o,config:t.getConfig(),groupId:t.getGroupId(),children:e.children.map(e=>i(e,o+1))})}(e,o):(n=e,Object.assign(Object.assign({},n),{ruleId:t.getRuleId(),config:t.getConfig()}));var n};return Object.assign(Object.assign({},e),{config:t.getConfig(),level:1,groupId:mg,children:e.children.map(e=>i(e,2))})}function vg(e){const t=e.children.map(e=>"children"in e?vg(e):function(e){const{operator:t,field:i,value:o}=e;return{operator:t,field:i,value:o}}(e));return{combinator:e.combinator,children:t}}const fg=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`,bg=e=>`${fg(e)}T${String(e.getUTCHours()).padStart(2,"0")}:${String(e.getUTCMinutes()).padStart(2,"0")}:${String(e.getUTCSeconds()).padStart(2,"0")}`,yg=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.input)&&void 0!==o?o:e.field.input},wg=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type},Cg=e=>{const t={},i=[],o=e=>[...e].sort((e,t)=>"fieldId"in e&&"fieldId"in t?e.fieldId.localeCompare(t.fieldId):"type"in e&&"type"in t?e.type.localeCompare(t.type):0);e.forEach(e=>{if(e.optgroup){const i=e.optgroup;t[i]||(t[i]=[]),t[i].push(e)}else i.push(e)});const n=[];return Object.keys(t).sort().forEach(e=>{n.push({optgroup:e,xs:o(t[e])})}),[...n,...o(i)]};function xg(e,t,i){if(!e.shadowRoot||!(null==t?void 0:t.customStyles))return;const o=t.customStyles[i];if(o){const t=document.createElement("style");t.textContent=o,e.shadowRoot.firstChild?e.shadowRoot.insertBefore(t,e.shadowRoot.firstChild):e.shadowRoot.appendChild(t)}}var $g;!function(e){e.AddGroup="add-group",e.DelGroup="del-group",e.AddRule="add-rule",e.DelRule="del-rule",e.UpdateGroup="update-group",e.UpdateRule="update-rule",e.FieldSelected="field-selected",e.OperatorSelected="operator-selected",e.ValueUpdated="value-updated",e.RemoveVarArg="remove-variadic-operand"}($g||($g={}));const Sg=l.css`
|
|
5998
|
+
`,Ym={mode:"open",delegatesFocus:!0},Wm={},qm=/^\d$/;class Km extends a.FoundationElement{}class Xm extends((0,a.FormAssociated)(Km)){constructor(){super(),this.values=[],this.controlListeners=new Map,this.syncingFromDigits=!1,this.appearance="outline",this.digits=6,this.readOnly=!1,this.autofocus=!1,this.error=!1,this.proxy=document.createElement("input")}get digitsIndexes(){return Array.from({length:this.digits},(e,t)=>t)}get controlIdPrefix(){return this.id||"verification-code"}get labelId(){return`${this.controlIdPrefix}-label`}get hasLabel(){var e;return!!(null===(e=this.defaultSlottedNodes)||void 0===e?void 0:e.length)}getControlId(e){return`${this.controlIdPrefix}-${e}`}clear(){this.value="",this.emitChange(),this.$fastController.isConnected&&this.focusDigit(0)}focus(){this.focusDigit(0)}valueChanged(e,t){const i=this.sanitizeCode(t);this.syncingFromDigits||this.syncDigitsFromValue(i),String(null!=t?t:"")===i?super.valueChanged(e,i):this.value=i}validate(e){var t,i;if(!(this.proxy instanceof HTMLElement))return;const o=null!==(t=null!=e?e:this.getControlElement(0))&&void 0!==t?t:void 0;String(null!==(i=this.value)&&void 0!==i?i:"").length>0&&!this.isComplete()?this.setValidity({patternMismatch:!0},`Please enter a ${this.digits}-digit code.`,o):!this.required||this.isComplete()?this.setValidity({},"",o):this.setValidity({valueMissing:!0},"Please fill out this field.",o)}connectedCallback(){super.connectedCallback(),this.proxy.type="text",this.proxy.inputMode="numeric",l.DOM.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners(),this.autofocus&&!this.readOnly&&this.focus()})}disconnectedCallback(){super.disconnectedCallback(),this.unbindControlListeners()}digitsChanged(){var e;this.syncDigitsFromValue(this.sanitizeCode(this.value));const t=(null!==(e=this.values)&&void 0!==e?e:[]).join("");this.value!==t?this.value=t:this.validate(),l.DOM.queueUpdate(()=>{this.syncFieldValues(),this.bindControlListeners()})}get digitClassnames(){return[this.error&&"error",(this.disabled||this.readOnly)&&"disabled"].filter(Boolean).join(" ")}sanitizeCode(e){const t=Math.max(1,Number(this.digits)||6);return String(null!=e?e:"").replace(/\D/g,"").slice(0,t)}bindControlListeners(){this.unbindControlListeners();this.rootNode.querySelectorAll("[data-digit-index] input.control").forEach(e=>{const t=this.getIndexFromInput(e);if(null===t)return;const i={paste:e=>this.onPaste(e,t),keydown:e=>this.onKeyDown(e,t),input:e=>this.onInput(e,t)};e.addEventListener("paste",i.paste,!0),e.addEventListener("keydown",i.keydown),e.addEventListener("input",i.input),this.controlListeners.set(e,i)})}unbindControlListeners(){var e,t;null===(e=this.controlListeners)||void 0===e||e.forEach((e,t)=>{t.removeEventListener("paste",e.paste,!0),t.removeEventListener("keydown",e.keydown),t.removeEventListener("input",e.input)}),null===(t=this.controlListeners)||void 0===t||t.clear()}onKeyDown(e,t){if(!this.readOnly&&!this.disabled){if(qm.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey)return e.preventDefault(),this.updateDigit(t,e.key),void this.focusDigit(t+1);switch(e.key){case"Backspace":e.preventDefault(),this.handleBackspace(t);break;case"Delete":e.preventDefault(),this.handleDelete(t);break;case"ArrowLeft":e.preventDefault(),this.focusDigit(t-1);break;case"ArrowRight":e.preventDefault(),this.focusDigit(t+1);break;case"Tab":case"Home":case"End":break;default:this.isBlockedCharacter(e)&&e.preventDefault()}}}isBlockedCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(1===e.key.length&&!qm.test(e.key))}onInput(e,t){if(this.readOnly||this.disabled)return;const i=e.target,o=i.value.replace(/\D/g,"");if(o.length>1)return void this.applyDigits(o,t);const n=o.slice(-1);i.value!==n&&(i.value=n),n&&this.values[t]!==n?(this.updateDigit(t,n),this.focusDigit(t+1)):!n&&this.values[t]&&this.updateDigit(t,"")}onPaste(e,t){var i,o;if(this.readOnly||this.disabled)return;e.preventDefault();const n=null!==(o=null===(i=e.clipboardData)||void 0===i?void 0:i.getData("text"))&&void 0!==o?o:"";n&&this.applyDigits(n,t)}handleBackspace(e){this.values[e]?this.updateDigit(e,""):e>0&&(this.updateDigit(e-1,""),this.focusDigit(e-1))}handleDelete(e){this.values[e]&&this.updateDigit(e,"")}getIndexFromInput(e){var t;const i=Number(null===(t=e.closest("[data-digit-index]"))||void 0===t?void 0:t.getAttribute("data-digit-index"));return Number.isNaN(i)?null:i}syncDigitsFromValue(e){var t,i;const o=Math.max(1,Number(this.digits)||6),n=Array.from({length:o},(t,i)=>{var o;return null!==(o=e[i])&&void 0!==o?o:""}),s=null!==(t=this.values)&&void 0!==t?t:[];n.length===s.length&&n.every((e,t)=>e===s[t])||(this.values=n,(null===(i=this.$fastController)||void 0===i?void 0:i.isConnected)&&this.syncFieldValues())}updateDigit(e,t){if(e<0||e>=this.digits)return;const i=[...this.values];i[e]=t,this.values=i,this.syncFieldValue(e),this.commitValues(i)}applyDigits(e,t){const i=e.replace(/\D/g,"").slice(0,this.digits-t);if(!i.length)return;const o=[...this.values];for(let e=0;e<i.length;e+=1)o[t+e]=i[e];this.values=o,this.syncFieldValues(),this.commitValues(o),this.focusDigit(this.isComplete()?this.digits-1:t+i.length)}commitValues(e){const t=e.join("");this.syncingFromDigits=!0;try{this.value!==t?this.value=t:this.validate()}finally{this.syncingFromDigits=!1}this.emitChange(),this.isComplete()&&this.$emit("complete",{value:this.value})}syncFieldValues(){for(let e=0;e<this.digits;e+=1)this.syncFieldValue(e)}syncFieldValue(e){var t;const i=this.getControlElement(e);i&&(i.value=null!==(t=this.values[e])&&void 0!==t?t:"")}focusDigit(e){var t;e<0||e>=this.digits||null===(t=this.getControlElement(e))||void 0===t||t.focus()}get rootNode(){var e;return null!==(e=this.shadowRoot)&&void 0!==e?e:this}getControlElement(e){return this.rootNode.querySelector(`[data-digit-index="${e}"] input.control`)}isComplete(){var e;const t=null!==(e=this.values)&&void 0!==e?e:[];return t.length===this.digits&&t.every(e=>qm.test(e))}emitChange(){this.$emit("change",{value:this.value})}}(0,C.Cg)([l.observable],Xm.prototype,"values",void 0),(0,C.Cg)([l.observable],Xm.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.attr],Xm.prototype,"id",void 0),(0,C.Cg)([l.attr],Xm.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Xm.prototype,"digits",void 0),(0,C.Cg)([(0,l.attr)({attribute:"readonly",mode:"boolean"})],Xm.prototype,"readOnly",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Xm.prototype,"autofocus",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Xm.prototype,"error",void 0);const Jm=Xm.compose(Object.assign({baseName:"verification-code-input",template:jm,styles:Gm,shadowOptions:Ym},Wm)),Qm={foundationAccordion:m,foundationAiCriteriaSearch:Oe,foundationAiIndicator:Ie,foundationAccordionItem:w,foundationActionsMenu:A,foundationAnchor:Me,foundationAnchoredRegion:Be,foundationAvatar:Ke,foundationBadge:tt,foundationBanner:dt,foundationBreadcrumb:gt,foundationBreadcrumbItem:Ct,foundationButton:Tt,foundationCalendar:Lt,foundationCard:Pt,foundationCategorizedMultiselect:qt,foundationCheckbox:ei,foundationCombobox:Ti,foundationConnectionIndicator:Ai,foundationDataGrid:Hi,foundationDataGridCell:Vi,foundationDataGridRow:qi,foundationDatePicker:Oo,foundationDesignSystemProvider:$n,foundationDialog:Nn,foundationDisclosure:zn,foundationDivider:Yn,foundationDropdownMenu:Zn,foundationErrorBanner:bs,foundationErrorBoundary:As,foundationErrorDialog:Hs,foundationFileReader:js,foundationFileUpload:ra,foundationFilter:ba,foundationFilterBar:Ta,foundationFlexLayout:Fa,foundationFlipper:Ua,foundationFlyout:Ka,foundationGridLayout:nr,foundationGridLayoutItem:dr,foundationHorizontalScroll:gr,foundationIcon:Rr,foundationListbox:_r,foundationListboxOption:Vr,foundationMenu:Kr,foundationMenuItem:tl,foundationModal:rl,foundationMultiselect:vl,foundationNumberField:Wl,foundationOptgroup:Jl,foundationPill:Pd,foundationPopper:jd,foundationProgress:xd,foundationProgressRing:Jd,foundationRadio:oc,foundationRadioGroup:dc,foundationScheduler:vc,foundationSchedulerCronBuilder:gu,foundationSchedulerTimezone:xu,foundationSearchBar:Fu,foundationSearchBarCombobox:Bu,foundationSegmentedControl:sh,foundationSegmentedItem:uh,foundationSelect:fh,foundationSkeleton:$h,foundationSlider:Rh,foundationSliderLabel:_h,foundationSnackbar:Wh,foundationStackingIcons:Jh,foundationStatusPill:ip,foundationEnvironmentIndicator:ps,foundationStepperTab:up,foundationStepperTabPanel:vp,foundationSwitch:xp,foundationSystemHealthOverlay:Ad,foundationTab:Lp,foundationTabPanel:Pp,foundationTabs:jp,foundationTextArea:Jp,foundationTextField:sm,foundationToast:hm,foundationToolbar:bm,foundationTooltip:Sm,foundationTreeItem:Im,foundationTreeView:Mm,foundationUrlInput:Vm,foundationVerificationCodeInput:Jm,foundationSectionNavigator:Zu,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};class Zm extends l.CSSDirective{constructor(e){super(),this.tokenMap=e}createTokenPartial(e,t){return l.cssPartial`${e}: ${t}`}createTokensCSS(){const e=[];for(const[t,i]of Object.entries(this.tokenMap))e.push(this.createTokenPartial(t,i).createCSS());return e}createCSS(){return this.createTokensCSS().join(";")}}let eg=class extends vi{constructor(){super(...arguments),this.isSnapshot=!0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.dataGrid=this.parentElement,this.dataGrid&&this.resourceName&&this.connect.isConnected&&this.fetchGenesisData()})}getColumnDefs(e){return null==e?void 0:e.flatMap(e=>this.fields&&!this.fields.includes(e.name)?[]:{columnDataKey:e.name})}clearData(){ot.debug("clearData - Method not implemented.")}syncComponentData(e){const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values()),i=this.getColumnDefs(this.datasource.fieldMetadata);this.dataGrid.columnDefinitions=i,this.dataGrid.rowsData=t}handleStreamInserts(e){ot.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){ot.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){ot.debug("handleStreamUpdates - Method not implemented.")}};eg=(0,C.Cg)([(0,l.customElement)({name:"data-grid-datasource"})],eg);const tg=[{type:"AND",maxRules:"many"},{type:"OR",maxRules:"many"}],ig=[...tg,{type:"NOT",maxRules:2},{type:"NAND",maxRules:"many"},{type:"NOR",maxRules:"many"},{type:"XOR",maxRules:2}],og={type:"NULL",maxRules:1,invisible:!0},ng=["int","short","long","bigdecimal","double"],sg=["date","date-time"],ag=["enum",...ng,"string",...sg,"boolean"],rg=[{type:"equal",nbInputs:1,applyTo:ag,optgroup:"Equality"},{type:"not_equal",nbInputs:1,applyTo:ag,optgroup:"Equality"},{type:"greater",nbInputs:1,applyTo:[...ng,...sg],optgroup:"Comparison"},{type:"less",nbInputs:1,applyTo:[...ng,...sg],optgroup:"Comparison"},{type:"contains",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"starts_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"ends_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"one_of",nbInputs:"many",applyTo:[...ag].filter(e=>"boolean"!==e)},{type:"not_any_of",nbInputs:"many",applyTo:[...ag].filter(e=>"boolean"!==e)},{type:"within_inclusive",nbInputs:2,applyTo:[...ng,...sg],optgroup:"Range"},{type:"within_exclusive",nbInputs:2,applyTo:[...ng,...sg],optgroup:"Range"},{type:"is_null",nbInputs:0,applyTo:[...ag],optgroup:"Null"},{type:"not_null",nbInputs:0,applyTo:[...ag],optgroup:"Null"}];var lg=i(93678);const dg=i.n(lg)()();function cg(e,t,i){const o=function e(o){const n=dg(o);if(n.groupId===t)return n.children=i(n.children),n;const s=[];let a=!1;for(const t of n.children)if("children"in t){const i=e(t);i?(s.push(i),a=!0):s.push(t)}else s.push(t);return n.children=s,a?n:null}(e);if(!o)throw new Error(`Unable to find group with groupId ${t}`);return o}function ug(e,t,i){return function e(o){for(const n of o.children){if(i(n,t))return o;if("children"in n){const t=e(n);if(t)return t}}return null}(e)}function hg(e,t){const i=ug(e,t,(e,t)=>"children"in e&&e.groupId===t);if(!i)throw new Error(`No parent group found for group with ID ${t}`);return i}function pg(e,t){const i=ug(e,t,(e,t)=>"ruleId"in e&&e.ruleId===t);if(!i)throw new Error(`No parent group found for rule with ID ${t}`);return i}function mg(e,t,i){return cg(e,t,e=>[...e,i])}const gg="group-root";function vg(e,t){const i=(e,o)=>{return"children"in e?function(e,o){return Object.assign(Object.assign({},e),{level:o,config:t.getConfig(),groupId:t.getGroupId(),children:e.children.map(e=>i(e,o+1))})}(e,o):(n=e,Object.assign(Object.assign({},n),{ruleId:t.getRuleId(),config:t.getConfig()}));var n};return Object.assign(Object.assign({},e),{config:t.getConfig(),level:1,groupId:gg,children:e.children.map(e=>i(e,2))})}function fg(e){const t=e.children.map(e=>"children"in e?fg(e):function(e){const{operator:t,field:i,value:o}=e;return{operator:t,field:i,value:o}}(e));return{combinator:e.combinator,children:t}}const bg=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`,yg=e=>`${bg(e)}T${String(e.getUTCHours()).padStart(2,"0")}:${String(e.getUTCMinutes()).padStart(2,"0")}:${String(e.getUTCSeconds()).padStart(2,"0")}`,wg=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.input)&&void 0!==o?o:e.field.input},Cg=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type},xg=e=>{const t={},i=[],o=e=>[...e].sort((e,t)=>"fieldId"in e&&"fieldId"in t?e.fieldId.localeCompare(t.fieldId):"type"in e&&"type"in t?e.type.localeCompare(t.type):0);e.forEach(e=>{if(e.optgroup){const i=e.optgroup;t[i]||(t[i]=[]),t[i].push(e)}else i.push(e)});const n=[];return Object.keys(t).sort().forEach(e=>{n.push({optgroup:e,xs:o(t[e])})}),[...n,...o(i)]};function $g(e,t,i){if(!e.shadowRoot||!(null==t?void 0:t.customStyles))return;const o=t.customStyles[i];if(o){const t=document.createElement("style");t.textContent=o,e.shadowRoot.firstChild?e.shadowRoot.insertBefore(t,e.shadowRoot.firstChild):e.shadowRoot.appendChild(t)}}var Sg;!function(e){e.AddGroup="add-group",e.DelGroup="del-group",e.AddRule="add-rule",e.DelRule="del-rule",e.UpdateGroup="update-group",e.UpdateRule="update-rule",e.FieldSelected="field-selected",e.OperatorSelected="operator-selected",e.ValueUpdated="value-updated",e.RemoveVarArg="remove-variadic-operand"}(Sg||(Sg={}));const Eg=l.css`
|
|
5999
5999
|
:host {
|
|
6000
6000
|
--item-vertical-spacing: 4px;
|
|
6001
6001
|
--item-border-radius: 5px;
|
|
@@ -6169,7 +6169,7 @@
|
|
|
6169
6169
|
.rules-list > *:last-child::after {
|
|
6170
6170
|
display: none;
|
|
6171
6171
|
}
|
|
6172
|
-
`,
|
|
6172
|
+
`,Og=l.css`
|
|
6173
6173
|
.rules-group-container {
|
|
6174
6174
|
border: 1px solid #ccc;
|
|
6175
6175
|
margin-bottom: 10px;
|
|
@@ -6212,10 +6212,10 @@
|
|
|
6212
6212
|
list-style: none;
|
|
6213
6213
|
padding-left: 0;
|
|
6214
6214
|
}
|
|
6215
|
-
`;function
|
|
6215
|
+
`;function Tg(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),s=o(i);return(t,i)=>e(t,i)?n(t,i):s(t,i)}const kg=l.html`
|
|
6216
6216
|
${e=>{var t,i;const o=null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.radio,{radioTag:n,radioGroupTag:s}=o?{radioTag:o.input,radioGroupTag:o.group}:{radioTag:"input",radioGroupTag:"div"};return l.html`
|
|
6217
6217
|
<div class="btn-group group-conditions">
|
|
6218
|
-
${
|
|
6218
|
+
${Tg(e=>"input"!==n,l.html`
|
|
6219
6219
|
<${s}
|
|
6220
6220
|
class="radio-group-container"
|
|
6221
6221
|
name="combinator"
|
|
@@ -6253,7 +6253,7 @@
|
|
|
6253
6253
|
`)}
|
|
6254
6254
|
</div>
|
|
6255
6255
|
`}}
|
|
6256
|
-
`,
|
|
6256
|
+
`,Dg=l.html`
|
|
6257
6257
|
${e=>{var t,i,o,n,s,a,r,d;const c=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.button)||"button",u=`Add a new condition with field (e.g. CURRENCY), operator (e.g. EQUALS), and value (e.g. GBP) that will be combined with other conditions in this group using the selected logic (e.g. ${null===(s=null===(n=null===(o=e.config)||void 0===o?void 0:o.combinators)||void 0===n?void 0:n[0])||void 0===s?void 0:s.type})`,h=`Add a new nested sub-group to create more complex expressions, joined by combinatorial logic (e.g. ${null===(d=null===(r=null===(a=e.config)||void 0===a?void 0:a.combinators)||void 0===r?void 0:r[0])||void 0===d?void 0:d.type})`;return l.html`
|
|
6258
6258
|
<div class="btn-group float-end group-actions">
|
|
6259
6259
|
${(0,l.when)(e=>e.allowAddRule,l.html`
|
|
@@ -6290,13 +6290,13 @@
|
|
|
6290
6290
|
`)}
|
|
6291
6291
|
</div>
|
|
6292
6292
|
`}}
|
|
6293
|
-
`,
|
|
6293
|
+
`,Ig=l.html`
|
|
6294
6294
|
<div class="rules-group-container">
|
|
6295
|
-
<div class="rules-group-header">${
|
|
6295
|
+
<div class="rules-group-header">${Dg} ${kg}</div>
|
|
6296
6296
|
<div class="rules-group-body">
|
|
6297
6297
|
<div class="rules-list">
|
|
6298
6298
|
${(0,l.repeat)(e=>{var t,i;return null!==(i=null===(t=e.model)||void 0===t?void 0:t.children)&&void 0!==i?i:[]},l.html`
|
|
6299
|
-
${
|
|
6299
|
+
${Tg(e=>"children"in e,l.html`
|
|
6300
6300
|
<expression-group
|
|
6301
6301
|
:config=${(e,t)=>t.parent.config}
|
|
6302
6302
|
:styles=${(e,t)=>t.parent.styles}
|
|
@@ -6320,7 +6320,7 @@
|
|
|
6320
6320
|
</div>
|
|
6321
6321
|
</div>
|
|
6322
6322
|
</div>
|
|
6323
|
-
`;let
|
|
6323
|
+
`;let Rg=class extends l.FASTElement{connectedCallback(){super.connectedCallback(),$g(this,this.styles,"group")}get allowAddRule(){return!!this.model&&("many"===this.model.combinator.maxRules||this.model.children.length<this.model.combinator.maxRules)}get allowAddGroup(){var e,t;return!!this.model&&(1!==this.model.combinator.maxRules&&(!(2===this.model.combinator.maxRules&&this.model.children.length>=2)&&(!(null===(e=this.config)||void 0===e?void 0:e.maxNesting)||(null===(t=this.config)||void 0===t?void 0:t.maxNesting)<1||this.config.maxNesting>this.model.level)))}dispatchAddRule(e){if(e.stopPropagation(),!this.allowAddRule)throw new Error("Cannot add extra rules to group");const t={parentGroupId:this.model.groupId};this.dispatchEvent(new CustomEvent(Sg.AddRule,{detail:t,bubbles:!0,composed:!0}))}dispatchAddGroup(e){if(e.stopPropagation(),!this.allowAddGroup)throw new Error("Cannot add further nested groups");const t={parentGroupId:this.model.groupId,newGroup:{level:this.model.level+1}};this.dispatchEvent(new CustomEvent(Sg.AddGroup,{detail:t,bubbles:!0,composed:!0}))}dispatchDeleteGroup(e){e.stopPropagation();const t={groupId:this.model.groupId};this.dispatchEvent(new CustomEvent(Sg.DelGroup,{detail:t,bubbles:!0,composed:!0}))}handleCombinatorChange(e){e.stopPropagation();const t=e.target.value;this.updateCombinator(t)}handleCustomCombinatorChange(e){var t;if(e.stopPropagation(),!(null===(t=this.model)||void 0===t?void 0:t.groupId)||!e.target)return;const i=e.target.getAttribute("value");if(!i)throw new Error("No value found in the custom radio group event target");this.updateCombinator(i)}updateCombinator(e){var t,i;const o=this.config.combinators.find(({type:t})=>t===e);if(!o)throw new Error(`Cannot find selected combinator ${e}`);(null===(i=null===(t=this.model)||void 0===t?void 0:t.combinator)||void 0===i?void 0:i.type)!==o.type&&this.dispatchGroupDataUpdated(o)}dispatchGroupDataUpdated(e){const t={groupId:this.model.groupId,newData:{combinator:e}};this.dispatchEvent(new CustomEvent(Sg.UpdateGroup,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Rg.prototype,"config",void 0),(0,C.Cg)([l.observable],Rg.prototype,"styles",void 0),(0,C.Cg)([l.observable],Rg.prototype,"model",void 0),(0,C.Cg)([l.observable],Rg.prototype,"index",void 0),(0,C.Cg)([l.volatile],Rg.prototype,"allowAddRule",null),(0,C.Cg)([l.volatile],Rg.prototype,"allowAddGroup",null),Rg=(0,C.Cg)([(0,l.customElement)({name:"expression-group",template:Ig,styles:Og,shadowOptions:{delegatesFocus:!0}})],Rg);const Ag=l.html`
|
|
6324
6324
|
<div class="query-builder">
|
|
6325
6325
|
${(0,l.when)(e=>null!==e.model,l.html`
|
|
6326
6326
|
<expression-group
|
|
@@ -6330,7 +6330,7 @@
|
|
|
6330
6330
|
></expression-group>
|
|
6331
6331
|
`)}
|
|
6332
6332
|
</div>
|
|
6333
|
-
`,
|
|
6333
|
+
`,Lg=l.html`
|
|
6334
6334
|
${e=>{var t,i,o,n,s,a;const r=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",d=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option",c=(null===(a=null===(s=e.styles)||void 0===s?void 0:s.customElements)||void 0===a?void 0:a.optgroup)||"optgroup";return l.html`
|
|
6335
6335
|
<${r}
|
|
6336
6336
|
class="form-select"
|
|
@@ -6361,7 +6361,7 @@
|
|
|
6361
6361
|
`)}
|
|
6362
6362
|
</${r}>
|
|
6363
6363
|
`}}
|
|
6364
|
-
`;let
|
|
6364
|
+
`;let Ng=class extends l.FASTElement{constructor(){super(...arguments),this.fields=[]}connectedCallback(){super.connectedCallback(),$g(this,this.styles,"field")}get groupedFieldss(){return xg(this.fields)}dispatchFieldsChanged(e){e.stopPropagation();const t={fieldId:e.target.value};this.dispatchEvent(new CustomEvent(Sg.FieldSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Ng.prototype,"fields",void 0),(0,C.Cg)([l.observable],Ng.prototype,"field",void 0),(0,C.Cg)([l.observable],Ng.prototype,"config",void 0),(0,C.Cg)([l.observable],Ng.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Ng.prototype,"groupedFieldss",null),Ng=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-field",template:Lg})],Ng);const Fg=l.html`
|
|
6365
6365
|
${e=>{var t,i,o,n,s,a;const r=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",d=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option",c=(null===(a=null===(s=e.styles)||void 0===s?void 0:s.customElements)||void 0===a?void 0:a.optgroup)||"optgroup";return l.html`
|
|
6366
6366
|
<${r}
|
|
6367
6367
|
class="form-select"
|
|
@@ -6394,7 +6394,7 @@
|
|
|
6394
6394
|
`)}
|
|
6395
6395
|
</${r}>
|
|
6396
6396
|
`}}
|
|
6397
|
-
`;let
|
|
6397
|
+
`;let Mg=class extends l.FASTElement{constructor(){super(...arguments),this.operators=[],this.field=null}connectedCallback(){super.connectedCallback(),$g(this,this.styles,"operator")}get allowedOperators(){const e=e=>{var t,i,o;return null===(o=null===(i=null===(t=this.field)||void 0===t?void 0:t.operators)||void 0===i?void 0:i.includes(e.type))||void 0===o||o},t=e=>{var t,i,o,n;return null===(n=null===(i=null===(t=null==e?void 0:e.applyTo)||void 0===t?void 0:t.includes)||void 0===i?void 0:i.call(t,null===(o=this.field)||void 0===o?void 0:o.type))||void 0===n||n};return this.operators.filter(i=>e(i)&&t(i))}get groupedOperators(){return xg(this.allowedOperators)}handleOperatorChange(e){e.stopPropagation();const t={operatorId:e.target.value};this.dispatchEvent(new CustomEvent(Sg.OperatorSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Mg.prototype,"operators",void 0),(0,C.Cg)([l.observable],Mg.prototype,"operator",void 0),(0,C.Cg)([l.observable],Mg.prototype,"field",void 0),(0,C.Cg)([l.observable],Mg.prototype,"config",void 0),(0,C.Cg)([l.observable],Mg.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Mg.prototype,"allowedOperators",null),(0,C.Cg)([l.volatile],Mg.prototype,"groupedOperators",null),Mg=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-operator",template:Fg})],Mg);const _g=e=>["short","int","long"].includes(e),Hg=e=>["double","bigdecimal"].includes(e),Pg=(e,t)=>{var i,o;return null===(o=null===(i=(e=>_g(e)?/^[+-]?[0-9]+$/:Hg(e)?/[+-]?([0-9]*[.])?[0-9]+/:null)(e))||void 0===i?void 0:i.test(t))||void 0===o||o?null:"Invalid number format"},zg=l.css`
|
|
6398
6398
|
.text-input.error {
|
|
6399
6399
|
color: red;
|
|
6400
6400
|
}
|
|
@@ -6403,8 +6403,8 @@
|
|
|
6403
6403
|
display: inline-grid;
|
|
6404
6404
|
align-items: center;
|
|
6405
6405
|
}
|
|
6406
|
-
`,
|
|
6407
|
-
${e=>{var t,i;const o=
|
|
6406
|
+
`,Ug=l.html`
|
|
6407
|
+
${e=>{var t,i;const o=wg(e),n="datetime-local"===o?"datetimeLocal":o,s=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i[n])||"input";return l.html`
|
|
6408
6408
|
<${s}
|
|
6409
6409
|
type="${o}"
|
|
6410
6410
|
class="text-input ${e=>(0,x.x)(["error",e.validationError])}"
|
|
@@ -6412,7 +6412,7 @@
|
|
|
6412
6412
|
@blur=${(e,t)=>e.handleInputChange(t.event)}
|
|
6413
6413
|
/>
|
|
6414
6414
|
`}}
|
|
6415
|
-
`,
|
|
6415
|
+
`,Bg=l.html`
|
|
6416
6416
|
${e=>{var t,i,o,n;const s=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",a=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option";return l.html`
|
|
6417
6417
|
<${s}
|
|
6418
6418
|
class="form-select"
|
|
@@ -6430,7 +6430,7 @@
|
|
|
6430
6430
|
`)}
|
|
6431
6431
|
</${s}>
|
|
6432
6432
|
`}}
|
|
6433
|
-
`,
|
|
6433
|
+
`,Vg=l.html`
|
|
6434
6434
|
${e=>{var t,i;const o=null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.checkbox,n=o||"input";return l.html`
|
|
6435
6435
|
<label>
|
|
6436
6436
|
<${n}
|
|
@@ -6442,15 +6442,15 @@
|
|
|
6442
6442
|
True
|
|
6443
6443
|
</label>
|
|
6444
6444
|
`}}
|
|
6445
|
-
`,Vg=l.html`
|
|
6446
|
-
<div>Input type "${e=>yg(e)}" not yet supported.</div>
|
|
6447
6445
|
`,Gg=l.html`
|
|
6448
|
-
${e=>
|
|
6446
|
+
<div>Input type "${e=>wg(e)}" not yet supported.</div>
|
|
6447
|
+
`,jg=l.html`
|
|
6448
|
+
${e=>{const t=wg(e);return l.html`
|
|
6449
6449
|
<div class="value-and-validation">
|
|
6450
|
-
${(0,l.when)(()=>["text","number","date","datetime-local"].includes(t),
|
|
6451
|
-
${(0,l.when)(()=>"select"===t,
|
|
6452
|
-
${(0,l.when)(()=>"checkbox"===t,
|
|
6453
|
-
${(0,l.when)(()=>!["text","number","select","checkbox","date","datetime-local"].includes(t),
|
|
6450
|
+
${(0,l.when)(()=>["text","number","date","datetime-local"].includes(t),Ug)}
|
|
6451
|
+
${(0,l.when)(()=>"select"===t,Bg)}
|
|
6452
|
+
${(0,l.when)(()=>"checkbox"===t,Vg)}
|
|
6453
|
+
${(0,l.when)(()=>!["text","number","select","checkbox","date","datetime-local"].includes(t),Gg)}
|
|
6454
6454
|
${(0,l.when)(e=>e.validationMsg,l.html`
|
|
6455
6455
|
<p class="validation-msg">${e=>e.validationMsg}</p>
|
|
6456
6456
|
`)}
|
|
@@ -6467,11 +6467,11 @@
|
|
|
6467
6467
|
`}}
|
|
6468
6468
|
`)}
|
|
6469
6469
|
`}}
|
|
6470
|
-
`,
|
|
6471
|
-
${
|
|
6470
|
+
`,Yg=l.html`
|
|
6471
|
+
${Tg(e=>e.field,jg,l.html`
|
|
6472
6472
|
<div>Select a field to set value</div>
|
|
6473
6473
|
`)}
|
|
6474
|
-
`;let
|
|
6474
|
+
`;let Wg=class extends l.FASTElement{constructor(){super(...arguments),this.variadic=!1,this.validationError=!1,this.field=null,this.operator=null}connectedCallback(){super.connectedCallback(),$g(this,this.styles,"value")}validateInput(e){if(!this.field)return null;return["validation"in this.field?this.field.validation(e):null,Pg(Cg(this),e)].filter(e=>!!e).join(", ")||null}handleInputChange(e){e.stopPropagation();const t=e.target;if("checkbox"!==t.type&&"select-one"!==t.type){const e=this.validateInput(t.value);if(e)return this.validationError=!0,void(this.validationMsg=e);this.validationError=!1,this.validationMsg=null}let i;i="checkbox"===t.getAttribute("role")?t.checked:"select-one"===t.type?e.target.value:this.field&&_g(Cg(this))?parseInt(t.value):this.field&&Hg(Cg(this))?parseFloat(t.value):t.value,this.value=i;const o={value:i,index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(Sg.ValueUpdated,{detail:o,bubbles:!0,composed:!0}))}handleRemoveVariadicOperand(){if(!this.variadic)throw new Error("Cannot remove inputs for non-variadic operator");const e={index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(Sg.RemoveVarArg,{detail:e,bubbles:!0,composed:!0}))}};(0,C.Cg)([(0,l.attr)({attribute:"value-index"})],Wg.prototype,"valueIndex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Wg.prototype,"variadic",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"validation-error"})],Wg.prototype,"validationError",void 0),(0,C.Cg)([(0,l.attr)({attribute:"validation-msg"})],Wg.prototype,"validationMsg",void 0),(0,C.Cg)([l.observable],Wg.prototype,"field",void 0),(0,C.Cg)([l.observable],Wg.prototype,"operator",void 0),(0,C.Cg)([l.observable],Wg.prototype,"value",void 0),(0,C.Cg)([l.observable],Wg.prototype,"config",void 0),(0,C.Cg)([l.observable],Wg.prototype,"styles",void 0),Wg=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-value",template:Yg,styles:zg,shadowOptions:{delegatesFocus:!0}})],Wg);const qg=(e,t)=>void 0!==t.field.defaultValue?t.field.defaultValue:Kg(e,t),Kg=(e,t)=>{var i,o;switch(Cg(Object.assign(Object.assign({},t),{operator:e}))){case"string":return"";case"boolean":return!1;case"date":return bg(new Date);case"date-time":return yg(new Date);case"double":case"int":case"bigdecimal":case"short":case"long":return 0;case"enum":{const n="enum"===(null===(i=null==e?void 0:e.valueType)||void 0===i?void 0:i.type)?null===(o=null==e?void 0:e.valueType)||void 0===o?void 0:o.values:"enum"===t.field.type?t.field.values:{};if(0===Object.keys(n).length)throw new Error("Enums require configured values");return Object.keys(n)[0]}}},Xg=(e,t)=>{var i,o,n,s;const a=(r=e,l=t,e=>{var t,i,o;if((null===(t=null==r?void 0:r.valueType)||void 0===t?void 0:t.type)!==(null===(o=null===(i=l.operator)||void 0===i?void 0:i.valueType)||void 0===o?void 0:o.type))return null;if(!("value"in l)||!l.value||!l.operator)return null;const n=1===l.operator.nbInputs?[l.value]:l.value;return e>=n.length?null:n[e]});var r,l;switch(e.nbInputs){case 0:return{field:t.field,operator:e,value:void 0};case 1:return{field:t.field,operator:e,value:null!==(i=a(0))&&void 0!==i?i:qg(e,t)};case 2:return{field:t.field,operator:e,value:[null!==(o=a(0))&&void 0!==o?o:qg(e,t),null!==(n=a(1))&&void 0!==n?n:qg(e,t)]};case"many":return{field:t.field,operator:e,value:[null!==(s=a(0))&&void 0!==s?s:qg(e,t)]}}},Jg=(e,t,i)=>{switch(e.operator.nbInputs){case 0:throw new Error("Cannot set the value for a UniraryOperator");case 1:return{field:e.field,operator:e.operator,value:t};case 2:case"many":if(!("value"in e)||!Array.isArray(e.value))throw new Error("Invalid value shape for rule");return{field:e.field,operator:e.operator,value:e.value.map((e,o)=>o===i?t:e)}}},Qg=e=>!e&&0!==e,Zg=l.css`
|
|
6475
6475
|
.rule-container {
|
|
6476
6476
|
border: 1px solid #eee;
|
|
6477
6477
|
margin-bottom: 5px;
|
|
@@ -6530,7 +6530,7 @@
|
|
|
6530
6530
|
expression-rule-value {
|
|
6531
6531
|
display: flex;
|
|
6532
6532
|
}
|
|
6533
|
-
`,
|
|
6533
|
+
`,ev=l.html`
|
|
6534
6534
|
${e=>{var t,i;const o=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.button)||"button";return l.html`
|
|
6535
6535
|
<div class="rule-container ${e=>(0,x.x)(["error",e.error])}">
|
|
6536
6536
|
<div class="rule-content">
|
|
@@ -6590,11 +6590,11 @@ class="margin"
|
|
|
6590
6590
|
</div>
|
|
6591
6591
|
</div>
|
|
6592
6592
|
`}}
|
|
6593
|
-
`;let ev=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),xg(this,this.styles,"rule"),this.config.partialRuleValidationWarning&&(this.error=(e=>{if(!e.field||!e.operator)return!0;if(0===e.operator.nbInputs)return!1;if(!("value"in e))throw new Error("No value set as required for operator");return"boolean"!==wg(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(Jg)})(this.model))}variadicRule(e){return"many"===e.operator.nbInputs&&"value"in e&&Array.isArray(e.value)}get operandIterator(){var e,t,i;if("many"===(null===(e=this.model.operator)||void 0===e?void 0:e.nbInputs)){if(!this.variadicRule(this.model))throw new Error("Varargs disabled for many nbInputs");return Array(this.model.value.length).fill(!0)}return Array(null!==(i=null===(t=this.model.operator)||void 0===t?void 0:t.nbInputs)&&void 0!==i?i:0).fill(!0)}operandValue(e){if(this.model.operator){if(1===this.model.operator.nbInputs&&"value"in this.model)return this.model.value;if((2===this.model.operator.nbInputs||"many"===this.model.operator.nbInputs)&&"value"in this.model&&Array.isArray(this.model.value))return this.model.value[e];throw new Error("Invalid operand lookup")}}dispatchAddVarArg(){if(!this.variadicRule(this.model))throw new Error("Cannot add inputs for non-variadic operator, or invalid format");const e={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:[...this.model.value,Wg(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent($g.UpdateRule,{detail:e,bubbles:!0,composed:!0}))}handleRemoveVarArg(e){const{index:t}=e.detail;if(!this.variadicRule(this.model))throw new Error("Cannot remove inputs for non-variadic operator, or invalid format");const i={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:this.model.value.filter((e,i)=>i!==t)}};this.dispatchEvent(new CustomEvent($g.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent($g.DelRule,{detail:t,bubbles:!0,composed:!0}))}handleFieldSelected(e){var t;e.stopPropagation();const{fieldId:i}=e.detail,o=null!==(t=this.config.fields.find(e=>e.fieldId===i))&&void 0!==t?t:null,n={ruleId:this.model.ruleId,newData:{field:o,value:null,operator:null}};this.dispatchEvent(new CustomEvent($g.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:Xg(this.model,t,i)};this.dispatchEvent(new CustomEvent($g.UpdateRule,{detail:o,bubbles:!0,composed:!0}))}handleOperatorSelected(e){var t;e.stopPropagation();const{operatorId:i}=e.detail;if(!i)return;const o=null!==(t=this.config.operators.find(e=>e.type===i))&&void 0!==t?t:null;if(!o)throw new Error(`Unable to find operator of type ${i}`);this.dispatchEvent(new CustomEvent($g.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:Kg(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],ev.prototype,"config",void 0),(0,C.Cg)([l.observable],ev.prototype,"styles",void 0),(0,C.Cg)([l.observable],ev.prototype,"model",void 0),(0,C.Cg)([l.observable],ev.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ev.prototype,"error",void 0),(0,C.Cg)([l.volatile],ev.prototype,"operandIterator",null),ev=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:Zg,styles:Qg,shadowOptions:{delegatesFocus:!0}})],ev);let tv=class extends l.FASTElement{constructor(){super(...arguments),this.model=null,this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!1,this.handleAddGroup=this._handleAddGroup.bind(this),this.handleAddRule=this._handleAddRule.bind(this),this.handleDeleteGroup=this._handleDeleteGroup.bind(this),this.handleDeleteRule=this._handleDeleteRule.bind(this),this.handleUpdateGroupData=this._handleUpdateGroupData.bind(this),this.handleUpdateRuleData=this._handleUpdateRuleData.bind(this)}configChanged(e,t){this.isValidConfig(t)?t.model?(this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!0,this.model=gg(t.model,this),this.userUpdatingModel=!1):null===this.model&&this.initBaseModel():console.warn("Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.")}modelChanged(e,t){if(!t||this.userUpdatingModel)return;const i=vg(t);this.dispatchChangeEvent(i)}dispatchChangeEvent(e){this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))}getConfig(){return this.config}getGroupId(){return this.groupCount+=1,`group-${this.groupCount}`}getRuleId(){return this.ruleCount+=1,`rule-${this.ruleCount}`}connectedCallback(){if(super.connectedCallback(),this.addEventListener($g.AddGroup,this.handleAddGroup),this.addEventListener($g.DelGroup,this.handleDeleteGroup),this.addEventListener($g.AddRule,this.handleAddRule),this.addEventListener($g.DelRule,this.handleDeleteRule),this.addEventListener($g.UpdateGroup,this.handleUpdateGroupData),this.addEventListener($g.UpdateRule,this.handleUpdateRuleData),!this.isValidConfig(this.config))return this.config&&console.warn("Config detected during connectedCallback but it isn't valid"),void(this.config=null);this.config.model||this.initBaseModel()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener($g.AddGroup,this.handleAddGroup),this.removeEventListener($g.DelGroup,this.handleDeleteGroup),this.removeEventListener($g.AddRule,this.handleAddRule),this.removeEventListener($g.DelRule,this.handleDeleteRule),this.removeEventListener($g.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener($g.UpdateRule,this.handleUpdateRuleData)}isValidConfig(e){var t,i,o;return Boolean(e&&(null===(t=e.combinators)||void 0===t?void 0:t.length)&&(null===(i=e.operators)||void 0===i?void 0:i.length)&&(null===(o=e.fields)||void 0===o?void 0:o.length))}initBaseModel(){if(!this.isValidConfig(this.config))throw new Error("Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.");this.model={children:[],level:1,groupId:mg,config:this.config,combinator:this.config.combinators[0]}}_handleAddGroup(e){const{parentGroupId:t,newGroup:i}=e.detail,o={groupId:this.getGroupId(),level:i.level,children:[],config:this.config,combinator:this.config.combinators[0]};this.model=pg(this.model,t,o)}_handleAddRule(e){const{parentGroupId:t}=e.detail,i={ruleId:this.getRuleId(),config:this.config,field:null,operator:null,value:null};this.model=pg(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=dg(i=this.model,ug(i,o=t).groupId,e=>e.filter(e=>!("groupId"in e)||e.groupId!==o))}_handleDeleteRule(e){const{ruleId:t}=e.detail;var i,o;this.model=dg(i=this.model,hg(i,o=t).groupId,e=>e.filter(e=>!("ruleId"in e)||e.ruleId!==o))}_handleUpdateGroupData(e){const{groupId:t,newData:i}=e.detail;this.model=function(e,t,i){return t===mg?Object.assign(Object.assign({},e),i):dg(e,ug(e,t).groupId,e=>e.map(e=>"groupId"in e&&e.groupId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}_handleUpdateRuleData(e){const{ruleId:t,newData:i}=e.detail;this.model=function(e,t,i){return dg(e,hg(e,t).groupId,e=>e.map(e=>"ruleId"in e&&e.ruleId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}};(0,C.Cg)([l.observable],tv.prototype,"config",void 0),(0,C.Cg)([l.observable],tv.prototype,"styles",void 0),(0,C.Cg)([l.observable],tv.prototype,"model",void 0),tv=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:Rg,styles:Sg})],tv);let iv=class extends tv{};iv=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:Sg,template:Rg})],iv);const ov=["int","short","long"],nv=["double","bigdecimal"],sv=[...ov,...nv],av=["date","date-time"],rv=["string","enum"],lv=["boolean"],dv=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type};function cv(e){switch(dv(e)){case"int":case"long":case"double":case"bigdecimal":case"date":case"date-time":case"short":return"NUMBER";case"string":case"enum":return"STRING";case"boolean":return"BOOLEAN"}}function uv(e,t,i){return"value"in e?{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:{TYPE:i,VALUE:e.value}}:null}function hv(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function pv(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function mv(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=dv(e);if(rv.includes(i))return t;if(sv.includes(i))return t.toString();if(lv.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(av.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function gv(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?gv(e,t):t(e)).filter(Boolean)}}function vv(e,t){const i=e.operator.nbInputs;if("many"===i||2===i)throw new Error("Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue");return Object.assign(Object.assign({},e),0===i?{}:{value:(t=>{const i=dv(e);if(rv.includes(i))return t;if(ov.includes(i))return parseInt(t);if(nv.includes(i))return parseFloat(t);if(lv.includes(i))return t;if(av.includes(i)){const e=new Date(parseInt(t));return"date"===i?fg(e):bg(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const fv={template:Rg,styles:Sg};var bv;!function(e){e.methodCall={CONTAINS_IGNORE_CASE:"CONTAINS_IGNORE_CASE",CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE:"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",TRIM:"TRIM",LONG_TO_DATE:"LONG_TO_DATE",LONG_TO_DATE_TIME:"LONG_TO_DATE_TIME",DATE_TIME_IS_IN_RANGE:"DATE_TIME_IS_IN_RANGE"},e.logicalOperations={AND:"AND",OR:"OR"},e.operations=Object.assign(Object.assign({},e.logicalOperations),{GREATER_THAN:"GREATER_THAN",LESS_THAN:"LESS_THAN",GREATER_THAN_OR_EQUAL:"GREATER_THAN_OR_EQUAL",LESS_THAN_OR_EQUAL:"LESS_THAN_OR_EQUAL",EQUALS:"EQUALS",NOT_EQUALS:"NOT_EQUALS",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",BITWISE_AND:"BITWISE_AND",BITWISE_OR:"BITWISE_OR",ASSIGNMENT:"ASSIGNMENT",IS_CURRENT:"IS_CURRENT",IS_PREVIOUS:"IS_PREVIOUS"})}(bv||(bv={}));const yv=[{type:bv.logicalOperations.AND,maxRules:"many"},{type:bv.logicalOperations.OR,maxRules:"many"}],wv={EQUALS:bv.operations.EQUALS,NOT_EQUALS:bv.operations.NOT_EQUALS,IS_NULL:"IS_NULL",NOT_NULL:"NOT_NULL",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",CONTAINS:"CONTAINS",CONTAINS_WORDS_STARTING_WITH:"CONTAINS_WORDS_STARTING_WITH",CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:"CONTAINS_WORDS_STARTING_SPLIT_DELIMITER",GREATER_THAN:bv.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:bv.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:bv.operations.LESS_THAN,LESS_THAN_OR_EQUAL:bv.operations.LESS_THAN_OR_EQUAL,IS_BEFORE:"IS_BEFORE",IS_AFTER:"IS_AFTER",ON_OR_BEFORE:"ON_OR_BEFORE",ON_OR_AFTER:"ON_OR_AFTER",IS_CURRENT:bv.operations.IS_CURRENT,IS_PREVIOUS:bv.operations.IS_PREVIOUS},Cv=e=>({type:"enum",input:"select",values:e}),xv=Cv({HOUR:{label:"Hour",tooltip:"Beginning of the hour immediately preceding the current one to the current hour."},DAY:{label:"Day",tooltip:"Midnight on the day before today to midnight of the current day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the day before today to midnight of the current day. If the current day is Monday then the previous day is Friday."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the previous week to midnight on the Monday of the current week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the previous month to midnight on the 1st of the current month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the previous year to midnight on the 1st Jan of the current year."}}),$v=Cv({HOUR:{label:"Hour",tooltip:"Beginning of the current hour to beginning of the next hour."},DAY:{label:"Day",tooltip:"Midnight on the current day day to midnight of the next day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the current day day to midnight of the next day. This filter will never match Sat or Sun, always returning false on the weekends."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the current week to midnight on the Monday of the next week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the current month to midnight on the 1st of the next month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the current year to midnight on the 1st Jan of the next year."}}),Sv=[{type:wv.EQUALS,label:"Equals",nbInputs:1,applyTo:[...rv,...lv,...sv,...av],tooltip:"Check the equality of the field compared to a set value"},{type:wv.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...rv,...lv,...sv,...av],tooltip:"Check that the field is different from a set value"},{type:wv.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...lv,...sv,...av],tooltip:"Check if the field value is null"},{type:wv.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...lv,...sv,...av],tooltip:"Check if the field value is not null"},{type:wv.IS_NULL_OR_BLANK,label:"Is null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is null or an empty string"},{type:wv.NOT_NULL_OR_BLANK,label:"Not null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is not null and not an empty string"},{type:wv.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:wv.CONTAINS_WORDS_STARTING_WITH,label:"Contains words starting with",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains words that start with the specified text, split by whitespace (case insensitive)"},{type:wv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER,label:"Contains words starting with (split)",nbInputs:2,applyTo:["string"],tooltip:"Check if field contains words starting with text, split by a delimiter (case insensitive)"},{type:wv.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...sv],tooltip:"Check if the field value is greater than a specified number"},{type:wv.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...sv],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:wv.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...sv],tooltip:"Check if the field value is less than a specified number"},{type:wv.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...sv],tooltip:"Check if the field value is less than or equal to a specified number"},{type:wv.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...av],tooltip:"Check if the field is before a specified date/time"},{type:wv.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...av],tooltip:"Check if the field is after a specified date/time"},{type:wv.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...av],tooltip:"Check if the field is on or before a specified date/time"},{type:wv.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...av],tooltip:"Check if the field is on or after a specified date/time"},{type:wv.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...av],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:$v,optgroup:"Relative Period"},{type:wv.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...av],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:xv,optgroup:"Relative Period"}];function Ev(e){switch(e){case"IS_BEFORE":return"LESS_THAN";case"IS_AFTER":return"GREATER_THAN";case"ON_OR_BEFORE":return"LESS_THAN_OR_EQUAL";case"ON_OR_AFTER":return"GREATER_THAN_OR_EQUAL";default:return e}}function Ov(e,t){switch(t){case wv.IS_NULL_OR_BLANK:return pv(e,bv.methodCall.IS_NULL_OR_BLANK,[]);case wv.NOT_NULL_OR_BLANK:return pv(e,bv.methodCall.NOT_NULL_OR_BLANK,[]);case wv.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return pv(e,bv.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case wv.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return pv(e,bv.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case wv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:if(!("value"in e)||!Array.isArray(e.value)||2!==e.value.length)throw new Error("Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER");return pv(e,bv.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case wv.IS_CURRENT:case wv.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return pv(e,bv.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===wv.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function Tv(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=mv(e),n=cv(o),s=Ev(o.operator.type);switch(s){case wv.EQUALS:case wv.NOT_EQUALS:case wv.GREATER_THAN:case wv.GREATER_THAN_OR_EQUAL:case wv.LESS_THAN:case wv.LESS_THAN_OR_EQUAL:return uv(o,s,n);case wv.IS_NULL:return hv(o,bv.operations.EQUALS,{TYPE:"NULL"});case wv.NOT_NULL:return hv(o,bv.operations.NOT_EQUALS,{TYPE:"NULL"});case wv.IS_NULL_OR_BLANK:case wv.NOT_NULL_OR_BLANK:case wv.CONTAINS:case wv.CONTAINS_WORDS_STARTING_WITH:case wv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case wv.IS_CURRENT:case wv.IS_PREVIOUS:return Ov(o,s);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function kv(e,t){if(!("date"===t.field.type||"date-time"===t.field.type))return e;switch(e){case"LESS_THAN":return"IS_BEFORE";case"GREATER_THAN":return"IS_AFTER";case"LESS_THAN_OR_EQUAL":return"ON_OR_BEFORE";case"GREATER_THAN_OR_EQUAL":return"ON_OR_AFTER";default:return e}}function Dv(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?wv[wv.IS_NULL]:wv[wv.NOT_NULL];return Sv.find(t=>t.type===e)}const i=kv(t.OPERATION,e);return Sv.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function Iv(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return vv(Dv({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Rv(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[wv[wv.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[wv[wv.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[wv[wv.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[wv[wv.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[wv[wv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===bv.methodCall.DATE_TIME_IS_IN_RANGE&&3===t.PARAMETERS.length&&"STRING"===t.PARAMETERS[2].TYPE&&("CURRENT"===t.PARAMETERS[2].VALUE||"PREVIOUS"===t.PARAMETERS[2].VALUE):return[wv["CURRENT"===t.PARAMETERS[2].VALUE?wv.IS_CURRENT:wv.IS_PREVIOUS],t.PARAMETERS[1].VALUE];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:Sv.find(e=>e.type===i),value:o}}function Av(e,t){return{combinator:yv.find(e=>e.type===t.OPERATION),children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Av(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Iv(e,t);if("METHOD_EXPRESSION"===t.TYPE)return Rv(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Lv=class extends tv{ruleConfigChanged(e,t){this.config=Object.assign({combinators:yv,operators:Sv,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Av(t.fields,t.model)}:{})}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the ruleConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){const t=gv(e,Tv);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Lv.prototype,"ruleConfig",void 0),Lv=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:Sg,template:Rg})],Lv);const Fv={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},Nv=[{type:Fv.PLUS,label:"Add (+)",applyTo:[...sv],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:Fv.MINUS,label:"Subtract (-)",applyTo:[...sv],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:Fv.MULTIPLY,label:"Multiply (*)",applyTo:[...sv],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:Fv.DIVIDE,label:"Divide (/)",applyTo:[...sv],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:Fv.CONVERT_TO_DATE,label:"Convert to date",applyTo:["date"],nbInputs:0,tooltip:"Returns the date, which is stored as the epoch time, as a formatted date YYYY/dd/mm"},{type:Fv.CONVERT_TO_DATE_TIME,label:"Convert to date time",applyTo:["date-time"],nbInputs:0,tooltip:"Returns the date-time, which is stored as the epoch time, as a formatted date YYYY/dd/mm HH:mm:ss"}];function Mv(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=mv(e),n=cv(o),s=o.operator.type;switch(s){case Fv.TRIM:case Fv.CONVERT_TO_DATE:case Fv.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case Fv.TRIM:return pv(e,bv.methodCall.TRIM,[]);case Fv.CONVERT_TO_DATE:return pv(e,bv.methodCall.LONG_TO_DATE,[]);case Fv.CONVERT_TO_DATE_TIME:return pv(e,bv.methodCall.LONG_TO_DATE_TIME,[])}}(o,s);case Fv.PLUS:case Fv.MINUS:case Fv.DIVIDE:case Fv.MULTIPLY:return uv(o,s,n);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function _v(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return vv(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return Nv.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Hv(e,t){return{combinator:ig,children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Hv(e,t);if("BINARY_EXPRESSION"===t.TYPE)return _v(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[Fv[Fv.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[Fv[Fv.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[Fv[Fv.CONVERT_TO_DATE_TIME],void 0];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:Nv.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Pv=class extends tv{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Hv(t.fields,i);this.config={combinators:[ig],operators:Nv,fields:t.fields,model:o,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning}}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the valueConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){if(!("children"in e))throw new Error("Invalid top level group hierarchy");if(e.children.length>1)throw new Error("Value expressions should not have multiple rules");if(e.children[0]&&"children"in e.children[0])throw new Error("Trying to convert group to rule");const t=0===e.children.length?void 0:Mv(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Pv.prototype,"valueConfig",void 0),Pv=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:Sg,template:Rg})],Pv);const zv=l.html`
|
|
6593
|
+
`;let tv=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),$g(this,this.styles,"rule"),this.config.partialRuleValidationWarning&&(this.error=(e=>{if(!e.field||!e.operator)return!0;if(0===e.operator.nbInputs)return!1;if(!("value"in e))throw new Error("No value set as required for operator");return"boolean"!==Cg(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(Qg)})(this.model))}variadicRule(e){return"many"===e.operator.nbInputs&&"value"in e&&Array.isArray(e.value)}get operandIterator(){var e,t,i;if("many"===(null===(e=this.model.operator)||void 0===e?void 0:e.nbInputs)){if(!this.variadicRule(this.model))throw new Error("Varargs disabled for many nbInputs");return Array(this.model.value.length).fill(!0)}return Array(null!==(i=null===(t=this.model.operator)||void 0===t?void 0:t.nbInputs)&&void 0!==i?i:0).fill(!0)}operandValue(e){if(this.model.operator){if(1===this.model.operator.nbInputs&&"value"in this.model)return this.model.value;if((2===this.model.operator.nbInputs||"many"===this.model.operator.nbInputs)&&"value"in this.model&&Array.isArray(this.model.value))return this.model.value[e];throw new Error("Invalid operand lookup")}}dispatchAddVarArg(){if(!this.variadicRule(this.model))throw new Error("Cannot add inputs for non-variadic operator, or invalid format");const e={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:[...this.model.value,qg(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(Sg.UpdateRule,{detail:e,bubbles:!0,composed:!0}))}handleRemoveVarArg(e){const{index:t}=e.detail;if(!this.variadicRule(this.model))throw new Error("Cannot remove inputs for non-variadic operator, or invalid format");const i={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:this.model.value.filter((e,i)=>i!==t)}};this.dispatchEvent(new CustomEvent(Sg.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(Sg.DelRule,{detail:t,bubbles:!0,composed:!0}))}handleFieldSelected(e){var t;e.stopPropagation();const{fieldId:i}=e.detail,o=null!==(t=this.config.fields.find(e=>e.fieldId===i))&&void 0!==t?t:null,n={ruleId:this.model.ruleId,newData:{field:o,value:null,operator:null}};this.dispatchEvent(new CustomEvent(Sg.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:Jg(this.model,t,i)};this.dispatchEvent(new CustomEvent(Sg.UpdateRule,{detail:o,bubbles:!0,composed:!0}))}handleOperatorSelected(e){var t;e.stopPropagation();const{operatorId:i}=e.detail;if(!i)return;const o=null!==(t=this.config.operators.find(e=>e.type===i))&&void 0!==t?t:null;if(!o)throw new Error(`Unable to find operator of type ${i}`);this.dispatchEvent(new CustomEvent(Sg.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:Xg(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],tv.prototype,"config",void 0),(0,C.Cg)([l.observable],tv.prototype,"styles",void 0),(0,C.Cg)([l.observable],tv.prototype,"model",void 0),(0,C.Cg)([l.observable],tv.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],tv.prototype,"error",void 0),(0,C.Cg)([l.volatile],tv.prototype,"operandIterator",null),tv=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:ev,styles:Zg,shadowOptions:{delegatesFocus:!0}})],tv);let iv=class extends l.FASTElement{constructor(){super(...arguments),this.model=null,this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!1,this.handleAddGroup=this._handleAddGroup.bind(this),this.handleAddRule=this._handleAddRule.bind(this),this.handleDeleteGroup=this._handleDeleteGroup.bind(this),this.handleDeleteRule=this._handleDeleteRule.bind(this),this.handleUpdateGroupData=this._handleUpdateGroupData.bind(this),this.handleUpdateRuleData=this._handleUpdateRuleData.bind(this)}configChanged(e,t){this.isValidConfig(t)?t.model?(this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!0,this.model=vg(t.model,this),this.userUpdatingModel=!1):null===this.model&&this.initBaseModel():console.warn("Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.")}modelChanged(e,t){if(!t||this.userUpdatingModel)return;const i=fg(t);this.dispatchChangeEvent(i)}dispatchChangeEvent(e){this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))}getConfig(){return this.config}getGroupId(){return this.groupCount+=1,`group-${this.groupCount}`}getRuleId(){return this.ruleCount+=1,`rule-${this.ruleCount}`}connectedCallback(){if(super.connectedCallback(),this.addEventListener(Sg.AddGroup,this.handleAddGroup),this.addEventListener(Sg.DelGroup,this.handleDeleteGroup),this.addEventListener(Sg.AddRule,this.handleAddRule),this.addEventListener(Sg.DelRule,this.handleDeleteRule),this.addEventListener(Sg.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(Sg.UpdateRule,this.handleUpdateRuleData),!this.isValidConfig(this.config))return this.config&&console.warn("Config detected during connectedCallback but it isn't valid"),void(this.config=null);this.config.model||this.initBaseModel()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Sg.AddGroup,this.handleAddGroup),this.removeEventListener(Sg.DelGroup,this.handleDeleteGroup),this.removeEventListener(Sg.AddRule,this.handleAddRule),this.removeEventListener(Sg.DelRule,this.handleDeleteRule),this.removeEventListener(Sg.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(Sg.UpdateRule,this.handleUpdateRuleData)}isValidConfig(e){var t,i,o;return Boolean(e&&(null===(t=e.combinators)||void 0===t?void 0:t.length)&&(null===(i=e.operators)||void 0===i?void 0:i.length)&&(null===(o=e.fields)||void 0===o?void 0:o.length))}initBaseModel(){if(!this.isValidConfig(this.config))throw new Error("Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.");this.model={children:[],level:1,groupId:gg,config:this.config,combinator:this.config.combinators[0]}}_handleAddGroup(e){const{parentGroupId:t,newGroup:i}=e.detail,o={groupId:this.getGroupId(),level:i.level,children:[],config:this.config,combinator:this.config.combinators[0]};this.model=mg(this.model,t,o)}_handleAddRule(e){const{parentGroupId:t}=e.detail,i={ruleId:this.getRuleId(),config:this.config,field:null,operator:null,value:null};this.model=mg(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=cg(i=this.model,hg(i,o=t).groupId,e=>e.filter(e=>!("groupId"in e)||e.groupId!==o))}_handleDeleteRule(e){const{ruleId:t}=e.detail;var i,o;this.model=cg(i=this.model,pg(i,o=t).groupId,e=>e.filter(e=>!("ruleId"in e)||e.ruleId!==o))}_handleUpdateGroupData(e){const{groupId:t,newData:i}=e.detail;this.model=function(e,t,i){return t===gg?Object.assign(Object.assign({},e),i):cg(e,hg(e,t).groupId,e=>e.map(e=>"groupId"in e&&e.groupId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}_handleUpdateRuleData(e){const{ruleId:t,newData:i}=e.detail;this.model=function(e,t,i){return cg(e,pg(e,t).groupId,e=>e.map(e=>"ruleId"in e&&e.ruleId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}};(0,C.Cg)([l.observable],iv.prototype,"config",void 0),(0,C.Cg)([l.observable],iv.prototype,"styles",void 0),(0,C.Cg)([l.observable],iv.prototype,"model",void 0),iv=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:Ag,styles:Eg})],iv);let ov=class extends iv{};ov=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:Eg,template:Ag})],ov);const nv=["int","short","long"],sv=["double","bigdecimal"],av=[...nv,...sv],rv=["date","date-time"],lv=["string","enum"],dv=["boolean"],cv=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type};function uv(e){switch(cv(e)){case"int":case"long":case"double":case"bigdecimal":case"date":case"date-time":case"short":return"NUMBER";case"string":case"enum":return"STRING";case"boolean":return"BOOLEAN"}}function hv(e,t,i){return"value"in e?{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:{TYPE:i,VALUE:e.value}}:null}function pv(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function mv(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function gv(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=cv(e);if(lv.includes(i))return t;if(av.includes(i))return t.toString();if(dv.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(rv.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function vv(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?vv(e,t):t(e)).filter(Boolean)}}function fv(e,t){const i=e.operator.nbInputs;if("many"===i||2===i)throw new Error("Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue");return Object.assign(Object.assign({},e),0===i?{}:{value:(t=>{const i=cv(e);if(lv.includes(i))return t;if(nv.includes(i))return parseInt(t);if(sv.includes(i))return parseFloat(t);if(dv.includes(i))return t;if(rv.includes(i)){const e=new Date(parseInt(t));return"date"===i?bg(e):yg(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const bv={template:Ag,styles:Eg};var yv;!function(e){e.methodCall={CONTAINS_IGNORE_CASE:"CONTAINS_IGNORE_CASE",CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE:"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",TRIM:"TRIM",LONG_TO_DATE:"LONG_TO_DATE",LONG_TO_DATE_TIME:"LONG_TO_DATE_TIME",DATE_TIME_IS_IN_RANGE:"DATE_TIME_IS_IN_RANGE"},e.logicalOperations={AND:"AND",OR:"OR"},e.operations=Object.assign(Object.assign({},e.logicalOperations),{GREATER_THAN:"GREATER_THAN",LESS_THAN:"LESS_THAN",GREATER_THAN_OR_EQUAL:"GREATER_THAN_OR_EQUAL",LESS_THAN_OR_EQUAL:"LESS_THAN_OR_EQUAL",EQUALS:"EQUALS",NOT_EQUALS:"NOT_EQUALS",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",BITWISE_AND:"BITWISE_AND",BITWISE_OR:"BITWISE_OR",ASSIGNMENT:"ASSIGNMENT",IS_CURRENT:"IS_CURRENT",IS_PREVIOUS:"IS_PREVIOUS"})}(yv||(yv={}));const wv=[{type:yv.logicalOperations.AND,maxRules:"many"},{type:yv.logicalOperations.OR,maxRules:"many"}],Cv={EQUALS:yv.operations.EQUALS,NOT_EQUALS:yv.operations.NOT_EQUALS,IS_NULL:"IS_NULL",NOT_NULL:"NOT_NULL",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",CONTAINS:"CONTAINS",CONTAINS_WORDS_STARTING_WITH:"CONTAINS_WORDS_STARTING_WITH",CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:"CONTAINS_WORDS_STARTING_SPLIT_DELIMITER",GREATER_THAN:yv.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:yv.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:yv.operations.LESS_THAN,LESS_THAN_OR_EQUAL:yv.operations.LESS_THAN_OR_EQUAL,IS_BEFORE:"IS_BEFORE",IS_AFTER:"IS_AFTER",ON_OR_BEFORE:"ON_OR_BEFORE",ON_OR_AFTER:"ON_OR_AFTER",IS_CURRENT:yv.operations.IS_CURRENT,IS_PREVIOUS:yv.operations.IS_PREVIOUS},xv=e=>({type:"enum",input:"select",values:e}),$v=xv({HOUR:{label:"Hour",tooltip:"Beginning of the hour immediately preceding the current one to the current hour."},DAY:{label:"Day",tooltip:"Midnight on the day before today to midnight of the current day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the day before today to midnight of the current day. If the current day is Monday then the previous day is Friday."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the previous week to midnight on the Monday of the current week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the previous month to midnight on the 1st of the current month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the previous year to midnight on the 1st Jan of the current year."}}),Sv=xv({HOUR:{label:"Hour",tooltip:"Beginning of the current hour to beginning of the next hour."},DAY:{label:"Day",tooltip:"Midnight on the current day day to midnight of the next day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the current day day to midnight of the next day. This filter will never match Sat or Sun, always returning false on the weekends."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the current week to midnight on the Monday of the next week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the current month to midnight on the 1st of the next month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the current year to midnight on the 1st Jan of the next year."}}),Ev=[{type:Cv.EQUALS,label:"Equals",nbInputs:1,applyTo:[...lv,...dv,...av,...rv],tooltip:"Check the equality of the field compared to a set value"},{type:Cv.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...lv,...dv,...av,...rv],tooltip:"Check that the field is different from a set value"},{type:Cv.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...dv,...av,...rv],tooltip:"Check if the field value is null"},{type:Cv.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...dv,...av,...rv],tooltip:"Check if the field value is not null"},{type:Cv.IS_NULL_OR_BLANK,label:"Is null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is null or an empty string"},{type:Cv.NOT_NULL_OR_BLANK,label:"Not null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is not null and not an empty string"},{type:Cv.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:Cv.CONTAINS_WORDS_STARTING_WITH,label:"Contains words starting with",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains words that start with the specified text, split by whitespace (case insensitive)"},{type:Cv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER,label:"Contains words starting with (split)",nbInputs:2,applyTo:["string"],tooltip:"Check if field contains words starting with text, split by a delimiter (case insensitive)"},{type:Cv.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...av],tooltip:"Check if the field value is greater than a specified number"},{type:Cv.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...av],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:Cv.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...av],tooltip:"Check if the field value is less than a specified number"},{type:Cv.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...av],tooltip:"Check if the field value is less than or equal to a specified number"},{type:Cv.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...rv],tooltip:"Check if the field is before a specified date/time"},{type:Cv.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...rv],tooltip:"Check if the field is after a specified date/time"},{type:Cv.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...rv],tooltip:"Check if the field is on or before a specified date/time"},{type:Cv.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...rv],tooltip:"Check if the field is on or after a specified date/time"},{type:Cv.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...rv],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:Sv,optgroup:"Relative Period"},{type:Cv.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...rv],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:$v,optgroup:"Relative Period"}];function Ov(e){switch(e){case"IS_BEFORE":return"LESS_THAN";case"IS_AFTER":return"GREATER_THAN";case"ON_OR_BEFORE":return"LESS_THAN_OR_EQUAL";case"ON_OR_AFTER":return"GREATER_THAN_OR_EQUAL";default:return e}}function Tv(e,t){switch(t){case Cv.IS_NULL_OR_BLANK:return mv(e,yv.methodCall.IS_NULL_OR_BLANK,[]);case Cv.NOT_NULL_OR_BLANK:return mv(e,yv.methodCall.NOT_NULL_OR_BLANK,[]);case Cv.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return mv(e,yv.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case Cv.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return mv(e,yv.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case Cv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:if(!("value"in e)||!Array.isArray(e.value)||2!==e.value.length)throw new Error("Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER");return mv(e,yv.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case Cv.IS_CURRENT:case Cv.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return mv(e,yv.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===Cv.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function kv(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=gv(e),n=uv(o),s=Ov(o.operator.type);switch(s){case Cv.EQUALS:case Cv.NOT_EQUALS:case Cv.GREATER_THAN:case Cv.GREATER_THAN_OR_EQUAL:case Cv.LESS_THAN:case Cv.LESS_THAN_OR_EQUAL:return hv(o,s,n);case Cv.IS_NULL:return pv(o,yv.operations.EQUALS,{TYPE:"NULL"});case Cv.NOT_NULL:return pv(o,yv.operations.NOT_EQUALS,{TYPE:"NULL"});case Cv.IS_NULL_OR_BLANK:case Cv.NOT_NULL_OR_BLANK:case Cv.CONTAINS:case Cv.CONTAINS_WORDS_STARTING_WITH:case Cv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case Cv.IS_CURRENT:case Cv.IS_PREVIOUS:return Tv(o,s);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Dv(e,t){if(!("date"===t.field.type||"date-time"===t.field.type))return e;switch(e){case"LESS_THAN":return"IS_BEFORE";case"GREATER_THAN":return"IS_AFTER";case"LESS_THAN_OR_EQUAL":return"ON_OR_BEFORE";case"GREATER_THAN_OR_EQUAL":return"ON_OR_AFTER";default:return e}}function Iv(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?Cv[Cv.IS_NULL]:Cv[Cv.NOT_NULL];return Ev.find(t=>t.type===e)}const i=Dv(t.OPERATION,e);return Ev.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function Rv(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return fv(Iv({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Av(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[Cv[Cv.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[Cv[Cv.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[Cv[Cv.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[Cv[Cv.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[Cv[Cv.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===yv.methodCall.DATE_TIME_IS_IN_RANGE&&3===t.PARAMETERS.length&&"STRING"===t.PARAMETERS[2].TYPE&&("CURRENT"===t.PARAMETERS[2].VALUE||"PREVIOUS"===t.PARAMETERS[2].VALUE):return[Cv["CURRENT"===t.PARAMETERS[2].VALUE?Cv.IS_CURRENT:Cv.IS_PREVIOUS],t.PARAMETERS[1].VALUE];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:Ev.find(e=>e.type===i),value:o}}function Lv(e,t){return{combinator:wv.find(e=>e.type===t.OPERATION),children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Lv(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Rv(e,t);if("METHOD_EXPRESSION"===t.TYPE)return Av(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Nv=class extends iv{ruleConfigChanged(e,t){this.config=Object.assign({combinators:wv,operators:Ev,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Lv(t.fields,t.model)}:{})}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the ruleConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){const t=vv(e,kv);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Nv.prototype,"ruleConfig",void 0),Nv=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:Eg,template:Ag})],Nv);const Fv={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},Mv=[{type:Fv.PLUS,label:"Add (+)",applyTo:[...av],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:Fv.MINUS,label:"Subtract (-)",applyTo:[...av],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:Fv.MULTIPLY,label:"Multiply (*)",applyTo:[...av],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:Fv.DIVIDE,label:"Divide (/)",applyTo:[...av],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:Fv.CONVERT_TO_DATE,label:"Convert to date",applyTo:["date"],nbInputs:0,tooltip:"Returns the date, which is stored as the epoch time, as a formatted date YYYY/dd/mm"},{type:Fv.CONVERT_TO_DATE_TIME,label:"Convert to date time",applyTo:["date-time"],nbInputs:0,tooltip:"Returns the date-time, which is stored as the epoch time, as a formatted date YYYY/dd/mm HH:mm:ss"}];function _v(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=gv(e),n=uv(o),s=o.operator.type;switch(s){case Fv.TRIM:case Fv.CONVERT_TO_DATE:case Fv.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case Fv.TRIM:return mv(e,yv.methodCall.TRIM,[]);case Fv.CONVERT_TO_DATE:return mv(e,yv.methodCall.LONG_TO_DATE,[]);case Fv.CONVERT_TO_DATE_TIME:return mv(e,yv.methodCall.LONG_TO_DATE_TIME,[])}}(o,s);case Fv.PLUS:case Fv.MINUS:case Fv.DIVIDE:case Fv.MULTIPLY:return hv(o,s,n);default:throw new Error(`Unmatched case for operator name: ${s}`)}}function Hv(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return fv(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return Mv.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Pv(e,t){return{combinator:og,children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Pv(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Hv(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[Fv[Fv.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[Fv[Fv.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[Fv[Fv.CONVERT_TO_DATE_TIME],void 0];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:Mv.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let zv=class extends iv{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Pv(t.fields,i);this.config={combinators:[og],operators:Mv,fields:t.fields,model:o,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning}}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the valueConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){if(!("children"in e))throw new Error("Invalid top level group hierarchy");if(e.children.length>1)throw new Error("Value expressions should not have multiple rules");if(e.children[0]&&"children"in e.children[0])throw new Error("Trying to convert group to rule");const t=0===e.children.length?void 0:_v(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],zv.prototype,"valueConfig",void 0),zv=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:Eg,template:Ag})],zv);const Uv=l.html`
|
|
6594
6594
|
<template ${(0,l.ref)("notificationListener")}>
|
|
6595
6595
|
<slot></slot>
|
|
6596
6596
|
</template>
|
|
6597
|
-
`,Uv={mode:"open",delegatesFocus:!0};class Bv extends a.FoundationElement{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(pe.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),Ce(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>(0,C.sH)(this,void 0,void 0,function*(){e&&(yield this.handleReconnection())}))})}handleReconnection(){return(0,C.sH)(this,void 0,void 0,function*(){var e;this.resourceName&&(null===(e=this.dataSub)||void 0===e||e.unsubscribe(),this.dataSub=void 0,yield this.initializeDatasource(),this.setupDataSubscription())})}initializeDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){var e;(null===(e=this.datasource)||void 0===e?void 0:e.initialized)&&this.datasource.destroy();if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))throw new Error(`Failed to initialize datasource for ${this.resourceName}`)})}setupDataSubscription(){this.datasource.stream?this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate((0,di.d)(e))}):ot.warn(`No stream available for ${this.resourceName}`)}disconnectedCallback(){var e,t,i;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.connectionSub)||void 0===t||t.unsubscribe(),delete this.connectionSub,null===(i=this.datasource)||void 0===i||i.destroy(),delete this.datasource}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach(e=>{this.showNotificationToast(e)})}showNotificationToast(e){const{HEADER:t,MESSAGE:i,NOTIFY_SEVERITY:o}=e,n=e.CREATED_AT?new Date(e.CREATED_AT):void 0,s=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let a=[];this.toastButtons&&this.toastButtons.length>0&&(a=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));const r={title:t,body:i,createdAt:n,toast:{details:e,type:null==o?void 0:o.toLowerCase(),buttons:a,autoClose:void 0!==s?!!s:!!this.closeTimeout,closeTimeout:null!=s?s:this.closeTimeout,position:this.toastPosition}};vc(r,this.tagName)}}(0,C.Cg)([l.observable],Bv.prototype,"notificationListener",void 0),(0,C.Cg)([ui.dm],Bv.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Bv.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Bv.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],Bv.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],Bv.prototype,"toastPosition",void 0),(0,C.Cg)([hi.yW],Bv.prototype,"datasource",void 0);const Vv=Bv.compose({baseName:"notification-listener",template:zv,shadowOptions:Uv}),Gv=(e,t)=>i=>{const o="function"==typeof t?t:(n=t,e=>Object.assign(Object.assign({},n),e));var n;return l.FASTElement.define(class extends e{},o(i))};function jv(e){if("string"==typeof e)return e;if("function"==typeof e&&!(e=l.FASTElementDefinition.forType(e)))throw new Error("Missing FASTElement definition.");return e.name}var Yv;!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Yv||(Yv={}));class Wv{trackEvent(e,t){js.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`)}}const qv=a.DI.createInterface(e=>e.singleton(Wv));var Kv=i(98647),Xv=i(35044);const Jv=(0,it.createLogger)("foundation-router");var Qv=i(36132),Zv=i(80751),ef=i(3479);const tf="$router",of=Object.freeze({getOrCreateFor:e=>{const t=e[tf];return void 0!==t?t:e[tf]=new nf(e)},find:e=>ef.Ix.find(e),from:e=>ef.Ix.from(e)});class nf extends ef.LK{}const sf=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function af(e){return sf.test(e)}function rf(e){return e.config instanceof Kv.Y?e:of.find(e)}function lf(e){return rf(e).parent}function df(e){let t=rf(e);for(;t&&t.level>0;)t=t.parent;return t}function cf(e,t="/",i=!1){const o=e.join(t).replace(new RegExp(t+"{1,}","g"),t);return!i&&o.endsWith(t)?o.slice(0,-1):o}function uf(e,t="/"){const i=e.split(t);return 2===i.length&&""===i[0]&&""!==i[1]?e:(i.length>1&&i.pop(),i.join(t))}function hf(e){return e.replace(`/*${Zv.N}`,"")}function pf(){null===document.querySelector("foundation-router, fast-router")&&window.dispatchEvent(new PopStateEvent("popstate"))}const mf=Object.freeze({path:Object.freeze({get current(){return Qv.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=rf(e);for(;null!==o;){const e=yield o.config.generateRouteFromPath(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t=!0)=>{e&&af(e)?location.href=e:(history.pushState({},document.title,e),pf(),t&&mf.path.trigger(e))},replace:(e,t=!0)=>{e&&af(e)?location.href=e:(history.replaceState({},document.title,e),pf(),t&&mf.path.trigger(e))},trigger:e=>{Qv.qh.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=rf(e);for(;null!==o;){const e=yield o.config.generateRouteFromName(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield mf.name.generateRoute(e,t,i);null!==n&&mf.path.push(n,o)}),replace:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield mf.name.generateRoute(e,t,i);null!==n&&mf.path.replace(n,o)}),trigger:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){const o=yield mf.name.generateRoute(e,t,i);null!==o&&mf.path.trigger(o)})})}),gf=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,vf=10;function ff(e,t=gf,i=vf){const o=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,n)=>{e.navItems.filter(t).map((t,o)=>{var s,a,r,l;const d=null!==(s=t.placementIndex)&&void 0!==s?s:n*i+o;return Object.assign(Object.assign({},t),{navId:null!==(a=t.navId)&&void 0!==a?a:"header",placementIndex:d,routePath:null!==(r=t.routePath)&&void 0!==r?r:e.path,routeName:null!==(l=t.routeName)&&void 0!==l?l:e.name})}).forEach(e=>o.push(e))}),o.sort((e,t)=>e.placementIndex-t.placementIndex)}class bf extends Zv.s{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(Jv.debug("Route paths remap required due to detected sub-path deployment"),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(o))return Jv.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return Jv.debug(`'${e.path}' path modified to '${i}'`),Object.assign(Object.assign({},e),{path:i})})),this.definitions=[...e,...this.definitions],super.map(...e)}}(0,C.Cg)([l.observable],bf.prototype,"definitions",void 0);class yf extends Kv.Y{constructor(){super(),this.logger=Jv,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new bf(this),this.basename=Zn.OB,this.routes=new bf(this)}getNavItems(e=gf){return ff(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(Yv.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){var t;const{settings:i}=e.route;!1===(null===(t=null==i?void 0:i.isPermitted)||void 0===t?void 0:t.call(i))&&e.cancel(()=>{var t,o;if(this.user.isAuthenticated){const n=null!==(o=null===(t=i.notPermittedPath)||void 0===t?void 0:t.call(i))&&void 0!==o?o:this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${n}.`),mf.name.replace(e.router,n)}else this.user.trackPath(),mf.name.replace(e.router,this.loginPath)})})})}configureFallbackRouteDefinition(){this.routes.fallback(()=>{let e={redirect:this.notFoundPath};return this.user.isAuthenticated||(this.user.trackPath(),this._session.captureReturnUrl(),e={redirect:this.loginPath}),this.logger.debug(`Route unresolved. Re-routing to ${e.redirect}.`),e})}navigationPhaseLoginRedirect(e){e.cancel(()=>{this.user.trackPath(),this._session.captureReturnUrl(),mf.name.replace(e.router,this.loginPath)})}generateRouteFromName(e,t){const i=Object.create(null,{generateRouteFromName:{get:()=>super.generateRouteFromName}});return(0,C.sH)(this,void 0,void 0,function*(){const o=yield i.generateRouteFromName.call(this,e,t);return o?this.generateNavigationPath(o):null})}navigateTo(e){return(0,C.sH)(this,void 0,void 0,function*(){if(e.name)return this.relativeTo||this.logger.error("unable to navigate by name as the relativeTo router is not set"),void(yield mf.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&mf.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Xv.C.build(t);let n=i&&!e.startsWith(i)?cf([i,e]):e;return n=o?`${n}?${o}`:n,n}getNavigationPathBasename(){var e,t;const i=this.parent,o=null===(t=null===(e=null==i?void 0:i.relativeTo)||void 0===e?void 0:e.route)||void 0===t?void 0:t.endpoint.route.path;return o?hf(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([a.Container],yf.prototype,"container",void 0),(0,C.Cg)([qv],yf.prototype,"analytics",void 0),(0,C.Cg)([Jl.KJ],yf.prototype,"user",void 0),(0,C.Cg)([Ti.N],yf.prototype,"_session",void 0);const wf="navigate-to",Cf="generate-navigation-path";let xf=class extends(of.from(l.FASTElement)){constructor(){super(...arguments),this.logger=Jv,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();const{path:t,params:i,callback:o}=e.detail;if(!o)return;o(this.config.generateNavigationPath(t,i))}}get router(){return this[tf]}connectedCallback(){var e,t;super.connectedCallback(),this.config.isConfigured||(null!==(e=(t=this.config).relativeTo)&&void 0!==e||(t.relativeTo=this.router),l.DOM.queueUpdate(()=>(0,C.sH)(this,void 0,void 0,function*(){this.router.config?this.router.connect():this.router.config=this.config})),this.addEventListeners())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener(wf,this.onNavigateTo),this.addEventListener(Cf,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(wf,this.onNavigateTo),this.removeEventListener(Cf,this.onGenerateNavigationPath)}};xf=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],xf);const $f=e=>`control: ${e}-control, content: ${e}-content`,Sf=["background: progress-ring-background","progress: progress-ring-progress","indeterminate-indicator-1: progress-ring-indeterminate"].join(", "),Ef=e=>l.html`
|
|
6597
|
+
`,Bv={mode:"open",delegatesFocus:!0};class Vv extends a.FoundationElement{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(pe.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),Ce(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>(0,C.sH)(this,void 0,void 0,function*(){e&&(yield this.handleReconnection())}))})}handleReconnection(){return(0,C.sH)(this,void 0,void 0,function*(){var e;this.resourceName&&(null===(e=this.dataSub)||void 0===e||e.unsubscribe(),this.dataSub=void 0,yield this.initializeDatasource(),this.setupDataSubscription())})}initializeDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){var e;(null===(e=this.datasource)||void 0===e?void 0:e.initialized)&&this.datasource.destroy();if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))throw new Error(`Failed to initialize datasource for ${this.resourceName}`)})}setupDataSubscription(){this.datasource.stream?this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate((0,li.d)(e))}):ot.warn(`No stream available for ${this.resourceName}`)}disconnectedCallback(){var e,t,i;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.connectionSub)||void 0===t||t.unsubscribe(),delete this.connectionSub,null===(i=this.datasource)||void 0===i||i.destroy(),delete this.datasource}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach(e=>{this.showNotificationToast(e)})}showNotificationToast(e){const{HEADER:t,MESSAGE:i,NOTIFY_SEVERITY:o}=e,n=e.CREATED_AT?new Date(e.CREATED_AT):void 0,s=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let a=[];this.toastButtons&&this.toastButtons.length>0&&(a=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));const r={title:t,body:i,createdAt:n,toast:{details:e,type:null==o?void 0:o.toLowerCase(),buttons:a,autoClose:void 0!==s?!!s:!!this.closeTimeout,closeTimeout:null!=s?s:this.closeTimeout,position:this.toastPosition}};fc(r,this.tagName)}}(0,C.Cg)([l.observable],Vv.prototype,"notificationListener",void 0),(0,C.Cg)([hi.dm],Vv.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Vv.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Vv.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],Vv.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],Vv.prototype,"toastPosition",void 0),(0,C.Cg)([pi.yW],Vv.prototype,"datasource",void 0);const Gv=Vv.compose({baseName:"notification-listener",template:Uv,shadowOptions:Bv}),jv=(e,t)=>i=>{const o="function"==typeof t?t:(n=t,e=>Object.assign(Object.assign({},n),e));var n;return l.FASTElement.define(class extends e{},o(i))};function Yv(e){if("string"==typeof e)return e;if("function"==typeof e&&!(e=l.FASTElementDefinition.forType(e)))throw new Error("Missing FASTElement definition.");return e.name}var Wv;!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Wv||(Wv={}));class qv{trackEvent(e,t){Ys.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`)}}const Kv=a.DI.createInterface(e=>e.singleton(qv));var Xv=i(98647),Jv=i(35044);const Qv=(0,it.createLogger)("foundation-router");var Zv=i(36132),ef=i(80751),tf=i(3479);const of="$router",nf=Object.freeze({getOrCreateFor:e=>{const t=e[of];return void 0!==t?t:e[of]=new sf(e)},find:e=>tf.Ix.find(e),from:e=>tf.Ix.from(e)});class sf extends tf.LK{}const af=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function rf(e){return af.test(e)}function lf(e){return e.config instanceof Xv.Y?e:nf.find(e)}function df(e){return lf(e).parent}function cf(e){let t=lf(e);for(;t&&t.level>0;)t=t.parent;return t}function uf(e,t="/",i=!1){const o=e.join(t).replace(new RegExp(t+"{1,}","g"),t);return!i&&o.endsWith(t)?o.slice(0,-1):o}function hf(e,t="/"){const i=e.split(t);return 2===i.length&&""===i[0]&&""!==i[1]?e:(i.length>1&&i.pop(),i.join(t))}function pf(e){return e.replace(`/*${ef.N}`,"")}function mf(){null===document.querySelector("foundation-router, fast-router")&&window.dispatchEvent(new PopStateEvent("popstate"))}const gf=Object.freeze({path:Object.freeze({get current(){return Zv.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=lf(e);for(;null!==o;){const e=yield o.config.generateRouteFromPath(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t=!0)=>{e&&rf(e)?location.href=e:(history.pushState({},document.title,e),mf(),t&&gf.path.trigger(e))},replace:(e,t=!0)=>{e&&rf(e)?location.href=e:(history.replaceState({},document.title,e),mf(),t&&gf.path.trigger(e))},trigger:e=>{Zv.qh.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=lf(e);for(;null!==o;){const e=yield o.config.generateRouteFromName(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield gf.name.generateRoute(e,t,i);null!==n&&gf.path.push(n,o)}),replace:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield gf.name.generateRoute(e,t,i);null!==n&&gf.path.replace(n,o)}),trigger:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){const o=yield gf.name.generateRoute(e,t,i);null!==o&&gf.path.trigger(o)})})}),vf=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,ff=10;function bf(e,t=vf,i=ff){const o=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,n)=>{e.navItems.filter(t).map((t,o)=>{var s,a,r,l;const d=null!==(s=t.placementIndex)&&void 0!==s?s:n*i+o;return Object.assign(Object.assign({},t),{navId:null!==(a=t.navId)&&void 0!==a?a:"header",placementIndex:d,routePath:null!==(r=t.routePath)&&void 0!==r?r:e.path,routeName:null!==(l=t.routeName)&&void 0!==l?l:e.name})}).forEach(e=>o.push(e))}),o.sort((e,t)=>e.placementIndex-t.placementIndex)}class yf extends ef.s{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(Qv.debug("Route paths remap required due to detected sub-path deployment"),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(o))return Qv.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return Qv.debug(`'${e.path}' path modified to '${i}'`),Object.assign(Object.assign({},e),{path:i})})),this.definitions=[...e,...this.definitions],super.map(...e)}}(0,C.Cg)([l.observable],yf.prototype,"definitions",void 0);class wf extends Xv.Y{constructor(){super(),this.logger=Qv,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new yf(this),this.basename=es.OB,this.routes=new yf(this)}getNavItems(e=vf){return bf(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(Wv.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){var t;const{settings:i}=e.route;!1===(null===(t=null==i?void 0:i.isPermitted)||void 0===t?void 0:t.call(i))&&e.cancel(()=>{var t,o;if(this.user.isAuthenticated){const n=null!==(o=null===(t=i.notPermittedPath)||void 0===t?void 0:t.call(i))&&void 0!==o?o:this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${n}.`),gf.name.replace(e.router,n)}else this.user.trackPath(),gf.name.replace(e.router,this.loginPath)})})})}configureFallbackRouteDefinition(){this.routes.fallback(()=>{let e={redirect:this.notFoundPath};return this.user.isAuthenticated||(this.user.trackPath(),this._session.captureReturnUrl(),e={redirect:this.loginPath}),this.logger.debug(`Route unresolved. Re-routing to ${e.redirect}.`),e})}navigationPhaseLoginRedirect(e){e.cancel(()=>{this.user.trackPath(),this._session.captureReturnUrl(),gf.name.replace(e.router,this.loginPath)})}generateRouteFromName(e,t){const i=Object.create(null,{generateRouteFromName:{get:()=>super.generateRouteFromName}});return(0,C.sH)(this,void 0,void 0,function*(){const o=yield i.generateRouteFromName.call(this,e,t);return o?this.generateNavigationPath(o):null})}navigateTo(e){return(0,C.sH)(this,void 0,void 0,function*(){if(e.name)return this.relativeTo||this.logger.error("unable to navigate by name as the relativeTo router is not set"),void(yield gf.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&gf.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Jv.C.build(t);let n=i&&!e.startsWith(i)?uf([i,e]):e;return n=o?`${n}?${o}`:n,n}getNavigationPathBasename(){var e,t;const i=this.parent,o=null===(t=null===(e=null==i?void 0:i.relativeTo)||void 0===e?void 0:e.route)||void 0===t?void 0:t.endpoint.route.path;return o?pf(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([a.Container],wf.prototype,"container",void 0),(0,C.Cg)([Kv],wf.prototype,"analytics",void 0),(0,C.Cg)([Ql.KJ],wf.prototype,"user",void 0),(0,C.Cg)([ki.N],wf.prototype,"_session",void 0);const Cf="navigate-to",xf="generate-navigation-path";let $f=class extends(nf.from(l.FASTElement)){constructor(){super(...arguments),this.logger=Qv,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();const{path:t,params:i,callback:o}=e.detail;if(!o)return;o(this.config.generateNavigationPath(t,i))}}get router(){return this[of]}connectedCallback(){var e,t;super.connectedCallback(),this.config.isConfigured||(null!==(e=(t=this.config).relativeTo)&&void 0!==e||(t.relativeTo=this.router),l.DOM.queueUpdate(()=>(0,C.sH)(this,void 0,void 0,function*(){this.router.config?this.router.connect():this.router.config=this.config})),this.addEventListeners())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener(Cf,this.onNavigateTo),this.addEventListener(xf,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(Cf,this.onNavigateTo),this.removeEventListener(xf,this.onGenerateNavigationPath)}};$f=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],$f);const Sf=e=>`control: ${e}-control, content: ${e}-content`,Ef=["background: progress-ring-background","progress: progress-ring-progress","indeterminate-indicator-1: progress-ring-indeterminate"].join(", "),Of=e=>l.html`
|
|
6598
6598
|
|
|
6599
6599
|
<${e}-card class=${e=>(0,x.x)("stepper-tab",["stepper-tab-hidden",e.hideTabs])} part="stepper-tab" @tab-clicked="${(e,t)=>e.handleStepClick(t.event.detail)}" role="stepper-tab" data-test-id="stepper-tab">
|
|
6600
6600
|
<div class=${e=>(0,x.x)("stepper-tab-menu",["stepper-tab-menu-hidden",e.hideTabs])} part="stepper-tab-menu">
|
|
@@ -6602,7 +6602,7 @@ class="margin"
|
|
|
6602
6602
|
</div>
|
|
6603
6603
|
${(0,l.when)(e=>e.orientation===a.TabsOrientation.vertical&&!e.hideProgress,l.html`
|
|
6604
6604
|
<div class="stepper-tab-progress" part="stepper-tab-progress">
|
|
6605
|
-
<${e}-progress-ring class="progress-ring" part="progress-ring" exportparts="${
|
|
6605
|
+
<${e}-progress-ring class="progress-ring" part="progress-ring" exportparts="${Ef}" value=${e=>e.progressValue}></${e}-progress-ring>
|
|
6606
6606
|
<label part="progress-label">You have completed ${e=>e.progressValue}% of the fields required to create a project</label>
|
|
6607
6607
|
</div>`)}
|
|
6608
6608
|
</${e}-card>
|
|
@@ -6614,22 +6614,22 @@ class="margin"
|
|
|
6614
6614
|
${(0,l.when)(e=>!e.hideAllButtons,l.html`
|
|
6615
6615
|
<div class="action-buttons-container" part="action-buttons-container">
|
|
6616
6616
|
<slot name="action-buttons">
|
|
6617
|
-
<${e}-button part="back-button" exportparts="${
|
|
6617
|
+
<${e}-button part="back-button" exportparts="${Sf("back-button")}" @click=${e=>e.previousStep()} ?disabled=${e=>e.disabledPreviousStep}>Back</${e}-button>
|
|
6618
6618
|
${(0,l.when)(e=>e.isLastStep&&!e.hideSubmitButton,l.html`
|
|
6619
|
-
<${e}-button part="submit-button" exportparts="${
|
|
6619
|
+
<${e}-button part="submit-button" exportparts="${Sf("submit-button")}" @click=${e=>e._submit()} ?disabled=${e=>e.islastStepValid} data-test-id="submit-button">
|
|
6620
6620
|
Submit
|
|
6621
6621
|
</${e}-button>
|
|
6622
6622
|
`)}
|
|
6623
6623
|
${(0,l.when)(e=>!e.isLastStep,l.html`
|
|
6624
|
-
<${e}-button part="next-button" exportparts="${
|
|
6624
|
+
<${e}-button part="next-button" exportparts="${Sf("next-button")}" @click=${e=>e.nextStep()} data-test-id="next-button">Next</${e}-button>`)}
|
|
6625
6625
|
</slot>
|
|
6626
6626
|
</div>
|
|
6627
6627
|
`)}
|
|
6628
6628
|
</${e}-card>
|
|
6629
6629
|
`)}
|
|
6630
|
-
`,
|
|
6631
|
-
${e=>
|
|
6632
|
-
`,
|
|
6630
|
+
`,Tf=l.html`
|
|
6631
|
+
${e=>Of(T(e))}
|
|
6632
|
+
`,kf=l.css`
|
|
6633
6633
|
:host {
|
|
6634
6634
|
display: flex;
|
|
6635
6635
|
height: 100%;
|
|
@@ -6728,5 +6728,5 @@ class="margin"
|
|
|
6728
6728
|
max-height: 70px;
|
|
6729
6729
|
height: 70px;
|
|
6730
6730
|
}
|
|
6731
|
-
`;class
|
|
6732
|
-
//# sourceMappingURL=966.
|
|
6731
|
+
`;class Df extends a.FoundationElement{constructor(){super(...arguments),this.hideProgress=!1,this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.indicatorOnly=!1,this.orientation=a.TabsOrientation.vertical,this.tabs=[],this.tabpanels=[],this.progressValue=0,this.activeTabIndex=0,this.pendingNextStep=!1,this.slotsInitialized=!1,this.setTabs=()=>{this.activeTabIndex=this.getActiveIndex(),this.tabs.forEach((e,t)=>{if("tab"===e.slot){const i=this.activeTabIndex===t,o=t+1===this.tabIds.length,n=this.tabIds[t],s=this.tabpanelIds[t];e.setAttribute("id",n),e.setAttribute("aria-selected",i?"true":"false"),e.setAttribute("aria-disabled",i?"false":"true"),e.setAttribute("selected",i?"true":"false"),e.setAttribute("orientation",this.orientation),s&&e.setAttribute("aria-controls",s),e.setAttribute("tab-position",String(t+1)),e.setAttribute("isLast",String(o)),e.setAttribute("hideStepNumber",String(!0===this.hideStepNumber)),e.setAttribute("tabindex",i?"0":"-1"),e.setAttribute("showCursorPointer",String(t<=this.activeTabIndex&&this.allowBackwardJumps||t>this.activeTabIndex&&this.allowForwardJumps)),i&&(this.activetab=e,this.activeid=n)}}),0===this.activeTabIndex&&this.resetCompletedState()},this.getCompletedTabs=()=>{let e=0;this.tabs.forEach(t=>{t.isCompleted()&&(e+=1)});const t=this.indicatorOnly?this.tabs.length:this.tabpanels.length;this.progressValue=t?Math.round(e/t*100):0},this.setTabPanels=()=>{this.tabpanels.forEach((e,t)=>{const i=this.tabIds[t],o=this.tabpanelIds[t];e.setAttribute("id",o),e.setAttribute("aria-labelledby",i),this.activeTabIndex!==t?e.setAttribute("hidden",""):e.removeAttribute("hidden")})}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels())}activeidChanged(e,t){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabs(),this.setTabPanels(),this.getCompletedTabs())}tabsChanged(){this.$fastController.isConnected&&(this.indicatorOnly||this.tabs.length<=this.tabpanels.length)&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}setTabsAndTabPanels(){this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.getCompletedTabs(),this.slotsInitialized=this.tabs.length>0&&(this.indicatorOnly||this.tabpanels.length>0)}checkAndExecutePendingNextStep(){this.pendingNextStep&&this.slotsInitialized&&(this.pendingNextStep=!1,this.nextStep())}getActiveIndex(){return void 0!==this.activeid?-1===this.tabIds.indexOf(this.activeid)?0:this.tabIds.indexOf(this.activeid):0}goToStep(e,t=!1){const i=e-1;if(e<1||e>this.tabs.length)return ot.warn(`[Stepper] Invalid step number: ${e}. Must be between 1 and ${this.tabs.length}`),!1;if(i===this.activeTabIndex)return!1;if(t){if(i<this.activeTabIndex)return this.handleBackwardJump(i);if(i>this.activeTabIndex)return this.handleForwardJump(i)}if(i<this.activeTabIndex&&this.allowBackwardJumps){return this.handleBackwardJump(i)}if(i>this.activeTabIndex&&this.allowForwardJumps){return this.handleForwardJump(i)}return i===this.activeTabIndex+1?(this.nextStep(),!0):(ot.warn(`[Stepper] Cannot jump to step ${e}. Jumps are not allowed or step is not adjacent.`),!1)}goToFirstStep(){return this.goToStep(1,!0)}goToLastStep(){return this.goToStep(this.tabs.length,!0)}handleStepClick(e){e<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(e):e>this.activeTabIndex&&this.allowForwardJumps&&this.handleForwardJump(e)}handleBackwardJump(e){for(let t=e+1;t<=this.activeTabIndex;t+=1)this.tabs[t].completed=!1;return this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}handleForwardJump(e){for(let t=this.activeTabIndex;t<e;t+=1)if(this.validation&&this.validation[t]){if(!this.validation[t].isValid())return this.tabs[t].completed=!1,this.tabs[t].error=!0,this.getCompletedTabs(),this.$emit("validation-failure",{stepIndex:t,stepId:this.tabIds[t],message:`Validation failed for step ${t+1}`}),!1;this.tabs[t].error=!1}for(let t=this.activeTabIndex;t<e;t+=1)this.tabs[t].completed=!0,this.tabs[t].error=!1;return this.tabs[e].completed=!1,this.tabs[e].error=!1,this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.getCompletedTabs(),this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}get disabledPreviousStep(){return 0===this.activeTabIndex}get isLastStep(){return this.activeTabIndex+1===this.tabs.length}get islastStepValid(){var e;const t=this.tabs.length-1;return this.activeTabIndex===t&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs(),!1):(this.tabs[t].completed=!1,this.getCompletedTabs(),!0)}_submit(){this.$emit("submit")}nextStep(){var e;if(!this.slotsInitialized)return void(this.pendingNextStep=!0);if(this.validation&&this.validation[this.activeTabIndex]){if(!this.validation[this.activeTabIndex].isValid())return this.tabs[this.activeTabIndex].completed=!1,this.tabs[this.activeTabIndex].error=!0,void this.getCompletedTabs();this.tabs[this.activeTabIndex].error=!1}this.activeTabIndex+2<=this.tabIds.length&&(this.tabs[this.activeTabIndex].completed=!0,this.activeTabIndex=this.activeTabIndex+1,this.activeid=this.tabIds[this.activeTabIndex],this.$emit("next-step"),this.$emit("validation-success"));const t=this.tabs.length-1,i=this.activeTabIndex===t;this.hideSubmitButton&&i&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs()):(this.tabs[t].completed=!1,this.getCompletedTabs())}previousStep(){0!==this.activeTabIndex&&(this.tabs[this.activeTabIndex].completed=!1,this.activeTabIndex=this.activeTabIndex-1,this.activeid=this.tabIds[this.activeTabIndex])}getTabIds(){return this.tabs.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`tab-${(0,ya.NF)()}`})}getTabPanelIds(){return this.tabpanels.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`panel-${(0,ya.NF)()}`})}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}}(0,C.Cg)([(0,l.attr)({attribute:"hide-submit-button",mode:"boolean"})],Df.prototype,"hideSubmitButton",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-progress",mode:"boolean"})],Df.prototype,"hideProgress",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-step-number",mode:"boolean"})],Df.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-backward-jumps",mode:"boolean"})],Df.prototype,"allowBackwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-forward-jumps",mode:"boolean"})],Df.prototype,"allowForwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-all-buttons",mode:"boolean"})],Df.prototype,"hideAllButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-tabs",mode:"boolean"})],Df.prototype,"hideTabs",void 0),(0,C.Cg)([(0,l.attr)({attribute:"indicator-only",mode:"boolean"})],Df.prototype,"indicatorOnly",void 0),(0,C.Cg)([l.attr],Df.prototype,"orientation",void 0),(0,C.Cg)([l.attr],Df.prototype,"activeid",void 0),(0,C.Cg)([l.observable],Df.prototype,"tabs",void 0),(0,C.Cg)([l.observable],Df.prototype,"tabpanels",void 0),(0,C.Cg)([l.observable],Df.prototype,"validation",void 0),(0,C.Cg)([l.observable],Df.prototype,"progressValue",void 0),(0,C.Cg)([l.observable],Df.prototype,"activeTabIndex",void 0),(0,C.Cg)([l.volatile],Df.prototype,"disabledPreviousStep",null),(0,C.Cg)([l.volatile],Df.prototype,"isLastStep",null),(0,C.Cg)([l.volatile],Df.prototype,"islastStepValid",null);const If=void 0,Rf={},Af=Df.compose(Object.assign({baseName:"stepper",template:Tf,styles:kf,shadowOptions:If},Rf)),Lf=["text-field","text-area","combobox"],Nf=["input","textarea","select",'[contenteditable="true"]','[contenteditable=""]','[role="textbox"]','[role="searchbox"]','[role="combobox"]'],Ff=e=>Lf.map(t=>`${e}-${t}`),Mf={rapid:Ff("rapid"),zero:Ff("zero")};function _f(e,t=[]){const i=e.flatMap(e=>{var t;return null!==(t=Mf[e])&&void 0!==t?t:[]}),o=t.filter(Boolean);return Array.from(new Set([...Nf,...i,...o])).join(",")}const Hf=()=>Sd().register(Qm)},70997(e,t,i){"use strict";function o(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),s=o(i);return(t,i)=>e(t,i)?n(t,i):s(t,i)}i.d(t,{q:()=>o})},80273(e,t,i){"use strict";i.d(t,{Du:()=>l,IT:()=>a,WP:()=>n,f4:()=>r,zz:()=>s});var o=i(52945);const n=(e,t)=>{(0,o.O5)(e,t)};var s,a;!function(e){e.Italic="italic",e.Normal="normal"}(s||(s={})),function(e){e[e.Thin=100]="Thin",e[e.Light=300]="Light",e[e.Regular=400]="Regular",e[e.Medium=500]="Medium",e[e.Bold=700]="Bold",e[e.Black=900]="Black"}(a||(a={}));const r=(e,t=s.Normal,i=a.Regular)=>`\n font-family: ${e};\n font-style: ${t};\n font-weight: ${i};\n`,l={minusOne:-1,minusTwo:-2,plusOne:1,plusTwo:2,plusThree:3,plusFour:4,plusFive:5,plusSix:6}}}]);
|
|
6732
|
+
//# sourceMappingURL=966.5c5e6b2015b369f801658cc91153a3e8.js.map
|