@nebula.js/sn-action-button 1.10.0 → 1.12.1

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.
@@ -1,8 +1,8 @@
1
1
  /*
2
- * @nebula.js/sn-action-button v1.10.0
3
- * Copyright (c) 2020 QlikTech International AB
2
+ * @nebula.js/sn-action-button v1.12.1
3
+ * Copyright (c) 2022 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@nebula.js/stardust")):"function"==typeof define&&define.amd?define(["@nebula.js/stardust"],t):(e=e||self)["sn-action-button"]=t(e.stardust)}(this,(function(e){"use strict";var t={showTitles:!1,title:"",subtitle:"",footnote:"",useEnabledCondition:!1,enabledCondition:1,navigation:{action:"none"},style:{label:"Button",font:{size:.5,useColorExpression:!1,color:{index:-1,color:null},colorExpression:"",style:{bold:!0,italic:!1,underline:!1},align:"center"},background:{useColorExpression:!1,color:{index:-1,color:null},colorExpression:"",useImage:!1,url:{qStaticContentUrlDef:{qUrl:""}},size:"auto",position:"centerCenter"},border:{useBorder:!1,radius:0,width:0,useColorExpression:!1,color:{index:-1,color:null},colorExpression:""},icon:{useIcon:!1,iconType:"",position:"left"}},actions:[]},n={targets:[]};function r(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,a){var i=e.apply(t,n);function l(e){r(i,o,a,l,s,"next",e)}function s(e){r(i,o,a,l,s,"throw",e)}l(void 0)}))}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(){var e=o(regeneratorRuntime.mark((function e(t,n,r){var o,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.split(";"),!r){e.next=8;break}return a="",o.forEach((function(e){a+="Num('".concat(e,"')&';'&")})),e.next=6,t.evaluate(a.slice(0,-5));case 6:i=e.sent,o=i.split(";");case 8:return e.abrupt("return",o.map((function(e){return Number.isNaN(+e)?{qText:e}:{qIsNumeric:!0,qNumber:Number(e)}})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),c=[{value:"applyBookmark",translation:"Object.ActionButton.ApplyBookmark",group:"bookmark",getActionCall:function(e){var t=e.app,n=e.bookmark;return o(regeneratorRuntime.mark((function e(){var r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getBookmarkList();case 2:if(r=e.sent,o=r.find((function(e){return e.qData.title===n})),e.t0=n,!e.t0){e.next=8;break}return e.next=8,t.applyBookmark(o&&o.qInfo&&o.qInfo.qId||n);case 8:case"end":return e.stop()}}),e)})))},requiredInput:["bookmark"]},{value:"back",translation:"Object.ActionButton.MoveBackward",group:"selection",getActionCall:function(e){var t=e.app;return o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.back();case 2:case"end":return e.stop()}}),e)})))},requiredInput:[]},{value:"forward",translation:"Object.ActionButton.MoveForward",group:"selection",getActionCall:function(e){var t=e.app;return o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.forward();case 2:case"end":return e.stop()}}),e)})))},requiredInput:[]},{value:"clearAll",translation:"Object.ActionButton.ClearAll",group:"selection",getActionCall:function(e){var t=e.app,n=e.softLock;return o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.clearAll(n);case 2:case"end":return e.stop()}}),e)})))},requiredInput:["softLock"]},{value:"clearAllButThis",translation:"Object.ActionButton.ClearAllButThis",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.softLock;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.clearAllButThis(a);case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field","softLock"]},{value:"clearField",translation:"Object.ActionButton.ClearSelectionInField",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.clear();case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field"]},{value:"selectAll",translation:"Object.ActionButton.SelectAllInField",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.softLock;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.selectAll(a);case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field","softLock"]},{value:"selectValues",translation:"Object.ActionButton.SelectValuesInField",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.value,i=e.softLock;return o(regeneratorRuntime.mark((function e(){var o,l,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r||!a){e.next=12;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,t.getFieldDescription(r);case 6:return l=e.sent,e.next=9,s(t,a,l.qTags.includes("$date"));case 9:return c=e.sent,e.next=12,o.selectValues(c,!1,i);case 12:case"end":return e.stop()}}),e)})))},requiredInput:["field","value","softLock"]},{value:"selectMatchingValues",translation:"Object.ActionButton.SelectMatchingValues",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.value,i=e.softLock;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r||!a){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.select(a,!1,i);case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field","value","softLock"]},{value:"selectAlternative",translation:"Object.ActionButton.SelectAlternatives",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.softLock;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.selectAlternative(a);case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field","softLock"]},{value:"selectExcluded",translation:"Object.ActionButton.SelectExcluded",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.softLock;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.selectExcluded(a);case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field","softLock"]},{value:"selectPossible",translation:"Object.ActionButton.SelectPossibleValues",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.softLock;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.selectPossible(a);case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field","softLock"]},{value:"toggleSelect",translation:"Object.ActionButton.ToggleFieldSelection",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.value,i=e.softLock;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r||!a){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.toggleSelect(a,i);case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field","value","softLock"]},{value:"lockAll",translation:"Object.ActionButton.LockAllSelections",group:"selection",getActionCall:function(e){var t=e.app;return o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.lockAll();case 2:case"end":return e.stop()}}),e)})))},requiredInput:[]},{value:"lockField",translation:"Object.ActionButton.LockField",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.lock();case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field"]},{value:"unlockAll",translation:"Object.ActionButton.UnlockAllSelections",group:"selection",getActionCall:function(e){var t=e.app;return o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.unlockAll();case 2:case"end":return e.stop()}}),e)})))},requiredInput:[]},{value:"unlockField",translation:"Object.ActionButton.UnlockAField",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.unlock();case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field"]},{value:"setVariable",translation:"Object.ActionButton.SetVariable",group:"variables",getActionCall:function(e){var t=e.app,n=e.variable,r=e.value;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!r){e.next=11;break}return e.prev=1,e.next=4,t.getVariableByName(n);case 4:return o=e.sent,e.next=7,o.setStringValue(r);case 7:e.next=11;break;case 9:e.prev=9,e.t0=e.catch(1);case 11:case"end":return e.stop()}}),e,null,[[1,9]])})))},requiredInput:["variable","value"]},{value:"doReload",translation:"Object.ActionButton.DoReload",group:"reload",getActionCall:function(e){var t=e.app,n=e.partial;return o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.doReload(0,!!n,!1);case 2:if(!e.sent){e.next=6;break}return e.next=6,t.doSave();case 6:case"end":return e.stop()}}),e)})))},requiredInput:["partial"]}];function u(e,t){var n=c.find((function(t){return e.actionType===t.value}));return n&&n.requiredInput&&-1!==n.requiredInput.indexOf(t)}var p,b,g,d,f,v,m,h,y={evaluateCondition:function(e){if(e&&e.length>=2&&"/"===e[0]&&"/"===e[1])return!0;var t=e?+e:-1;return Number.isNaN(+t)?"true"===e.toLowerCase():0!==t}},w=function(){try{return window.self!==window.top}catch(e){return!0}},k=function(){var e=o(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getSheetList();case 2:return n=e.sent,e.abrupt("return",n.sort((function(e,t){return e.qData.rank-t.qData.rank})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=o(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getSheetList();case 2:return n=e.sent,r=n.filter((function(e){return y.evaluateCondition(e.qData.showCondition)})),e.abrupt("return",r.sort((function(e,t){return e.qData.rank-t.qData.rank})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),S=[{translation:"Object.ActionButton.NoNavigation",value:"none"},{translation:"Object.ActionButton.GoToNextSheet",value:"nextSheet",navigationCall:(h=o(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.senseNavigation,e.next=3,n.nextSheet();case 3:case"end":return e.stop()}}),e)}))),function(e){return h.apply(this,arguments)}),requiredInput:[]},{translation:"Object.ActionButton.GoToPreviousSheet",value:"prevSheet",navigationCall:(m=o(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.senseNavigation,e.next=3,n.prevSheet();case 3:case"end":return e.stop()}}),e)}))),function(e){return m.apply(this,arguments)}),requiredInput:[]},{translation:"Object.ActionButton.GoToLastSheet",value:"lastSheet",navigationCall:(v=o(regeneratorRuntime.mark((function e(t){var n,r,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.app,r=t.enableSheetShow,o=t.senseNavigation,!r){e.next=7;break}return e.next=4,x(n);case 4:e.t0=e.sent,e.next=10;break;case 7:return e.next=9,k(n);case 9:e.t0=e.sent;case 10:return a=e.t0,e.next=13,o.goToSheet(a[a.length-1].qInfo.qId);case 13:case"end":return e.stop()}}),e)}))),function(e){return v.apply(this,arguments)}),requiredInput:[]},{translation:"Object.ActionButton.GoToFirstSheet",value:"firstSheet",navigationCall:(f=o(regeneratorRuntime.mark((function e(t){var n,r,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.app,r=t.enableSheetShow,o=t.senseNavigation,!r){e.next=7;break}return e.next=4,x(n);case 4:e.t0=e.sent,e.next=10;break;case 7:return e.next=9,k(n);case 9:e.t0=e.sent;case 10:return a=e.t0,e.next=13,o.goToSheet(a[0].qInfo.qId);case 13:case"end":return e.stop()}}),e)}))),function(e){return f.apply(this,arguments)}),requiredInput:[]},{translation:"Object.ActionButton.GoToASheet",value:"goToSheet",navigationCall:(d=o(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.senseNavigation,r=t.sheet,e.t0=r,!e.t0){e.next=5;break}return e.next=5,n.goToSheet(r);case 5:case"end":return e.stop()}}),e)}))),function(e){return d.apply(this,arguments)}),requiredInput:["sheet"]},{translation:"Object.ActionButton.GoToSheetById",value:"goToSheetById",navigationCall:(g=o(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.senseNavigation,r=t.sheet,e.t0=r,!e.t0){e.next=5;break}return e.next=5,n.goToSheet(r);case 5:case"end":return e.stop()}}),e)}))),function(e){return g.apply(this,arguments)}),requiredInput:["sheetId"]},{translation:"Object.ActionButton.GoToStory",value:"goToStory",navigationCall:(b=o(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.senseNavigation,r=t.story,e.t0=r,!e.t0){e.next=5;break}return e.next=5,n.goToStory(r);case 5:case"end":return e.stop()}}),e)}))),function(e){return b.apply(this,arguments)}),requiredInput:["story"]},{translation:"Object.ActionButton.OpenWebsiteEmail",value:"openWebsite",navigationCall:(p=o(regeneratorRuntime.mark((function e(t){var n,r,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.websiteUrl,r=t.sameWindow;try{n&&(o=n.match(/^(https?:\/\/|mailto:)/)?n:"http://".concat(n),a="",r&&(a=w()?"_parent":"_self"),window.open(o,a))}catch(e){}case 2:case"end":return e.stop()}}),e)}))),function(e){return p.apply(this,arguments)}),requiredInput:["websiteUrl"]}],C=function(e,t){var n=S.find((function(t){return e.navigation.action===t.value}));return n&&n.requiredInput&&-1!==n.requiredInput.indexOf(t)};var A={getValue:function(e,t,n){var r,o=t.split(".");if(void 0===e)return n;for(r=0;r<o.length;++r){if(void 0===e[o[r]])return n;e=e[o[r]]}return e}};function q(e){switch(e){case"gotoSheet":return"goToSheet";case"gotoSheetById":return"goToSheetById";case"gotoStory":return"goToStory";case"switchToEdit":return"none";default:return e}}var I=function(e,t){var n={qChildren:[]},r=l({actions:[],props:{useEnabledCondition:null,fullWidth:"auto"},qLayoutExclude:{disabled:{}}},t);return e&&"qlik-button-for-navigation"===e.properties.visualization&&Object.keys(e.properties).forEach((function(t){var n;switch(t){case"props":n=e.properties[t],r.style.label=n.buttonLabel,r.style.icon.useIcon=n.buttonShowIcon,r.style.icon.iconType=n.buttonIconLui,r.style.font.align=n.buttonTextAlign,r.useEnabledCondition=n.useEnabledCondition,r.enabledCondition=n.enabledCondition,n.actionItems&&n.actionItems.forEach((function(e){!function(e,t){var n={actionType:e.actionType,bookmark:e.selectedBookmark,field:e.selectedField,variable:e.variable,value:e.value,softLock:e.softLock,cId:e.cId};switch(e.actionType){case"clearOther":n.actionType="clearAllButThis";break;case"unlockAllAndClearAll":n.actionType="clearAll",n.softLock=!0;break;case"selectField":n.actionType="selectMatchingValues";break;case"selectAndLockField":t.actions.push(l(l({},n),{},{cId:null,actionType:"selectMatchingValues"})),n.actionType="lockField"}t.actions.push(n)}(e,r)})),r.navigation={action:q(n.navigationAction),sheet:"gotoSheetById"===n.navigationAction?n.sheetId:n.selectedSheet,story:n.selectedStory,websiteUrl:n.websiteUrl,sameWindow:n.sameWindow};break;case"qStateName":case"showTitles":case"title":case"subtitle":case"footnote":r[t]=e.properties[t]}})),n.qProperty=r,n},R=[{value:"image",icon:"image",label:"Image"},{value:"back",icon:"back",label:"Back"},{value:"forward",icon:"forward",label:"Forward"},{value:"history",icon:"history",label:"History"},{value:"help",icon:"help",label:"Help"},{value:"info",icon:"info",label:"Info"},{value:"text",icon:"text",label:"Text"},{value:"group",icon:"group",label:"Group"},{value:"search",icon:"search",label:"Search"},{value:"zoom-in",icon:"zoom-in",label:"Zoom in"},{value:"zoom-out",icon:"zoom-out",label:"Zoom out"},{value:"export",icon:"export",label:"Export"},{value:"import",icon:"import",label:"Import"},{value:"field",icon:"field",label:"Field"},{value:"lock",icon:"lock",label:"Lock"},{value:"unlock",icon:"unlock",label:"Unlock"},{value:"database",icon:"database",label:"Database"},{value:"calendar",icon:"calendar",label:"Calendar"},{value:"bookmark",icon:"bookmark",label:"Bookmark"},{value:"library",icon:"library",label:"Library"},{value:"star",icon:"star",label:"Star"},{value:"print",icon:"print",label:"Print"},{value:"remove",icon:"remove",label:"Remove"},{value:"handle",icon:"handle",label:"Handle"},{value:"handle-horizontal",icon:"handle-horizontal",label:"Handle horizontal"},{value:"menu",icon:"menu",label:"Menu"},{value:"list",icon:"list",label:"List"},{value:"unordered-list",icon:"unordered-list",label:"Unordered list"},{value:"clock",icon:"clock",label:"Clock"},{value:"puzzle",icon:"puzzle",label:"Puzzle"},{value:"filterpane",icon:"filterpane",label:"Filterpane"},{value:"plus",icon:"plus",label:"Plus"},{value:"minus",icon:"minus",label:"Minus"},{value:"triangle-top",icon:"triangle-top",label:"Triangle top"},{value:"triangle-bottom",icon:"triangle-bottom",label:"Triangle bottom"},{value:"triangle-left",icon:"triangle-left",label:"Triangle left"},{value:"triangle-right",icon:"triangle-right",label:"Triangle right"},{value:"tick",icon:"tick",label:"Tick"},{value:"cogwheel",icon:"cogwheel",label:"Cogwheel"},{value:"settings",icon:"settings",label:"Settings"},{value:"cut",icon:"cut",label:"Cut"},{value:"copy",icon:"copy",label:"Copy"},{value:"paste",icon:"paste",label:"Paste"},{value:"camera",icon:"camera",label:"Camera"},{value:"slide-show",icon:"slide-show",label:"Slide show"},{value:"palette",icon:"palette",label:"Palette"},{value:"shapes",icon:"shapes",label:"Shapes"},{value:"effects",icon:"effects",label:"Effects"},{value:"file",icon:"file",label:"File"},{value:"expand",icon:"expand",label:"Expand"},{value:"collapse",icon:"collapse",label:"Collapse"},{value:"bin",icon:"bin",label:"Bin"},{value:"link",icon:"link",label:"Link"},{value:"pivot",icon:"pivot",label:"Pivot"},{value:"reload",icon:"reload",label:"Reload"},{value:"add",icon:"add",label:"Add"},{value:"edit",icon:"edit",label:"Edit"},{value:"key",icon:"key",label:"Key"},{value:"box",icon:"box",label:"Box"},{value:"home",icon:"home",label:"Home"},{value:"person",icon:"person",label:"Person"},{value:"grid",icon:"grid",label:"Grid"},{value:"cloud",icon:"cloud",label:"Cloud"},{value:"more",icon:"more",label:"More"},{value:"folder",icon:"folder",label:"Folder"},{value:"drop",icon:"drop",label:"Drop"},{value:"play",icon:"play",label:"Play"},{value:"tag",icon:"tag",label:"Tag"},{value:"close",icon:"close",label:"Close"},{value:"warning",icon:"warning",label:"Warning"},{value:"warning-triangle",icon:"warning-triangle",label:"Warning triangle"},{value:"share",icon:"share",label:"Share"},{value:"top",icon:"top",label:"Top"},{value:"low-resolution",icon:"low-resolution",label:"Low resolution"},{value:"high-resolution",icon:"high-resolution",label:"High resolution"},{value:"view",icon:"view",label:"View"},{value:"control",icon:"control",label:"Control"},{value:"code",icon:"code",label:"Code"},{value:"upload",icon:"upload",label:"Upload"},{value:"repair",icon:"repair",label:"Repair"},{value:"split",icon:"split",label:"Split"},{value:"up-down",icon:"up-down",label:"Up down"},{value:"disconnect",icon:"disconnect",label:"Disconnect"},{value:"photo-library",icon:"photo-library",label:"Photo library"},{value:"application",icon:"application",label:"Application"},{value:"new-tab",icon:"new-tab",label:"New tab"},{value:"ascending",icon:"ascending",label:"Ascending"},{value:"descending",icon:"descending",label:"Descending"},{value:"arrow-up",icon:"arrow-up",label:"Arrow up"},{value:"arrow-down",icon:"arrow-down",label:"Arrow down"},{value:"arrow-right",icon:"arrow-right",label:"Arrow right"},{value:"arrow-left",icon:"arrow-left",label:"Arrow left"},{value:"sync",icon:"sync",label:"Sync"},{value:"draggable",icon:"draggable",label:"Draggable"},{value:"book",icon:"book",label:"Book"},{value:"measure",icon:"measure",label:"Measure"},{value:"download",icon:"download",label:"Download"},{value:"more-rounded",icon:"more-rounded",label:"More rounded"},{value:"align-object-left",icon:"align-object-left",label:"Align object-left"},{value:"align-object-center",icon:"align-object-center",label:"Align object-center"},{value:"align-object-right",icon:"align-object-right",label:"Align object-right"},{value:"submit",icon:"submit",label:"Submit"},{value:"operators",icon:"operators",label:"Operators"},{value:"general-data-class",icon:"general-data-class",label:"General data-class"},{value:"building",icon:"building",label:"Building"},{value:"bell",icon:"bell",label:"Bell"},{value:"unlink",icon:"unlink",label:"Unlink"},{value:"lightbulb",icon:"lightbulb",label:"Lightbulb"},{value:"log-in",icon:"log-in",label:"Log in"},{value:"log-out",icon:"log-out",label:"Log out"},{value:"previous",icon:"previous",label:"Previous"},{value:"goto",icon:"goto",label:"Goto"},{value:"save",icon:"save",label:"Save"},{value:"pause",icon:"pause",label:"Pause"},{value:"stop",icon:"stop",label:"Stop"},{value:"step-in",icon:"step-in",label:"Step in"},{value:"comment",icon:"comment",label:"Comment"},{value:"indent",icon:"indent",label:"Indent"},{value:"undent",icon:"undent",label:"Undent"},{value:"filter",icon:"filter",label:"Filter"},{value:"clear-filter",icon:"clear-filter",label:"Clear filter"},{value:"insert",icon:"insert",label:"Insert"},{value:"direction-left",icon:"direction-left",label:"Direction left"},{value:"swap",icon:"swap",label:"Swap"},{value:"bubbles",icon:"bubbles",label:"Bubbles"},{value:"sheet",icon:"sheet",label:"Sheet"},{value:"object",icon:"object",label:"Object"},{value:"clear-selections",icon:"clear-selections",label:"Clear selections"},{value:"selections-tool",icon:"selections-tool",label:"Selections tool"},{value:"selections-reload",icon:"selections-reload",label:"Selections reload"},{value:"selections-back",icon:"selections-back",label:"Selections back"},{value:"selections-forward",icon:"selections-forward",label:"Selections forward"},{value:"expression",icon:"expression",label:"Expression"},{value:"select-alternative",icon:"select-alternative",label:"Select alternative"},{value:"select-possible",icon:"select-possible",label:"Select possible"},{value:"select-excluded",icon:"select-excluded",label:"Select excluded"},{value:"select-all",icon:"select-all",label:"Select all"},{value:"bar-chart",icon:"bar-chart",label:"Bar chart"},{value:"bar-chart-horizontal",icon:"bar-chart-horizontal",label:"Bar chart-horizontal"},{value:"line-chart",icon:"line-chart",label:"Line chart"},{value:"pie-chart",icon:"pie-chart",label:"Pie chart"},{value:"gauge-chart",icon:"gauge-chart",label:"Gauge chart"},{value:"kpi",icon:"kpi",label:"Kpi"},{value:"scatter-chart",icon:"scatter-chart",label:"Scatter chart"},{value:"map",icon:"map",label:"Map"},{value:"table",icon:"table",label:"Table"},{value:"pivot-table",icon:"pivot-table",label:"Pivot table"},{value:"treemap",icon:"treemap",label:"Treemap"},{value:"combo-chart",icon:"combo-chart",label:"Combo chart"},{value:"boxplot",icon:"boxplot",label:"Boxplot"},{value:"distributionplot",icon:"distributionplot",label:"Distributionplot"},{value:"histogram",icon:"histogram",label:"Histogram"},{value:"direct-discovery",icon:"direct-discovery",label:"Direct discovery"},{value:"data-model",icon:"data-model",label:"Data model"},{value:"script",icon:"script",label:"Script"},{value:"script-ok",icon:"script-ok",label:"Script ok"},{value:"debug",icon:"debug",label:"Debug"},{value:"auto-layout",icon:"auto-layout",label:"Auto layout"}],B=[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],O=[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}];function E(e){var t,n,r,a,i,l=e.translator,s=e.enableReloadAction;return{definition:{type:"items",component:"accordion",items:{actions:{type:"items",translation:"Object.ActionButton.ActionsAndNavigation",grouped:!0,items:{actions:{type:"array",translation:"Object.ActionButton.Actions",ref:"actions",itemTitleRef:function(e){if(e.actionLabel)return e.actionLabel;var t=e.actionType?"Object.ActionButton.InvalidAction":"Object.ActionButton.NewAction",n=c.find((function(t){return e.actionType===t.value}));return l.get(n&&n.translation||t)},allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"Object.ActionButton.AddAction",items:{label:{component:"string",ref:"actionLabel",translation:"Common.Label",expression:"optional",defaultValue:""},actionType:{type:"string",ref:"actionType",component:"expression-with-dropdown",translation:"Object.ActionButton.Action",defaultValue:"",options:function(){return c.filter((function(e){return s||"doReload"!==e.value}))},dropdownOnly:!0},bookmark:{type:"string",ref:"bookmark",component:"expression-with-dropdown",translation:"ExpressionEditor.SetExpresions.Bookmark",defaultValue:"",dropdownOnly:!0,options:(i=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.app.getBookmarkList();case 2:return r=e.sent,e.abrupt("return",r.map((function(e){return{label:e.qData.title,value:e.qInfo.qId}})));case 4:case"end":return e.stop()}}),e)}))),function(e,t){return i.apply(this,arguments)}),show:function(e){return u(e,"bookmark")}},field:{type:"string",ref:"field",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:(a=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.app.getFieldList();case 2:return r=e.sent,e.abrupt("return",r.map((function(e){return{label:e.qName,value:e.qName}})));case 4:case"end":return e.stop()}}),e)}))),function(e,t){return a.apply(this,arguments)}),show:function(e){return u(e,"field")}},variable:{type:"string",ref:"variable",component:"expression-with-dropdown",translation:"Common.Variable",defaultValue:"",expressionType:"StringExpression",options:(r=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.app.getVariableList();case 2:return r=e.sent,e.abrupt("return",r.filter((function(e){return!e.qIsReserved||e.qIsReserved&&t.showSystemVariables})).map((function(e){return{label:e.qName,value:e.qName}})));case 4:case"end":return e.stop()}}),e)}))),function(e,t){return r.apply(this,arguments)}),show:function(e){return u(e,"variable")}},showSystemVariables:{type:"boolean",ref:"showSystemVariables",translation:"ExpressionEditor.SystemVariables",defaultValue:!1,show:function(e){return u(e,"variable")}},softLock:{type:"boolean",ref:"softLock",translation:"Object.ActionButton.Softlock",defaultValue:!1,show:function(e){return u(e,"softLock")}},value:{type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(e){return u(e,"value")}},partial:{type:"boolean",ref:"partial",translation:"Object.ActionButton.Partial",defaultValue:!1,show:function(e){return u(e,"partial")}}}},navigation:{translation:"Object.ActionButton.Navigation",type:"items",items:{action:{ref:"navigation.action",translation:"Object.ActionButton.Navigation",component:"expression-with-dropdown",defaultValue:null,options:S,dropdownOnly:!0},sheetId:{type:"string",ref:"navigation.sheet",translation:"properties.sheet",expression:"optional",show:function(e){return C(e,"sheetId")}},sheet:{type:"string",ref:"navigation.sheet",translation:"properties.sheet",component:"expression-with-dropdown",expressionType:"StringExpression",show:function(e){return C(e,"sheet")},options:(n=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.app.getSheetList();case 2:return r=e.sent,e.abrupt("return",r.map((function(e){return{value:e.qInfo.qId,label:e.qMeta.title,showCondition:e.qData.showCondition}})));case 4:case"end":return e.stop()}}),e)}))),function(e,t){return n.apply(this,arguments)})},story:{type:"string",ref:"navigation.story",translation:"properties.story",component:"expression-with-dropdown",expressionType:"StringExpression",show:function(e){return C(e,"story")},options:(t=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.app.getStoryList();case 2:return r=e.sent,e.abrupt("return",r.map((function(e){return{value:e.qInfo.qId,label:e.qMeta.title}})));case 4:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})},websiteUrl:{type:"string",expression:"optional",ref:"navigation.websiteUrl",translation:"properties.website",show:function(e){return C(e,"websiteUrl")}},sameWindow:{type:"boolean",ref:"navigation.sameWindow",translation:"properties.sameWindow",show:function(e){return C(e,"websiteUrl")},defaultValue:!1}}}}},enableCondition:{type:"items",translation:"properties.enableConditionSection",items:{useCondition:{type:"boolean",component:"switch",translation:"properties.enableToggle",ref:"useEnabledCondition",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},condition:{ref:"enabledCondition",translation:"properties.enableCondition",type:"integer",expression:"optional",show:function(e){return e.useEnabledCondition}}}},settings:{component:"expandable-items",translation:"Common.Appearance",uses:"settings",items:{general:{type:"items",translation:"properties.general",items:{showTitles:{},details:{show:!1},label:{component:"string",ref:"style.label",translation:"Common.Label",expression:"optional"}}},font:{grouped:!0,type:"items",translation:"properties.font",items:{sizeAndColor:{type:"items",items:{fontSize:{component:"slider",type:"number",ref:"style.font.size",translation:"properties.fontSize",min:.2,max:1,step:.01},useFontColorExpression:{ref:"style.font.useColorExpression",type:"boolean",translation:"properties.fontColor",component:"dropdown",options:B},colorPicker:{component:"color-picker",type:"object",ref:"style.font.color",translation:"properties.color",dualOutput:!0,show:function(e){return!A.getValue(e,"style.font.useColorExpression")}},colorExpression:{component:"string",type:"string",ref:"style.font.colorExpression",translation:"Common.Expression",expression:"optional",show:function(e){return A.getValue(e,"style.font.useColorExpression")}}}},stylingAndAlign:{type:"items",items:{fontStyling:{component:"item-selection-list",type:"string",ref:"style.font.style",translation:"properties.textStyle",horizontal:!0,multipleSelect:!0,items:[{component:"icon-item",icon:"bold",value:"bold",translation:"Common.bold",labelPlacement:"bottom"},{component:"icon-item",icon:"italic",value:"italic",translation:"Common.italic",labelPlacement:"bottom"},{component:"icon-item",icon:"underline",value:"underline",translation:"Common.underline",labelPlacement:"bottom"}]},textAlign:{component:"item-selection-list",type:"string",ref:"style.font.align",translation:"properties.Alignment",horizontal:!0,items:[{component:"icon-item",icon:"align_left",value:"left",translation:"properties.dock.left",labelPlacement:"bottom"},{component:"icon-item",icon:"align_center",value:"center",translation:"Common.Center",labelPlacement:"bottom"},{component:"icon-item",icon:"align_right",value:"right",translation:"properties.dock.right",labelPlacement:"bottom"}]}}}}},background:{grouped:!0,type:"items",translation:"properties.background",items:{backgroundColor:{type:"items",items:{useColorExpression:{ref:"style.background.useColorExpression",type:"boolean",translation:"AppDetails.SheetBackgroundColor",component:"dropdown",options:B},colorPicker:{component:"color-picker",type:"object",ref:"style.background.color",translation:"properties.color",dualOutput:!0,show:function(e){return!A.getValue(e,"style.background.useColorExpression")}},colorExpression:{component:"string",type:"string",ref:"style.background.colorExpression",translation:"Common.Expression",expression:"optional",show:function(e){return A.getValue(e,"style.background.useColorExpression")}}}},backgroundImage:{type:"items",items:{useBackgroundImage:{ref:"style.background.useImage",type:"boolean",translation:"properties.backgroundImage.use",component:"switch",options:O},backgroundUrl:{ref:"style.background.url.qStaticContentUrlDef.qUrl",layoutRef:"style.background.url.qStaticContentUrl.qUrl",schemaIgnore:!0,translation:"Common.Image",tooltip:{select:"properties.media.select",remove:"properties.media.removeBackground"},type:"string",component:"media",show:function(e){return A.getValue(e,"style.background.useImage")}},backgroundSize:{ref:"style.background.size",translation:"properties.backgroundImage.size",type:"string",component:"dropdown",options:[{value:"auto",translation:"properties.backgroundImage.originalSize"},{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"alwaysFill",translation:"properties.backgroundImage.sizeAlwaysFill"}],show:function(e){return A.getValue(e,"style.background.useImage")&&!!A.getValue(e,"style.background.url.qStaticContentUrlDef.qUrl")}},backgroundPosition:{ref:"style.background.position",translation:"Common.Position",type:"string",component:"align-matrix",show:function(e){return A.getValue(e,"style.background.useImage")&&A.getValue(e,"style.background.url.qStaticContentUrlDef.qUrl")&&"fill"!==A.getValue(e,"style.background.size")},currentSize:function(e){return A.getValue(e,"style.background.size")}}}}}},border:{type:"items",grouped:!0,translation:"properties.border",items:{borderSettings:{type:"items",items:{useBorder:{ref:"style.border.useBorder",type:"boolean",translation:"properties.border.use",component:"switch",options:O},borderRadius:{component:"slider",show:function(e){return A.getValue(e,"style.border.useBorder")},translation:"properties.border.radius",type:"number",ref:"style.border.radius",min:0,max:1,step:.01},borderWidth:{component:"slider",show:function(e){return A.getValue(e,"style.border.useBorder")},type:"number",ref:"style.border.width",translation:"properties.border.width",min:0,max:.5,step:.005},colorDropdown:{type:"string",show:function(e){return A.getValue(e,"style.border.useBorder")},component:"dropdown",translation:"properties.border.color",ref:"style.border.useColorExpression",options:B},colorPicker:{component:"color-picker",type:"object",ref:"style.border.color",translation:"properties.color",dualOutput:!0,show:function(e){return A.getValue(e,"style.border.useBorder")&&!A.getValue(e,"style.border.useColorExpression")}},colorExpression:{component:"string",type:"string",ref:"style.border.colorExpression",translation:"Common.Expression",show:function(e){return A.getValue(e,"style.border.useBorder")&&A.getValue(e,"style.border.useColorExpression")},expression:"optional"}}}}},icon:{type:"items",grouped:!0,translation:"properties.icon",items:{iconSettings:{type:"items",items:{useIcon:{ref:"style.icon.useIcon",type:"boolean",translation:"properties.icon.use",component:"switch",options:O},iconType:{ref:"style.icon.iconType",component:"expression-with-dropdown",translation:"properties.icon",defaultValue:"",options:R,expressionType:"StringExpression",show:function(e){return A.getValue(e,"style.icon.useIcon")}},iconPosition:{ref:"style.icon.position",component:"dropdown",translation:"Common.Position",options:[{translation:"properties.dock.left",value:"left"},{translation:"properties.dock.right",value:"right"}],show:function(e){return A.getValue(e,"style.icon.useIcon")}}}}}}}}}},importProperties:I,exportProperties:null,support:{export:!1,exportData:!1,snapshot:!1,viewData:!1,quickMobile:!0}}}var T={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},rebeccapurple:{r:102,g:51,b:153},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},j=function(e){var t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return"rgb(".concat(t[1],",").concat(t[2],",").concat(t[3],")");if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e)){var n=Math.round(t[1]/255*100)/100;return"rgba(".concat(t[2],",").concat(t[3],",").concat(t[4],",").concat(n,")")}if(t=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(e))return e;var r=e&&T[e.toLowerCase()];if(r){var o=void 0!==r.a?r.a:1;return"rgba(".concat(r.r,",").concat(r.g,",").concat(r.b,",").concat(o,")")}return"none"},L=function(e){var t,n,r,o;if(e.length>7){var a=-1!==(t=e.split(","))[0].indexOf("a");return n=a?parseInt(t[0].slice(5),10):parseInt(t[0].slice(4),10),o=parseInt(t[1],10),r=parseInt(t[2],10),"".concat((a?"rgba(":"rgb(")+(Math.round(.15*(0-n))+n),",").concat(Math.round(.15*(0-o))+o,",").concat(Math.round(.15*(0-r))+r).concat(a?",".concat(t[3]):")")}return n=(t=parseInt(e.slice(1),16))>>16,o=t>>8&255,r=255&t,"#".concat((16777216+65536*(Math.round(.15*(0-n))+n)+256*(Math.round(.15*(0-o))+o)+(Math.round(.15*(0-r))+r)).toString(16).slice(1))},z=function(e){e.replace(/^\.\.\//i,"/"),e=(e=e.replace(/"/g,'\\"')).replace(/'/g,"\\'");var t=document.createElement("a");return t.href="../",e=t.href+("/"===e[0]?e.substr(1):e)},N={auto:"auto auto",alwaysFit:"contain",fitWidth:"100% auto",fitHeight:"auto 100%",fill:"100% 100%",alwaysFill:"cover"},V={topLeft:"0% 0%",centerLeft:"50% 0%",bottomLeft:"100% 0%",topCenter:"0% 50%",centerCenter:"50% 50%",bottomCenter:"100% 50%",topRight:"0% 100%",centerRight:"50% 100%",bottomRight:"100% 100%"},F=function(e,t){return"".concat(e,": ").concat(t,";")},P=function(e,t,n){var r,o=e.useColorExpression,a=e.colorExpression,i=e.color;return o?r=j(a):"string"==typeof i?r=i:i&&(r=n.getColorPickerColor(i)),r&&"none"!==r?r:t},D=function(e){var t=e.style,n=e.disabled,r=e.theme,o=e.element,a="width: 100%;height: 100%;transition: transform .1s ease-in-out;",i=t.font,l=t.background,s=t.border,c=r.getDataColorSpecials().primary;a+=n?F("opacity",.4):F("cursor","pointer"),a+=F("color",P(i,"#ffffff",r)),i.style.bold&&(a+=F("font-weight","bold")),i.style.italic&&(a+=F("font-style","italic"));var u=P(l,c,r);if(a+=F("background-color",u),l.useImage&&l.url.qStaticContentUrl){var p=l.url.qStaticContentUrl.qUrl;p&&(p=z(p),a+=F("background-image","url('".concat(p,"')")),a+=F("background-size",N[l.size]),a+=F("background-position",V[l.position]),a+=F("background-repeat","no-repeat"))}if(s.useBorder){var b=Math.min(o.offsetWidth,o.offsetHeight),g=P(s,L(u),r),d=s.width*b/2;a+=F("border","".concat(d,"px solid ").concat(g)),a+=F("border-radius","".concat(s.radius*b/2,"px"))}else a+="border: none;";return a},M=function(e){var t=e.button,n=e.theme,r=e.style,o=e.isSense,a=r.icon,i=r.font,l=r.label,s=document.createElement("text");s.style.whiteSpace="nowrap",s.style.fontFamily=n.getStyle("","","fontFamily");var c=document.createElement("span");c.textContent=l,c.style.whiteSpace="nowrap",c.style.textOverflow="ellipsis",c.style.overflow="visible",i.style.underline&&(c.style.textDecoration="underline"),s.appendChild(c);var u=o&&a.useIcon&&""!==a.iconType;if(u){var p=document.createElement("span"),b=R.find((function(e){return e.label===a.iconType||e.value===a.iconType}));p.style.textDecoration="none",p.style.fontSize="inherit",p.setAttribute("class","lui-icon lui-icon--".concat(b?b.value:"")),"left"===a.position?s.insertBefore(p,c):s.appendChild(p)}t.innerHTML="",t.appendChild(s),s.style.fontSize="".concat(t.clientHeight,"px");var g=t.clientHeight/s.offsetHeight*t.clientHeight;s.style.fontSize="".concat(g,"px"),s.offsetWidth>t.clientWidth&&(g*=t.clientWidth/s.offsetWidth),i.style.italic?u?(s.style.fontSize="".concat(Math.max(g*i.size*.84,8),"px"),s.children[0].style.marginRight="".concat(.04*s.offsetWidth,"px"),s.children[1].style.marginRight="".concat(.04*s.offsetWidth,"px")):(s.style.fontSize="".concat(Math.max(g*i.size*.9,8),"px"),s.children[0].style.marginRight="".concat(.02*s.offsetWidth,"px")):u?(s.style.fontSize="".concat(Math.max(g*i.size*.88,8),"px"),s.children[0].style.marginRight="".concat(.04*s.offsetWidth,"px")):s.style.fontSize="".concat(Math.max(g*i.size*.92,8),"px"),"8px"===s.style.fontSize&&s.children.forEach((function(e){e.style.overflow="hidden"})),s.style.margin="0 3%",s.style.display="flex",s.style.alignItems="center",s.style.justifyContent="left"===i.align?"flex-start":"right"===i.align?"flex-end":"center"},U=function(){var e=o(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<t.length)){e.next=7;break}return e.next=4,t[n]();case 4:n++,e.next=1;break;case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return function(r){var a=r.sense,i=r.translator,s=r.flags,u=a&&a.navigation,p=s.isEnabled,b=p("SHEET_SHOW_CONDITION"),g=p("ACTION_BUTTON_RELOAD");return t.style.label=a?i.get("Object.ActionButton"):"Button",{qae:{properties:t,data:n},component:function(){var t=e.useElement(),n=e.useTheme();e.useMemo((function(){var e=document.createElement("button");e.appendChild(document.createElement("text")),t.appendChild(e)}),[]);var r=e.useStaleLayout(),a=e.useApp(),i=e.useConstraints(),s=function(e){var t=e.layout,n=e.theme,r=e.app,a=e.constraints,i=e.senseNavigation,s=e.element,u=e.enableSheetShow,p=!!i,b=s.firstElementChild,g=t.style,d=t.qStateName,f=t.useEnabledCondition&&0===t.enabledCondition,v=!f&&!a.active,m=D({style:g,disabled:f,theme:n,element:s});b.setAttribute("style",m),M({button:b,theme:n,style:g,isSense:p}),b.onclick=o(regeneratorRuntime.mark((function e(){var n,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!v){e.next=14;break}return n=[],t.actions.forEach((function(e){var t=c.find((function(t){return t.value===e.actionType}));t&&n.push(t.getActionCall(l({app:r,qStateName:d},e)))})),b.setAttribute("disabled",!0),e.next=7,U(n);case 7:if(!i||i.getCurrentStoryId()){e.next=13;break}if(o=t.navigation,a=o&&S.find((function(e){return e.value===o.action})),!i||!a||"function"!=typeof a.navigationCall){e.next=13;break}return e.next=13,a.navigationCall(l({app:r,enableSheetShow:u,senseNavigation:i},o));case 13:b.removeAttribute("disabled");case 14:case"end":return e.stop()}}),e)})));var h=function(){if(v){var e=b.offsetWidth,t=b.offsetHeight;b.style.transform=t>e?"scale(".concat(.98,", ",1-e/t*.02,")"):"scale(".concat(1-t/e*.02,", ",.98,")")}},y=function(){var e=b.style.transform;v&&""!==e&&"scale(1)"!==e&&(b.style.transform="scale(1)")};return b.onmousedown=function(e){0===e.button&&h()},b.onmouseup=y,b.onmouseleave=y,b.ontouchstart=h,b.ontouchend=y,b.ontouchcancel=y,function(){b.onclick=void 0,b.onmousedown=void 0,b.onmouseup=void 0,b.onmouseleave=void 0,b.ontouchstart=void 0,b.ontouchend=void 0,b.ontouchcancel=void 0}}({element:t,layout:r,constraints:i,theme:n,app:a,senseNavigation:u,enableSheetShow:b});e.useEffect((function(){return function(){s()}}),[t])},ext:E({translator:i,enableReloadAction:g})}}}));
7
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@nebula.js/stardust")):"function"==typeof define&&define.amd?define(["@nebula.js/stardust"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["sn-action-button"]=t(e.stardust)}(this,(function(e){"use strict";var t={showTitles:!1,title:"",subtitle:"",footnote:"",useEnabledCondition:!1,enabledCondition:1,navigation:{action:"none"},style:{label:"Button",font:{size:.5,useColorExpression:!1,color:{index:-1,color:null},colorExpression:"",style:{bold:!0,italic:!1,underline:!1},align:"center"},background:{useColorExpression:!1,color:{index:-1,color:null},colorExpression:"",useImage:!1,url:{qStaticContentUrlDef:{qUrl:""}},size:"auto",position:"centerCenter"},border:{useBorder:!1,radius:0,width:0,useColorExpression:!1,color:{index:-1,color:null},colorExpression:""},icon:{useIcon:!1,iconType:"",position:"left"}},actions:[]},n={targets:[]};function r(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,a){var i=e.apply(t,n);function l(e){r(i,o,a,l,s,"next",e)}function s(e){r(i,o,a,l,s,"throw",e)}l(void 0)}))}}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(){var e=o(regeneratorRuntime.mark((function e(t,n,r){var o,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.split(";"),!r){e.next=8;break}return a="",o.forEach((function(e){a+="Num('".concat(e,"')&';'&")})),e.next=6,t.evaluate(a.slice(0,-5));case 6:i=e.sent,o=i.split(";");case 8:return e.abrupt("return",o.map((function(e){return Number.isNaN(+e)?{qText:e}:{qIsNumeric:!0,qNumber:Number(e)}})));case 9:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),c=[{value:"applyBookmark",translation:"Object.ActionButton.ApplyBookmark",group:"bookmark",getActionCall:function(e){var t=e.app,n=e.bookmark;return o(regeneratorRuntime.mark((function e(){var r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getBookmarkList();case 2:if(r=e.sent,o=r.find((function(e){return e.qData.title===n})),e.t0=n,!e.t0){e.next=8;break}return e.next=8,t.applyBookmark(o&&o.qInfo&&o.qInfo.qId||n);case 8:case"end":return e.stop()}}),e)})))},requiredInput:["bookmark"]},{value:"back",translation:"Object.ActionButton.MoveBackward",group:"selection",getActionCall:function(e){var t=e.app;return o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.back();case 2:case"end":return e.stop()}}),e)})))},requiredInput:[]},{value:"forward",translation:"Object.ActionButton.MoveForward",group:"selection",getActionCall:function(e){var t=e.app;return o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.forward();case 2:case"end":return e.stop()}}),e)})))},requiredInput:[]},{value:"clearAll",translation:"Object.ActionButton.ClearAll",group:"selection",getActionCall:function(e){var t=e.app,n=e.softLock;return o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.clearAll(n);case 2:case"end":return e.stop()}}),e)})))},requiredInput:["softLock"]},{value:"clearAllButThis",translation:"Object.ActionButton.ClearAllButThis",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.softLock;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.clearAllButThis(a);case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field","softLock"]},{value:"clearField",translation:"Object.ActionButton.ClearSelectionInField",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.clear();case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field"]},{value:"selectAll",translation:"Object.ActionButton.SelectAllInField",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.softLock;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.selectAll(a);case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field","softLock"]},{value:"selectValues",translation:"Object.ActionButton.SelectValuesInField",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.value,i=e.softLock;return o(regeneratorRuntime.mark((function e(){var o,l,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r||!a){e.next=12;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,t.getFieldDescription(r);case 6:return l=e.sent,e.next=9,s(t,a,l.qTags.includes("$date"));case 9:return c=e.sent,e.next=12,o.selectValues(c,!1,i);case 12:case"end":return e.stop()}}),e)})))},requiredInput:["field","value","softLock"]},{value:"selectMatchingValues",translation:"Object.ActionButton.SelectMatchingValues",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.value,i=e.softLock;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r||!a){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.select(a,!1,i);case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field","value","softLock"]},{value:"selectAlternative",translation:"Object.ActionButton.SelectAlternatives",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.softLock;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.selectAlternative(a);case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field","softLock"]},{value:"selectExcluded",translation:"Object.ActionButton.SelectExcluded",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.softLock;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.selectExcluded(a);case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field","softLock"]},{value:"selectPossible",translation:"Object.ActionButton.SelectPossibleValues",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.softLock;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.selectPossible(a);case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field","softLock"]},{value:"toggleSelect",translation:"Object.ActionButton.ToggleFieldSelection",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field,a=e.value,i=e.softLock;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r||!a){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.toggleSelect(a,i);case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field","value","softLock"]},{value:"lockAll",translation:"Object.ActionButton.LockAllSelections",group:"selection",getActionCall:function(e){var t=e.app;return o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.lockAll();case 2:case"end":return e.stop()}}),e)})))},requiredInput:[]},{value:"lockField",translation:"Object.ActionButton.LockField",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.lock();case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field"]},{value:"unlockAll",translation:"Object.ActionButton.UnlockAllSelections",group:"selection",getActionCall:function(e){var t=e.app;return o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.unlockAll();case 2:case"end":return e.stop()}}),e)})))},requiredInput:[]},{value:"unlockField",translation:"Object.ActionButton.UnlockAField",group:"selection",getActionCall:function(e){var t=e.app,n=e.qStateName,r=e.field;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=6;break}return e.next=3,t.getField(r,n);case 3:return o=e.sent,e.next=6,o.unlock();case 6:case"end":return e.stop()}}),e)})))},requiredInput:["field"]},{value:"setVariable",translation:"Object.ActionButton.SetVariable",group:"variables",getActionCall:function(e){var t=e.app,n=e.variable,r=e.value;return o(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!r){e.next=11;break}return e.prev=1,e.next=4,t.getVariableByName(n);case 4:return o=e.sent,e.next=7,o.setStringValue(r);case 7:e.next=11;break;case 9:e.prev=9,e.t0=e.catch(1);case 11:case"end":return e.stop()}}),e,null,[[1,9]])})))},requiredInput:["variable","value"]},{value:"doReload",translation:"Object.ActionButton.DoReload",group:"reload",getActionCall:function(e){var t=e.app,n=e.partial;return o(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.doReload(0,!!n,!1);case 2:if(!e.sent){e.next=6;break}return e.next=6,t.doSave();case 6:case"end":return e.stop()}}),e)})))},requiredInput:["partial"]}];function u(e,t){var n=c.find((function(t){return e.actionType===t.value}));return n&&n.requiredInput&&-1!==n.requiredInput.indexOf(t)}var p,b,g,d,f,m,v,h,y={evaluateCondition:function(e){if(e&&e.length>=2&&"/"===e[0]&&"/"===e[1])return!0;var t=e?+e:-1;return Number.isNaN(+t)?"true"===e.toLowerCase():0!==t}},w=function(){try{return window.self!==window.top}catch(e){return!0}},k=function(){var e=o(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getSheetList();case 2:return n=e.sent,r=n.filter((function(e){return y.evaluateCondition(e.qData.showCondition)})),e.abrupt("return",r.sort((function(e,t){return e.qData.rank-t.qData.rank})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),x=[{translation:"Object.ActionButton.NoNavigation",value:"none"},{translation:"Object.ActionButton.GoToNextSheet",value:"nextSheet",navigationCall:(h=o(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.senseNavigation,e.next=3,n.nextSheet();case 3:case"end":return e.stop()}}),e)}))),function(e){return h.apply(this,arguments)}),requiredInput:[]},{translation:"Object.ActionButton.GoToPreviousSheet",value:"prevSheet",navigationCall:(v=o(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.senseNavigation,e.next=3,n.prevSheet();case 3:case"end":return e.stop()}}),e)}))),function(e){return v.apply(this,arguments)}),requiredInput:[]},{translation:"Object.ActionButton.GoToLastSheet",value:"lastSheet",navigationCall:(m=o(regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.app,r=t.senseNavigation,e.next=3,k(n);case 3:return o=e.sent,e.next=6,r.goToSheet(o[o.length-1].qInfo.qId);case 6:case"end":return e.stop()}}),e)}))),function(e){return m.apply(this,arguments)}),requiredInput:[]},{translation:"Object.ActionButton.GoToFirstSheet",value:"firstSheet",navigationCall:(f=o(regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.app,r=t.senseNavigation,e.next=3,k(n);case 3:return o=e.sent,e.next=6,r.goToSheet(o[0].qInfo.qId);case 6:case"end":return e.stop()}}),e)}))),function(e){return f.apply(this,arguments)}),requiredInput:[]},{translation:"Object.ActionButton.GoToASheet",value:"goToSheet",navigationCall:(d=o(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.senseNavigation,r=t.sheet,e.t0=r,!e.t0){e.next=5;break}return e.next=5,n.goToSheet(r);case 5:case"end":return e.stop()}}),e)}))),function(e){return d.apply(this,arguments)}),requiredInput:["sheet"]},{translation:"Object.ActionButton.GoToSheetById",value:"goToSheetById",navigationCall:(g=o(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.senseNavigation,r=t.sheet,e.t0=r,!e.t0){e.next=5;break}return e.next=5,n.goToSheet(r);case 5:case"end":return e.stop()}}),e)}))),function(e){return g.apply(this,arguments)}),requiredInput:["sheetId"]},{translation:"Object.ActionButton.GoToStory",value:"goToStory",navigationCall:(b=o(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.senseNavigation,r=t.story,e.t0=r,!e.t0){e.next=5;break}return e.next=5,n.goToStory(r);case 5:case"end":return e.stop()}}),e)}))),function(e){return b.apply(this,arguments)}),requiredInput:["story"]},{translation:"Object.ActionButton.OpenWebsiteEmail",value:"openWebsite",navigationCall:(p=o(regeneratorRuntime.mark((function e(t){var n,r,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.websiteUrl,r=t.sameWindow;try{n&&(o=n.match(/^(https?:\/\/|mailto:)/)?n:"http://".concat(n),a="",r&&(a=w()?"_parent":"_self"),window.open(o,a))}catch(e){}case 2:case"end":return e.stop()}}),e)}))),function(e){return p.apply(this,arguments)}),requiredInput:["websiteUrl"]}],S=function(e,t){var n=x.find((function(t){return e.navigation.action===t.value}));return n&&n.requiredInput&&-1!==n.requiredInput.indexOf(t)};var C={getValue:function(e,t,n){var r,o=t.split(".");if(void 0===e)return n;for(r=0;r<o.length;++r){if(void 0===e[o[r]])return n;e=e[o[r]]}return e}};function A(e){switch(e){case"gotoSheet":return"goToSheet";case"gotoSheetById":return"goToSheetById";case"gotoStory":return"goToStory";case"switchToEdit":return"none";default:return e}}var q=function(e,t){var n={qChildren:[]},r=l({actions:[],props:{useEnabledCondition:null,fullWidth:"auto"},qLayoutExclude:{disabled:{}}},t);return e&&"qlik-button-for-navigation"===e.properties.visualization&&Object.keys(e.properties).forEach((function(t){var n;switch(t){case"props":n=e.properties[t],r.style.label=n.buttonLabel,r.style.icon.useIcon=n.buttonShowIcon,r.style.icon.iconType=n.buttonIconLui,r.style.font.align=n.buttonTextAlign,r.useEnabledCondition=n.useEnabledCondition,r.enabledCondition=n.enabledCondition,n.actionItems&&n.actionItems.forEach((function(e){!function(e,t){var n={actionType:e.actionType,bookmark:e.selectedBookmark,field:e.selectedField,variable:e.variable,value:e.value,softLock:e.softLock,cId:e.cId};switch(e.actionType){case"clearOther":n.actionType="clearAllButThis";break;case"unlockAllAndClearAll":n.actionType="clearAll",n.softLock=!0;break;case"selectField":n.actionType="selectMatchingValues";break;case"selectAndLockField":t.actions.push(l(l({},n),{},{cId:null,actionType:"selectMatchingValues"})),n.actionType="lockField"}t.actions.push(n)}(e,r)})),r.navigation={action:A(n.navigationAction),sheet:"gotoSheetById"===n.navigationAction?n.sheetId:n.selectedSheet,story:n.selectedStory,websiteUrl:n.websiteUrl,sameWindow:n.sameWindow};break;case"qStateName":case"showTitles":case"title":case"subtitle":case"footnote":r[t]=e.properties[t]}})),n.qProperty=r,n},I=[{value:"image",icon:"image",label:"Image"},{value:"back",icon:"back",label:"Back"},{value:"forward",icon:"forward",label:"Forward"},{value:"history",icon:"history",label:"History"},{value:"help",icon:"help",label:"Help"},{value:"info",icon:"info",label:"Info"},{value:"text",icon:"text",label:"Text"},{value:"group",icon:"group",label:"Group"},{value:"search",icon:"search",label:"Search"},{value:"zoom-in",icon:"zoom-in",label:"Zoom in"},{value:"zoom-out",icon:"zoom-out",label:"Zoom out"},{value:"export",icon:"export",label:"Export"},{value:"import",icon:"import",label:"Import"},{value:"field",icon:"field",label:"Field"},{value:"lock",icon:"lock",label:"Lock"},{value:"unlock",icon:"unlock",label:"Unlock"},{value:"database",icon:"database",label:"Database"},{value:"calendar",icon:"calendar",label:"Calendar"},{value:"bookmark",icon:"bookmark",label:"Bookmark"},{value:"library",icon:"library",label:"Library"},{value:"star",icon:"star",label:"Star"},{value:"print",icon:"print",label:"Print"},{value:"remove",icon:"remove",label:"Remove"},{value:"handle",icon:"handle",label:"Handle"},{value:"handle-horizontal",icon:"handle-horizontal",label:"Handle horizontal"},{value:"menu",icon:"menu",label:"Menu"},{value:"list",icon:"list",label:"List"},{value:"unordered-list",icon:"unordered-list",label:"Unordered list"},{value:"clock",icon:"clock",label:"Clock"},{value:"puzzle",icon:"puzzle",label:"Puzzle"},{value:"filterpane",icon:"filterpane",label:"Filterpane"},{value:"plus",icon:"plus",label:"Plus"},{value:"minus",icon:"minus",label:"Minus"},{value:"triangle-top",icon:"triangle-top",label:"Triangle top"},{value:"triangle-bottom",icon:"triangle-bottom",label:"Triangle bottom"},{value:"triangle-left",icon:"triangle-left",label:"Triangle left"},{value:"triangle-right",icon:"triangle-right",label:"Triangle right"},{value:"tick",icon:"tick",label:"Tick"},{value:"cogwheel",icon:"cogwheel",label:"Cogwheel"},{value:"settings",icon:"settings",label:"Settings"},{value:"cut",icon:"cut",label:"Cut"},{value:"copy",icon:"copy",label:"Copy"},{value:"paste",icon:"paste",label:"Paste"},{value:"camera",icon:"camera",label:"Camera"},{value:"slide-show",icon:"slide-show",label:"Slide show"},{value:"palette",icon:"palette",label:"Palette"},{value:"shapes",icon:"shapes",label:"Shapes"},{value:"effects",icon:"effects",label:"Effects"},{value:"file",icon:"file",label:"File"},{value:"expand",icon:"expand",label:"Expand"},{value:"collapse",icon:"collapse",label:"Collapse"},{value:"bin",icon:"bin",label:"Bin"},{value:"link",icon:"link",label:"Link"},{value:"pivot",icon:"pivot",label:"Pivot"},{value:"reload",icon:"reload",label:"Reload"},{value:"add",icon:"add",label:"Add"},{value:"edit",icon:"edit",label:"Edit"},{value:"key",icon:"key",label:"Key"},{value:"box",icon:"box",label:"Box"},{value:"home",icon:"home",label:"Home"},{value:"person",icon:"person",label:"Person"},{value:"grid",icon:"grid",label:"Grid"},{value:"cloud",icon:"cloud",label:"Cloud"},{value:"more",icon:"more",label:"More"},{value:"folder",icon:"folder",label:"Folder"},{value:"drop",icon:"drop",label:"Drop"},{value:"play",icon:"play",label:"Play"},{value:"tag",icon:"tag",label:"Tag"},{value:"close",icon:"close",label:"Close"},{value:"warning",icon:"warning",label:"Warning"},{value:"warning-triangle",icon:"warning-triangle",label:"Warning triangle"},{value:"share",icon:"share",label:"Share"},{value:"top",icon:"top",label:"Top"},{value:"low-resolution",icon:"low-resolution",label:"Low resolution"},{value:"high-resolution",icon:"high-resolution",label:"High resolution"},{value:"view",icon:"view",label:"View"},{value:"control",icon:"control",label:"Control"},{value:"code",icon:"code",label:"Code"},{value:"upload",icon:"upload",label:"Upload"},{value:"repair",icon:"repair",label:"Repair"},{value:"split",icon:"split",label:"Split"},{value:"up-down",icon:"up-down",label:"Up down"},{value:"disconnect",icon:"disconnect",label:"Disconnect"},{value:"photo-library",icon:"photo-library",label:"Photo library"},{value:"application",icon:"application",label:"Application"},{value:"new-tab",icon:"new-tab",label:"New tab"},{value:"ascending",icon:"ascending",label:"Ascending"},{value:"descending",icon:"descending",label:"Descending"},{value:"arrow-up",icon:"arrow-up",label:"Arrow up"},{value:"arrow-down",icon:"arrow-down",label:"Arrow down"},{value:"arrow-right",icon:"arrow-right",label:"Arrow right"},{value:"arrow-left",icon:"arrow-left",label:"Arrow left"},{value:"sync",icon:"sync",label:"Sync"},{value:"draggable",icon:"draggable",label:"Draggable"},{value:"book",icon:"book",label:"Book"},{value:"measure",icon:"measure",label:"Measure"},{value:"download",icon:"download",label:"Download"},{value:"more-rounded",icon:"more-rounded",label:"More rounded"},{value:"align-object-left",icon:"align-object-left",label:"Align object-left"},{value:"align-object-center",icon:"align-object-center",label:"Align object-center"},{value:"align-object-right",icon:"align-object-right",label:"Align object-right"},{value:"submit",icon:"submit",label:"Submit"},{value:"operators",icon:"operators",label:"Operators"},{value:"general-data-class",icon:"general-data-class",label:"General data-class"},{value:"building",icon:"building",label:"Building"},{value:"bell",icon:"bell",label:"Bell"},{value:"unlink",icon:"unlink",label:"Unlink"},{value:"lightbulb",icon:"lightbulb",label:"Lightbulb"},{value:"log-in",icon:"log-in",label:"Log in"},{value:"log-out",icon:"log-out",label:"Log out"},{value:"previous",icon:"previous",label:"Previous"},{value:"goto",icon:"goto",label:"Goto"},{value:"save",icon:"save",label:"Save"},{value:"pause",icon:"pause",label:"Pause"},{value:"stop",icon:"stop",label:"Stop"},{value:"step-in",icon:"step-in",label:"Step in"},{value:"comment",icon:"comment",label:"Comment"},{value:"indent",icon:"indent",label:"Indent"},{value:"undent",icon:"undent",label:"Undent"},{value:"filter",icon:"filter",label:"Filter"},{value:"clear-filter",icon:"clear-filter",label:"Clear filter"},{value:"insert",icon:"insert",label:"Insert"},{value:"direction-left",icon:"direction-left",label:"Direction left"},{value:"swap",icon:"swap",label:"Swap"},{value:"bubbles",icon:"bubbles",label:"Bubbles"},{value:"sheet",icon:"sheet",label:"Sheet"},{value:"object",icon:"object",label:"Object"},{value:"clear-selections",icon:"clear-selections",label:"Clear selections"},{value:"selections-tool",icon:"selections-tool",label:"Selections tool"},{value:"selections-reload",icon:"selections-reload",label:"Selections reload"},{value:"selections-back",icon:"selections-back",label:"Selections back"},{value:"selections-forward",icon:"selections-forward",label:"Selections forward"},{value:"expression",icon:"expression",label:"Expression"},{value:"select-alternative",icon:"select-alternative",label:"Select alternative"},{value:"select-possible",icon:"select-possible",label:"Select possible"},{value:"select-excluded",icon:"select-excluded",label:"Select excluded"},{value:"select-all",icon:"select-all",label:"Select all"},{value:"bar-chart",icon:"bar-chart",label:"Bar chart"},{value:"bar-chart-horizontal",icon:"bar-chart-horizontal",label:"Bar chart-horizontal"},{value:"line-chart",icon:"line-chart",label:"Line chart"},{value:"pie-chart",icon:"pie-chart",label:"Pie chart"},{value:"gauge-chart",icon:"gauge-chart",label:"Gauge chart"},{value:"kpi",icon:"kpi",label:"Kpi"},{value:"scatter-chart",icon:"scatter-chart",label:"Scatter chart"},{value:"map",icon:"map",label:"Map"},{value:"table",icon:"table",label:"Table"},{value:"pivot-table",icon:"pivot-table",label:"Pivot table"},{value:"treemap",icon:"treemap",label:"Treemap"},{value:"combo-chart",icon:"combo-chart",label:"Combo chart"},{value:"boxplot",icon:"boxplot",label:"Boxplot"},{value:"distributionplot",icon:"distributionplot",label:"Distributionplot"},{value:"histogram",icon:"histogram",label:"Histogram"},{value:"direct-discovery",icon:"direct-discovery",label:"Direct discovery"},{value:"data-model",icon:"data-model",label:"Data model"},{value:"script",icon:"script",label:"Script"},{value:"script-ok",icon:"script-ok",label:"Script ok"},{value:"debug",icon:"debug",label:"Debug"},{value:"auto-layout",icon:"auto-layout",label:"Auto layout"}],R=[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],B=[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}];function O(e){var t,n,r,a,i,l=e.translator;return{definition:{type:"items",component:"accordion",items:{actions:{type:"items",translation:"Object.ActionButton.ActionsAndNavigation",grouped:!0,items:{actions:{type:"array",translation:"Object.ActionButton.Actions",ref:"actions",itemTitleRef:function(e){if(e.actionLabel)return e.actionLabel;var t=e.actionType?"Object.ActionButton.InvalidAction":"Object.ActionButton.NewAction",n=c.find((function(t){return e.actionType===t.value}));return l.get(n&&n.translation||t)},allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"Object.ActionButton.AddAction",items:{label:{component:"string",ref:"actionLabel",translation:"Common.Label",expression:"optional",defaultValue:""},actionType:{type:"string",ref:"actionType",component:"expression-with-dropdown",translation:"Object.ActionButton.Action",defaultValue:"",options:c,dropdownOnly:!0},bookmark:{type:"string",ref:"bookmark",component:"expression-with-dropdown",translation:"ExpressionEditor.SetExpresions.Bookmark",defaultValue:"",dropdownOnly:!0,options:(i=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.app.getBookmarkList();case 2:return r=e.sent,e.abrupt("return",r.map((function(e){return{label:e.qData.title,value:e.qInfo.qId}})));case 4:case"end":return e.stop()}}),e)}))),function(e,t){return i.apply(this,arguments)}),show:function(e){return u(e,"bookmark")}},field:{type:"string",ref:"field",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:(a=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.app.getFieldList();case 2:return r=e.sent,e.abrupt("return",r.map((function(e){return{label:e.qName,value:e.qName}})));case 4:case"end":return e.stop()}}),e)}))),function(e,t){return a.apply(this,arguments)}),show:function(e){return u(e,"field")}},variable:{type:"string",ref:"variable",component:"expression-with-dropdown",translation:"Common.Variable",defaultValue:"",expressionType:"StringExpression",options:(r=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.app.getVariableList();case 2:return r=e.sent,e.abrupt("return",r.filter((function(e){return!e.qIsReserved||e.qIsReserved&&t.showSystemVariables})).map((function(e){return{label:e.qName,value:e.qName}})));case 4:case"end":return e.stop()}}),e)}))),function(e,t){return r.apply(this,arguments)}),show:function(e){return u(e,"variable")}},showSystemVariables:{type:"boolean",ref:"showSystemVariables",translation:"ExpressionEditor.SystemVariables",defaultValue:!1,show:function(e){return u(e,"variable")}},softLock:{type:"boolean",ref:"softLock",translation:"Object.ActionButton.Softlock",defaultValue:!1,show:function(e){return u(e,"softLock")}},value:{type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(e){return u(e,"value")}},partial:{type:"boolean",ref:"partial",translation:"Object.ActionButton.Partial",defaultValue:!1,show:function(e){return u(e,"partial")}}}},navigation:{translation:"Object.ActionButton.Navigation",type:"items",items:{action:{ref:"navigation.action",translation:"Object.ActionButton.Navigation",component:"expression-with-dropdown",defaultValue:null,options:x,dropdownOnly:!0},sheetId:{type:"string",ref:"navigation.sheet",translation:"properties.sheet",expression:"optional",show:function(e){return S(e,"sheetId")}},sheet:{type:"string",ref:"navigation.sheet",translation:"properties.sheet",component:"expression-with-dropdown",expressionType:"StringExpression",show:function(e){return S(e,"sheet")},options:(n=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.app.getSheetList();case 2:return r=e.sent,e.abrupt("return",r.map((function(e){return{value:e.qInfo.qId,label:e.qMeta.title,showCondition:e.qData.showCondition}})));case 4:case"end":return e.stop()}}),e)}))),function(e,t){return n.apply(this,arguments)})},story:{type:"string",ref:"navigation.story",translation:"properties.story",component:"expression-with-dropdown",expressionType:"StringExpression",show:function(e){return S(e,"story")},options:(t=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.app.getStoryList();case 2:return r=e.sent,e.abrupt("return",r.map((function(e){return{value:e.qInfo.qId,label:e.qMeta.title}})));case 4:case"end":return e.stop()}}),e)}))),function(e,n){return t.apply(this,arguments)})},websiteUrl:{type:"string",expression:"optional",ref:"navigation.websiteUrl",translation:"properties.website",show:function(e){return S(e,"websiteUrl")}},sameWindow:{type:"boolean",ref:"navigation.sameWindow",translation:"properties.sameWindow",show:function(e){return S(e,"websiteUrl")},defaultValue:!1}}}}},enableCondition:{type:"items",translation:"properties.enableConditionSection",items:{useCondition:{type:"boolean",component:"switch",translation:"properties.enableToggle",ref:"useEnabledCondition",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},condition:{ref:"enabledCondition",translation:"properties.enableCondition",type:"integer",expression:"optional",show:function(e){return e.useEnabledCondition}}}},settings:{component:"expandable-items",translation:"Common.Appearance",uses:"settings",items:{general:{type:"items",translation:"properties.general",items:{showTitles:{},details:{show:!1},label:{component:"string",ref:"style.label",translation:"Common.Label",expression:"optional"}}},font:{grouped:!0,type:"items",translation:"properties.font",items:{sizeAndColor:{type:"items",items:{fontSize:{component:"slider",type:"number",ref:"style.font.size",translation:"properties.fontSize",min:.2,max:1,step:.01},useFontColorExpression:{ref:"style.font.useColorExpression",type:"boolean",translation:"properties.fontColor",component:"dropdown",options:R},colorPicker:{component:"color-picker",type:"object",ref:"style.font.color",translation:"properties.color",dualOutput:!0,show:function(e){return!C.getValue(e,"style.font.useColorExpression")}},colorExpression:{component:"string",type:"string",ref:"style.font.colorExpression",translation:"Common.Expression",expression:"optional",show:function(e){return C.getValue(e,"style.font.useColorExpression")}}}},stylingAndAlign:{type:"items",items:{fontStyling:{component:"item-selection-list",type:"string",ref:"style.font.style",translation:"properties.textStyle",horizontal:!0,multipleSelect:!0,items:[{component:"icon-item",icon:"bold",value:"bold",translation:"Common.bold",labelPlacement:"bottom"},{component:"icon-item",icon:"italic",value:"italic",translation:"Common.italic",labelPlacement:"bottom"},{component:"icon-item",icon:"underline",value:"underline",translation:"Common.underline",labelPlacement:"bottom"}]},textAlign:{component:"item-selection-list",type:"string",ref:"style.font.align",translation:"properties.Alignment",horizontal:!0,items:[{component:"icon-item",icon:"align_left",value:"left",translation:"properties.dock.left",labelPlacement:"bottom"},{component:"icon-item",icon:"align_center",value:"center",translation:"Common.Center",labelPlacement:"bottom"},{component:"icon-item",icon:"align_right",value:"right",translation:"properties.dock.right",labelPlacement:"bottom"}]}}}}},background:{grouped:!0,type:"items",translation:"properties.background",items:{backgroundColor:{type:"items",items:{useColorExpression:{ref:"style.background.useColorExpression",type:"boolean",translation:"AppDetails.SheetBackgroundColor",component:"dropdown",options:R},colorPicker:{component:"color-picker",type:"object",ref:"style.background.color",translation:"properties.color",dualOutput:!0,show:function(e){return!C.getValue(e,"style.background.useColorExpression")}},colorExpression:{component:"string",type:"string",ref:"style.background.colorExpression",translation:"Common.Expression",expression:"optional",show:function(e){return C.getValue(e,"style.background.useColorExpression")}}}},backgroundImage:{type:"items",items:{useBackgroundImage:{ref:"style.background.useImage",type:"boolean",translation:"properties.backgroundImage.use",component:"switch",options:B},backgroundUrl:{ref:"style.background.url.qStaticContentUrlDef.qUrl",layoutRef:"style.background.url.qStaticContentUrl.qUrl",schemaIgnore:!0,translation:"Common.Image",tooltip:{select:"properties.media.select",remove:"properties.media.removeBackground"},type:"string",component:"media",show:function(e){return C.getValue(e,"style.background.useImage")}},backgroundSize:{ref:"style.background.size",translation:"properties.backgroundImage.size",type:"string",component:"dropdown",options:[{value:"auto",translation:"properties.backgroundImage.originalSize"},{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"alwaysFill",translation:"properties.backgroundImage.sizeAlwaysFill"}],show:function(e){return C.getValue(e,"style.background.useImage")&&!!C.getValue(e,"style.background.url.qStaticContentUrlDef.qUrl")}},backgroundPosition:{ref:"style.background.position",translation:"Common.Position",type:"string",component:"align-matrix",show:function(e){return C.getValue(e,"style.background.useImage")&&C.getValue(e,"style.background.url.qStaticContentUrlDef.qUrl")&&"fill"!==C.getValue(e,"style.background.size")},currentSize:function(e){return C.getValue(e,"style.background.size")}}}}}},border:{type:"items",grouped:!0,translation:"properties.border",items:{borderSettings:{type:"items",items:{useBorder:{ref:"style.border.useBorder",type:"boolean",translation:"properties.border.use",component:"switch",options:B},borderRadius:{component:"slider",show:function(e){return C.getValue(e,"style.border.useBorder")},translation:"properties.border.radius",type:"number",ref:"style.border.radius",min:0,max:1,step:.01},borderWidth:{component:"slider",show:function(e){return C.getValue(e,"style.border.useBorder")},type:"number",ref:"style.border.width",translation:"properties.border.width",min:0,max:.5,step:.005},colorDropdown:{type:"string",show:function(e){return C.getValue(e,"style.border.useBorder")},component:"dropdown",translation:"properties.border.color",ref:"style.border.useColorExpression",options:R},colorPicker:{component:"color-picker",type:"object",ref:"style.border.color",translation:"properties.color",dualOutput:!0,show:function(e){return C.getValue(e,"style.border.useBorder")&&!C.getValue(e,"style.border.useColorExpression")}},colorExpression:{component:"string",type:"string",ref:"style.border.colorExpression",translation:"Common.Expression",show:function(e){return C.getValue(e,"style.border.useBorder")&&C.getValue(e,"style.border.useColorExpression")},expression:"optional"}}}}},icon:{type:"items",grouped:!0,translation:"properties.icon",items:{iconSettings:{type:"items",items:{useIcon:{ref:"style.icon.useIcon",type:"boolean",translation:"properties.icon.use",component:"switch",options:B},iconType:{ref:"style.icon.iconType",component:"expression-with-dropdown",translation:"properties.icon",defaultValue:"",options:I,expressionType:"StringExpression",show:function(e){return C.getValue(e,"style.icon.useIcon")}},iconPosition:{ref:"style.icon.position",component:"dropdown",translation:"Common.Position",options:[{translation:"properties.dock.left",value:"left"},{translation:"properties.dock.right",value:"right"}],show:function(e){return C.getValue(e,"style.icon.useIcon")}}}}}}}}}},importProperties:q,exportProperties:null,support:{export:!1,exportData:!1,snapshot:!1,viewData:!1,quickMobile:!0}}}var j={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},rebeccapurple:{r:102,g:51,b:153},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},E=function(e){var t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return"rgb(".concat(t[1],",").concat(t[2],",").concat(t[3],")");if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e)){var n=Math.round(t[1]/255*100)/100;return"rgba(".concat(t[2],",").concat(t[3],",").concat(t[4],",").concat(n,")")}if(t=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(e))return e;var r=e&&j[e.toLowerCase()];if(r){var o=void 0!==r.a?r.a:1;return"rgba(".concat(r.r,",").concat(r.g,",").concat(r.b,",").concat(o,")")}return"none"},T=function(e){var t,n,r,o,a=.15;if(e.length>7){var i=-1!==(t=e.split(","))[0].indexOf("a");return n=i?parseInt(t[0].slice(5),10):parseInt(t[0].slice(4),10),o=parseInt(t[1],10),r=parseInt(t[2],10),"".concat((i?"rgba(":"rgb(")+(Math.round((0-n)*a)+n),",").concat(Math.round((0-o)*a)+o,",").concat(Math.round((0-r)*a)+r).concat(i?",".concat(t[3]):")")}return n=(t=parseInt(e.slice(1),16))>>16,o=t>>8&255,r=255&t,"#".concat((16777216+65536*(Math.round((0-n)*a)+n)+256*(Math.round((0-o)*a)+o)+(Math.round((0-r)*a)+r)).toString(16).slice(1))},L=function(e){e.replace(/^\.\.\//i,"/"),e=(e=e.replace(/"/g,'\\"')).replace(/'/g,"\\'");var t=document.createElement("a");return t.href="../",e=t.href+("/"===e[0]?e.substr(1):e)},z={auto:"auto auto",alwaysFit:"contain",fitWidth:"100% auto",fitHeight:"auto 100%",fill:"100% 100%",alwaysFill:"cover"},V={topLeft:"0% 0%",centerLeft:"50% 0%",bottomLeft:"100% 0%",topCenter:"0% 50%",centerCenter:"50% 50%",bottomCenter:"100% 50%",topRight:"0% 100%",centerRight:"50% 100%",bottomRight:"100% 100%"},N=function(e,t){return"".concat(e,": ").concat(t,";")},F=function(e,t,n){var r,o=e.useColorExpression,a=e.colorExpression,i=e.color;return o?r=E(a):"string"==typeof i?r=i:i&&(r=n.getColorPickerColor(i)),r&&"none"!==r?r:t},P=function(e){var t=e.style,n=e.disabled,r=e.theme,o=e.element,a="width: 100%;height: 100%;transition: transform .1s ease-in-out;position: absolute;bottom: 0;left: 0; top: 0;right: 0;margin: auto;",i=t.font,l=t.background,s=t.border,c=r.getDataColorSpecials().primary;a+=n?N("opacity",.4):N("cursor","pointer"),a+=N("color",F(i,"#ffffff",r)),i.style.bold&&(a+=N("font-weight","bold")),i.style.italic&&(a+=N("font-style","italic"));var u=F(l,c,r);if(a+=N("background-color",u),l.useImage&&l.url.qStaticContentUrl){var p=l.url.qStaticContentUrl.qUrl;p&&(p=L(p),a+=N("background-image","url('".concat(p,"')")),a+=N("background-size",z[l.size]),a+=N("background-position",V[l.position]),a+=N("background-repeat","no-repeat"))}if(s.useBorder){var b=Math.min(o.offsetWidth,o.offsetHeight),g=F(s,T(u),r),d=s.width*b/2;a+=N("border","".concat(d,"px solid ").concat(g)),a+=N("border-radius","".concat(s.radius*b/2,"px"))}else a+="border: none;";return a},D=function(e){var t=e.button,n=e.theme,r=e.style,o=e.isSense,a=r.icon,i=r.font,l=r.label,s=document.createElement("text");s.style.whiteSpace="nowrap",s.style.fontFamily=n.getStyle("","","fontFamily");var c=document.createElement("span");c.textContent=l,c.style.whiteSpace="nowrap",c.style.textOverflow="ellipsis",c.style.overflow="visible",i.style.underline&&(c.style.textDecoration="underline"),s.appendChild(c);var u=o&&a.useIcon&&""!==a.iconType;if(u){var p=document.createElement("span"),b=I.find((function(e){return e.label===a.iconType||e.value===a.iconType}));p.style.textDecoration="none",p.style.fontSize="inherit",p.setAttribute("class","lui-icon lui-icon--".concat(b?b.value:"")),"left"===a.position?s.insertBefore(p,c):s.appendChild(p)}t.innerHTML="",t.appendChild(s),s.style.fontSize="".concat(t.clientHeight,"px");var g=t.clientHeight/s.offsetHeight*t.clientHeight;s.style.fontSize="".concat(g,"px"),s.offsetWidth>t.clientWidth&&(g*=t.clientWidth/s.offsetWidth),i.style.italic?u?(s.style.fontSize="".concat(Math.max(g*i.size*.84,8),"px"),s.children[0].style.marginRight="".concat(.04*s.offsetWidth,"px"),s.children[1].style.marginRight="".concat(.04*s.offsetWidth,"px")):(s.style.fontSize="".concat(Math.max(g*i.size*.9,8),"px"),s.children[0].style.marginRight="".concat(.02*s.offsetWidth,"px")):u?(s.style.fontSize="".concat(Math.max(g*i.size*.88,8),"px"),s.children[0].style.marginRight="".concat(.04*s.offsetWidth,"px")):s.style.fontSize="".concat(Math.max(g*i.size*.92,8),"px"),"8px"===s.style.fontSize&&s.children.forEach((function(e){e.style.overflow="hidden"})),s.style.margin="0 3%",s.style.display="flex",s.style.alignItems="center",s.style.justifyContent="left"===i.align?"flex-start":"right"===i.align?"flex-end":"center"},M=function(){var e=o(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=0;case 1:if(!(n<t.length)){e.next=7;break}return e.next=4,t[n]();case 4:n++,e.next=1;break;case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return function(r){var a=r.sense,i=r.translator,s=a&&a.navigation;return t.style.label=a?i.get("Object.ActionButton"):"Button",{qae:{properties:t,data:n},component:function(){var t=e.useElement(),n=e.useTheme();e.useMemo((function(){var e=document.createElement("button");e.appendChild(document.createElement("text")),t.appendChild(e)}),[]);var r=e.useStaleLayout(),a=e.useApp(),i=e.useConstraints(),u=function(e){var t=e.layout,n=e.theme,r=e.app,a=e.constraints,i=e.senseNavigation,s=e.element,u=!!i,p=s.firstElementChild,b=t.style,g=t.qStateName,d=t.useEnabledCondition&&0===t.enabledCondition,f=!d&&!a.active,m=P({style:b,disabled:d,theme:n,element:s});p.setAttribute("style",m),D({button:p,theme:n,style:b,isSense:u}),p.onclick=o(regeneratorRuntime.mark((function e(){var n,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!f){e.next=14;break}return n=[],t.actions.forEach((function(e){var t=c.find((function(t){return t.value===e.actionType}));t&&n.push(t.getActionCall(l({app:r,qStateName:g},e)))})),p.setAttribute("disabled",!0),e.next=7,M(n);case 7:if(!i||i.getCurrentStoryId()){e.next=13;break}if(o=t.navigation,a=o&&x.find((function(e){return e.value===o.action})),!i||!a||"function"!=typeof a.navigationCall){e.next=13;break}return e.next=13,a.navigationCall(l({app:r,senseNavigation:i},o));case 13:p.removeAttribute("disabled");case 14:case"end":return e.stop()}}),e)})));var v=function(){if(f){var e=p.offsetWidth,t=p.offsetHeight;p.style.transform=t>e?"scale(".concat(.98,", ",1-e/t*.02,")"):"scale(".concat(1-t/e*.02,", ",.98,")")}},h=function(){var e=p.style.transform;f&&""!==e&&"scale(1)"!==e&&(p.style.transform="scale(1)")};return p.onmousedown=function(e){0===e.button&&v()},p.onmouseup=h,p.onmouseleave=h,p.ontouchstart=v,p.ontouchend=h,p.ontouchcancel=h,function(){p.onclick=void 0,p.onmousedown=void 0,p.onmouseup=void 0,p.onmouseleave=void 0,p.ontouchstart=void 0,p.ontouchend=void 0,p.ontouchcancel=void 0}}({element:t,layout:r,constraints:i,theme:n,app:a,senseNavigation:s});e.useEffect((function(){return function(){u()}}),[t])},ext:O({translator:i})}}}));
8
8
  //# sourceMappingURL=sn-action-button.js.map