@equinor/echo-framework 0.10.20 → 0.10.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@equinor/echo-core"),t=require("react"),a=require("react-router-dom"),n=require("@equinor/echo-utils"),r=require("@equinor/echo-base"),o=require("@equinor/echo-search"),i=require("@equinor/echo-components"),c=require("@equinor/eds-core-react");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var h=l(e),d=l(t),m=s(t),u=l(n);function v(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===a&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}function p(){p=function(){return e};var e={},t=Object.prototype,a=t.hasOwnProperty,n=Object.defineProperty||function(e,t,a){e[t]=a.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",c=r.toStringTag||"@@toStringTag";function l(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,a){return e[t]=a}}function s(e,t,a,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),c=new H(r||[]);return n(i,"_invoke",{value:x(e,a,c)}),i}function h(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function m(){}function u(){}function v(){}var f={};l(f,o,(function(){return this}));var g=Object.getPrototypeOf,z=g&&g(g(y([])));z&&z!==t&&a.call(z,o)&&(f=z);var _=v.prototype=m.prototype=Object.create(f);function w(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(n,o,i,c){var l=h(e[n],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;n(this,"_invoke",{value:function(e,a){function n(){return new t((function(t,n){r(e,a,t,n)}))}return o=o?o.then(n,n):n()}})}function x(e,t,a){var n="suspendedStart";return function(r,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw o;return A()}for(a.method=r,a.arg=o;;){var i=a.delegate;if(i){var c=M(i,a);if(c){if(c===d)continue;return c}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===n)throw n="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n="executing";var l=h(e,t,a);if("normal"===l.type){if(n=a.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:a.done}}"throw"===l.type&&(n="completed",a.method="throw",a.arg=l.arg)}}}function M(e,t){var a=t.method,n=e.iterator[a];if(void 0===n)return t.delegate=null,"throw"===a&&e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method)||"return"!==a&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var r=h(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function b(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function H(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function y(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(a.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:A}}function A(){return{value:void 0,done:!0}}return u.prototype=v,n(_,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:u,configurable:!0}),u.displayName=l(v,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,c,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},w(E.prototype),l(E.prototype,i,(function(){return this})),e.AsyncIterator=E,e.async=function(t,a,n,r,o){void 0===o&&(o=Promise);var i=new E(s(t,a,n,r),o);return e.isGeneratorFunction(a)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(_),l(_,c,"Generator"),l(_,o,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),a=[];for(var n in t)a.push(n);return a.reverse(),function e(){for(;a.length;){var n=a.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=y,H.prototype={constructor:H,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(a,n){return i.type="throw",i.arg=e,t.next=a,n&&(t.method="next",t.arg=void 0),!!n}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),b(a),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var n=a.completion;if("throw"===n.type){var r=n.arg;b(a)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:y(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,L(n.key),n)}}function z(e,t,a){return t&&g(e.prototype,t),a&&g(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e,t,a){return(t=L(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function w(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function M(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=E(e);if(t){var r=E(this).constructor;a=Reflect.construct(n,arguments,r)}else a=n.apply(this,arguments);return M(this,a)}}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,o,i,c=[],l=!0,s=!1;try{if(o=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;l=!1}else for(;!(l=(n=o.call(a)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=a.return&&(i=a.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){if(e){if("string"==typeof e)return A(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function P(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=y(e))||t&&e&&"number"==typeof e.length){a&&(e=a);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,c=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==a.return||a.return()}finally{if(c)throw o}}}}function L(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function D(){var e=b((0,u.default.Hooks.useStateSafe)(void 0),2),a=e[0],n=e[1],r=t.useCallback((function(){document.documentElement.clientWidth>document.documentElement.clientHeight?n("landscape"):n("portrait")}),[n]);return t.useEffect((function(){return r(),window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}}),[r]),a}function k(e){var a=function(){var e=b(t.useState({width:0,height:0}),2),a=e[0],n=e[1];return t.useEffect((function(){function e(){n({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})}return window.addEventListener("resize",e),e(),function(){return window.removeEventListener("resize",e)}}),[]),a}(),n=b(t.useState(!1),2),r=n[0],o=n[1],i=a.width,c=Math.ceil(i),l=c<928&&e||c<768&&!e;return r!==l&&o(l),r}function V(){var e=D();return{isScreenMobileSize:k("landscape"===e),screenOrientation:e}}v(":root{--echo-framework-z-level-panel-left:500;--echo-framework-z-level-panel-main:550;--echo-framework-z-level-bottom-bar:1425;--echo-framework-z-level-scrim:1450}[class^=Scrim__StyledScrim]{z-index:var(--echo-framework-z-level-scrim)!important}");var I,N,S,B,T,O,R,Q,j,F,G,Y,U,W,Z,q,J,X,K,$,ee,te,ae,ne,re,oe,ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ce={exports:{}};function le(e){var t=e.tagNo,a=e.instCode;return ce.exports.__awaiter(this,void 0,void 0,p().mark((function e(){var n;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.Search.Tags.getTagDetailsAsync(t,a);case 2:if(n=e.sent,o.resultHelper.throwIfError(n),n.value){e.next=6;break}throw new r.NotFoundError({message:"Could not find ".concat(a," ").concat(t),httpStatusCode:404,url:"getTagDetails"});case 6:return e.abrupt("return",n.value);case 7:case"end":return e.stop()}}),e)})))}I=ce,function(e){var t="object"==typeof ie?ie:"object"==typeof self?self:"object"==typeof this?this:{};function a(e,a){return e!==t&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(t,n){return e[t]=a?a(t,n):n}}!function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])};N=function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function n(){this.constructor=e}t(e,a),e.prototype=null===a?Object.create(a):(n.prototype=a.prototype,new n)},S=Object.assign||function(e){for(var t,a=1,n=arguments.length;a<n;a++)for(var r in t=arguments[a])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},B=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(a[n[r]]=e[n[r]])}return a},T=function(e,t,a,n){var r,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,a):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,a,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(i=(o<3?r(i):o>3?r(t,a,i):r(t,a))||i);return o>3&&i&&Object.defineProperty(t,a,i),i},O=function(e,t){return function(a,n){t(a,n,e)}},R=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Q=function(e,t,a,n){function r(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function c(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?a(e.value):r(e.value).then(i,c)}l((n=n.apply(e,t||[])).next())}))},j=function(e,t){var a,n,r,o,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(e){return function(t){return l([e,t])}}function l(c){if(a)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(i=0)),i;)try{if(a=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){i.label=c[1];break}if(6===c[0]&&i.label<r[1]){i.label=r[1],r=c;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(c);break}r[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{a=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},F=function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||oe(t,e,a)},oe=Object.create?function(e,t,a,n){void 0===n&&(n=a);var r=Object.getOwnPropertyDescriptor(t,a);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,n,r)}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]},G=function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Y=function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,o=a.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=o.return)&&a.call(o)}finally{if(r)throw r.error}}return i},U=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Y(arguments[t]));return e},W=function(){for(var e=0,t=0,a=arguments.length;t<a;t++)e+=arguments[t].length;var n=Array(e),r=0;for(t=0;t<a;t++)for(var o=arguments[t],i=0,c=o.length;i<c;i++,r++)n[r]=o[i];return n},Z=function(e,t,a){if(a||2===arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))},q=function(e){return this instanceof q?(this.v=e,this):new q(e)},J=function(e,t,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,r=a.apply(e,t||[]),o=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(e){r[e]&&(n[e]=function(t){return new Promise((function(a,n){o.push([e,t,a,n])>1||c(e,t)}))})}function c(e,t){try{l(r[e](t))}catch(e){d(o[0][3],e)}}function l(e){e.value instanceof q?Promise.resolve(e.value.v).then(s,h):d(o[0][2],e)}function s(e){c("next",e)}function h(e){c("throw",e)}function d(e,t){e(t),o.shift(),o.length&&c(o[0][0],o[0][1])}},X=function(e){var t,a;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,r){t[n]=e[n]?function(t){return(a=!a)?{value:q(e[n](t)),done:"return"===n}:r?r(t):t}:r}},K=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,a=e[Symbol.asyncIterator];return a?a.call(e):(e=G(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(a){t[a]=e[a]&&function(t){return new Promise((function(n,o){r(n,o,(t=e[a](t)).done,t.value)}))}}function r(e,t,a,n){Promise.resolve(n).then((function(t){e({value:t,done:a})}),t)}},$=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};var a=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};ee=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&oe(t,e,n);return a(t,e),t},te=function(e){return e&&e.__esModule?e:{default:e}},ae=function(e,t,a,n){if("a"===a&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?n:"a"===a?n.call(e):n?n.value:t.get(e)},ne=function(e,t,a,n,r){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?r.call(e,a):r?r.value=a:t.set(e,a),a},re=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},e("__extends",N),e("__assign",S),e("__rest",B),e("__decorate",T),e("__param",O),e("__metadata",R),e("__awaiter",Q),e("__generator",j),e("__exportStar",F),e("__createBinding",oe),e("__values",G),e("__read",Y),e("__spread",U),e("__spreadArrays",W),e("__spreadArray",Z),e("__await",q),e("__asyncGenerator",J),e("__asyncDelegator",X),e("__asyncValues",K),e("__makeTemplateObject",$),e("__importStar",ee),e("__importDefault",te),e("__classPrivateFieldGet",ae),e("__classPrivateFieldSet",ne),e("__classPrivateFieldIn",re)}(a(t,a(I.exports)))}();var se=e.analytics.createAnalyticsModule("ep");function he(e){var t=this,a=e.instCode,n=e.tagNo,r=u.default.Hooks,o=r.useStateSafe,i=r.useEffectAsync,c=b(o(void 0),2),l=c[0],s=c[1],d=b(o(!0),2),m=d[0],v=d[1],f=b(o(!1),2),g=f[0],z=f[1];return i((function(e){return ce.exports.__awaiter(t,void 0,void 0,p().mark((function e(){var t;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=function(e,t){return ce.exports.__awaiter(this,void 0,void 0,p().mark((function a(){var n;return p().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,v(!0),z(!1),a.next=5,le({tagNo:t,instCode:e});case 5:(n=a.sent)&&s(n),a.next=15;break;case 9:a.prev=9,a.t0=a.catch(0),h.default.handleErrors&&h.default.handleErrors(a.t0,se),s(void 0),v(!1),z(!0);case 15:return a.prev=15,v(!1),a.finish(15);case 18:case"end":return a.stop()}}),a,null,[[0,9,15,18]])})))},t(a,n);case 2:case"end":return e.stop()}}),e)})))}),[a,n]),{tagDetails:l,isTagDetailsLoading:m,hasError:g}}var de,me=Object.freeze({__proto__:null,useEchoHistory:function(){var n=a.useHistory(),r=e.useInstCode(),o=t.useCallback((function(t,a,o){o?n.push(t,o):n.push(t),(null==a?void 0:a.hasOwnProperty(e.DeepLinkParameters.InstCode))||e.setDeepLinkParams(e.DeepLinkParameters.InstCode,r),a&&Object.keys(a).forEach((function(t){e.setDeepLinkParams(t,a[t])}))}),[n,r]);return o},useScreenOrientation:D,useScreenValues:V,useTagDetails:he});exports.RegisteredHookName=void 0,(de=exports.RegisteredHookName||(exports.RegisteredHookName={})).useSetActiveTagNo="useSetActiveTagNo",de.useContextMenuDataInfo="useContextMenuDataInfo",de.useTagData="useTagData",de.useIsContextMenuInfoLoading="useIsContextMenuInfoLoading",de.useSetActiveCommPackNo="useSetActiveCommPackNo",de.useSetActiveMcPackNo="useSetActiveMcPackNo";var ue=Object.freeze({useSetActiveTagNo:function(){return h.default.echoHookRegistry.getHookByName(exports.RegisteredHookName.useSetActiveTagNo)()},useContextMenuDataInfo:function(e,t,a){return h.default.echoHookRegistry.getHookByName(exports.RegisteredHookName.useContextMenuDataInfo)(e,t,a)},useTagData:function(){return h.default.echoHookRegistry.getHookByName(exports.RegisteredHookName.useTagData)()},useIsContextMenuInfoLoading:function(){return h.default.echoHookRegistry.getHookByName(exports.RegisteredHookName.useIsContextMenuInfoLoading)()},useSetActiveCommPackNo:function(){return h.default.echoHookRegistry.getHookByName(exports.RegisteredHookName.useSetActiveCommPackNo)()},useSetActiveMcPackNo:function(){return h.default.echoHookRegistry.getHookByName(exports.RegisteredHookName.useSetActiveMcPackNo)()}}),ve=function(){function e(t){if(f(this,e),this.cache=[],this.cacheOptions=t,t.maxItems<0)throw new Error("cacheOptions.maxItems must be positive")}return z(e,[{key:"add",value:function(e){var t,a=this.removeItem(e.key),n=Object.assign(Object.assign({},e),{timeStamp:null!==(t=null==a?void 0:a.timeStamp)&&void 0!==t?t:new Date});this.cache.push(n)}},{key:"get",value:function(e){return this.clearExpired(),this.cache.find((function(t){return t.key===e}))}},{key:"clear",value:function(){this.cache=[]}},{key:"clearExpired",value:function(){var e=this,t=new Date,a=this.cacheOptions.defaultTimeToLiveMilliseconds;for(this.cache.filter((function(e){var n;return t.getTime()-e.timeStamp.getTime()>(null!==(n=null==e?void 0:e.timeToLiveMilliseconds)&&void 0!==n?n:a)})).forEach((function(t){e.removeItem(t.key)}));this.cache.length>this.cacheOptions.maxItems;)this.cache.shift()}},{key:"removeItem",value:function(e){var t=this.cache.findIndex((function(t){return t.key===e}));if(t>=0){var a=this.cache[t];return this.cache.splice(t,1),a}}}]),e}(),pe=e.EchoEnv.env().REACT_APP_API_URL,fe=new ve({maxItems:20,defaultTimeToLiveMilliseconds:144e5});function ge(e){var t=e.cache,a=e.url,n=e.abortSignal,r=e.options;return ce.exports.__awaiter(this,void 0,void 0,p().mark((function e(){var o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=fe.get(a)){e.next=13;break}return e.prev=2,o={task:ze(a,n,r),key:a,timeToLiveMilliseconds:t.timeToLiveMilliseconds},t.isEnabled&&fe.add(o),e.next=7,o.task;case 7:e.next=13;break;case 9:throw e.prev=9,e.t0=e.catch(2),t.isEnabled&&o&&(o.timeToLiveMilliseconds=1e4,fe.add(o)),e.t0;case 13:return e.next=15,o.task;case 15:return e.abrupt("return",e.sent);case 16:case"end":return e.stop()}}),e,null,[[2,9]])})))}function ze(e,t,a){return ce.exports.__awaiter(this,void 0,void 0,p().mark((function n(){var o,i,c;return p().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,h.default.EchoClient.fetch(e,void 0,void 0,void 0,t);case 2:if(o=n.sent,i=o.headers.get("content-type"),200!==o.status&&202!==o.status||!(null==a?void 0:a.successResponseParser)){n.next=14;break}return n.prev=5,n.next=8,a.successResponseParser(o);case 8:case 35:return n.abrupt("return",n.sent);case 11:throw n.prev=11,n.t0=n.catch(5),new r.BaseError({name:"[framework.api-manager.request]",message:"Could not parse with ResponseParser",innerError:{parseError:n.t0,url:e}});case 14:if(200!==o.status&&202!==o.status||!i||-1===i.indexOf("application/json")){n.next=26;break}return n.prev=15,n.t1=JSON,n.next=19,o.text();case 19:return n.t2=n.sent,n.abrupt("return",n.t1.parse.call(n.t1,n.t2));case 23:throw n.prev=23,n.t3=n.catch(15),new r.BaseError({name:"[framework.api-manager.request]",message:"Could not parse JSON",innerError:{parseError:n.t3,url:e}});case 26:if(200!==o.status&&202!==o.status||!i||-1===i.indexOf("text/plain")){n.next=31;break}return n.next=29,o.text();case 29:return c=n.sent,n.abrupt("return",c);case 31:if(!((200===o.status||202===o.status)&&i&&i.indexOf("image/")>=0||i&&i.indexOf("video/")>=0)){n.next=45;break}return n.prev=32,n.next=35,o.arrayBuffer();case 38:if(n.prev=38,n.t4=n.catch(32),"string"!=typeof n.t4){n.next=44;break}throw new Error(n.t4);case 44:throw new Error("Unknown error while processing request. The exception in string format: ".concat(JSON.stringify(n.t4)));case 45:return n.abrupt("return",void 0);case 46:case"end":return n.stop()}}),n,null,[[5,11],[15,23],[32,38]])})))}var _e=6e5;function we(e){var t;return ce.exports.__awaiter(this,void 0,void 0,p().mark((function a(){var n;return p().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n="".concat(pe,"/EchoHub/plant-info"),e&&(n+="?instCode=".concat(e)),a.next=4,ge({url:n,cache:{isEnabled:!0}});case 4:if(a.t1=t=a.sent,a.t0=null!==a.t1,!a.t0){a.next=8;break}a.t0=void 0!==t;case 8:if(!a.t0){a.next=12;break}a.t2=t,a.next=13;break;case 12:a.t2=[];case 13:return a.abrupt("return",a.t2);case 14:case"end":return a.stop()}}),a)})))}function Ee(e){var t;return ce.exports.__awaiter(this,void 0,void 0,p().mark((function a(){var n,r;return p().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n="".concat(pe,"/echo-3d-model/platform/access/").concat(e),r={plantCodes:[],timestamp:new Date},a.next=4,ge({url:n,cache:{isEnabled:!0,timeToLiveMilliseconds:_e}});case 4:if(a.t1=t=a.sent,a.t0=null!==a.t1,!a.t0){a.next=8;break}a.t0=void 0!==t;case 8:if(!a.t0){a.next=12;break}a.t2=t,a.next=13;break;case 12:a.t2=r;case 13:return a.abrupt("return",a.t2);case 14:case"end":return a.stop()}}),a)})))}function xe(){var e;return ce.exports.__awaiter(this,void 0,void 0,p().mark((function t(){var a,n;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a="".concat(pe,"/echo-3d-model/platform/access"),n={plantCodes:[],timestamp:new Date},t.next=4,ge({url:a,cache:{isEnabled:!0,timeToLiveMilliseconds:_e}});case 4:if(t.t1=e=t.sent,t.t0=null!==t.t1,!t.t0){t.next=8;break}t.t0=void 0!==e;case 8:if(!t.t0){t.next=12;break}t.t2=e,t.next=13;break;case 12:t.t2=n;case 13:return t.abrupt("return",t.t2);case 14:case"end":return t.stop()}}),t)})))}exports.RegisteredComponentName=void 0,(exports.RegisteredComponentName||(exports.RegisteredComponentName={})).TagItem="TagItem";var Me,Ce,be,He=(Me={},Object.freeze({registerComponent:function(e){var t=e.name,a=e.component;if(Me[t])throw new r.BaseError({name:"ComponentAlreadyRegisteredError",message:"[EchoFramework.componentRegistry.registerComponent] Can not set component: a component with name ".concat(t," is already set."),innerError:{componentName:t}});Me[t]=a},getTagItem:function(){var e=exports.RegisteredComponentName.TagItem;return Me[e]||function(e){throw new r.BaseError({name:"UnregisteredComponentNameError",message:'[EchoFramework.componentRegistry] Can not get component: there is no component by the name "'.concat(e,'" registered.'),innerError:{componentName:e}})}(e),Me[e]}}));function ye(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=getComputedStyle(document.documentElement);if(!e)return t.getPropertyValue("--unknown");switch(e.toString().toLowerCase()){case exports.LegendStatus.AsBuilt.toLowerCase():return t.getPropertyValue("--asBuilt");case exports.LegendStatus.Planned.toLowerCase():return t.getPropertyValue("--planned");case exports.LegendStatus.Future.toLowerCase():return t.getPropertyValue("--future");case exports.LegendStatus.Historic.toLowerCase():return t.getPropertyValue("--historic");case exports.LegendStatus.OutOfService.toLowerCase():return t.getPropertyValue("--outOfService");case exports.LegendStatus.Reserved.toLowerCase():return t.getPropertyValue("--reserved");case exports.LegendStatus.Voided.toLowerCase():return t.getPropertyValue("--voided");case exports.LegendStatus.OK.toLowerCase():return t.getPropertyValue("--ok");case exports.LegendStatus.OS.toLowerCase():return t.getPropertyValue("--os");case exports.LegendStatus.PA.toLowerCase():return t.getPropertyValue("--pa");case exports.LegendStatus.PB.toLowerCase():return t.getPropertyValue("--pb");case exports.LegendStatus.RFCCSent.toLowerCase():return t.getPropertyValue("--rfccSent");case exports.LegendStatus.RFCCPartly.toLowerCase():return t.getPropertyValue("--rfccPartly");case exports.LegendStatus.RFCC.toLowerCase():return t.getPropertyValue("--rfcc");case exports.LegendStatus.RFOCSent.toLowerCase():return t.getPropertyValue("--rfocSent");case exports.LegendStatus.RFOCPartly.toLowerCase():return t.getPropertyValue("--rfocPartly");case exports.LegendStatus.RFOC.toLowerCase():return t.getPropertyValue("--rfoc");case exports.LegendStatus.RFCCRejected.toLowerCase():return t.getPropertyValue("--rfccRejected");case exports.LegendStatus.RFOCRejected.toLowerCase():return t.getPropertyValue("--rfocRejected");case exports.LegendStatus.Error.toLowerCase():return t.getPropertyValue("--handoverError");case exports.LegendStatus.Unknown.toLowerCase():return t.getPropertyValue("--unknown");case exports.LegendStatus.PM01.toLocaleLowerCase():return t.getPropertyValue("--pm01");case exports.LegendStatus.PM02.toLocaleLowerCase():return t.getPropertyValue("--pm02");case exports.LegendStatus.PM03.toLocaleLowerCase():return t.getPropertyValue("--pm03");case exports.LegendStatus.PM04.toLocaleLowerCase():return t.getPropertyValue("--pm04");case exports.LegendStatus.PM05.toLocaleLowerCase():return t.getPropertyValue("--pm05");case exports.LegendStatus.PM06.toLocaleLowerCase():return t.getPropertyValue("--pm06");case exports.LegendStatus.PM010.toLocaleLowerCase():return t.getPropertyValue("--pm010");case exports.LegendStatus.PM015.toLocaleLowerCase():return t.getPropertyValue("--pm015");case exports.LegendStatus.PM020.toLocaleLowerCase():return t.getPropertyValue("--pm020");default:return u.default.Utils.Color.getColorStatusFromString(e)}}function Ae(e,t){if(!e)return Object.keys(t)[0];var a,n=(a=Object.values(t),a.map((function(e){return e.toLowerCase()}))).indexOf(e.toLowerCase());return-1===n?Object.values(t)[0]:Object.values(t)[n]}exports.LegendStatus=void 0,(Ce=exports.LegendStatus||(exports.LegendStatus={})).Unknown="Unknown",Ce.AsBuilt="AsBuilt",Ce.Planned="Planned",Ce.Reserved="Reserved",Ce.Future="Future",Ce.Historic="Historic",Ce.OutOfService="Out Of Service",Ce.Voided="Voided",Ce.OK="OK",Ce.OS="OS",Ce.PA="PA",Ce.PB="PB",Ce.RFCCSent="RFCCSent",Ce.RFCCPartly="RFCCPartly",Ce.RFCC="RFCC",Ce.RFOCSent="RFOCSent",Ce.RFOCPartly="RFOCPartly",Ce.RFOC="RFOC",Ce.RFCCRejected="RFCCRejected",Ce.RFOCRejected="RFOCRejected",Ce.Error="Error",Ce.PM01="PM01",Ce.PM02="PM02",Ce.PM03="PM03",Ce.PM04="PM04",Ce.PM05="PM05",Ce.PM06="PM06",Ce.PM010="PM010",Ce.PM015="PM015",Ce.PM020="PM020",exports.LegendType=void 0,(be=exports.LegendType||(exports.LegendType={})).Stid="Stid",be.CommPk="CommPk",be.CommPkStatus="CommPkStatus",be.MCCRStatus="MCCRStatus",be.CPCLStatus="CPCLStatus",be.Notifications="Notifications",be.WorkOrders="WorkOrders",be.ValvePosition="ValvePosition",be.MeasuringPosition="MeasuringPosition",be.WorkPermit="WorkPermit";var Pe=function(e,t){se.trackEventBy("ExternalLink","Opened",{linkTo:e}),t?window.location.href=e:window.open(e,"_blank")},Le="AppLinks-module_AppBar__EjURT";v(".AppLinks-module_AppBar__EjURT{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:center;margin:0 auto 48px}");var De=function(e,t){var a=e.params;return(null==a?void 0:a.includes("instCode"))?e:Object.assign(Object.assign({},e),{params:a&&a.length>0?a+"&instCode=".concat(t):"?instCode=".concat(t)})},ke=function(t){var a=t.appLink,n=a.name,r=a.path,o=a.icon,c=a.isVisible,l=e.useInternalLink();return!c||c()?d.default.createElement(i.TextIconButton,{onClick:function(){l(r,a)},icon:o,title:n}):d.default.createElement(d.default.Fragment,null)},Ve=function(t){var a=t.isHome,n=e.useAppLinks(a),r=e.useInstCode();return d.default.createElement("div",{className:Le},n.map((function(e,t){return d.default.createElement(ke,{key:e.name+t,appLink:De(e,r)})})))},Ie={exports:{}};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@equinor/echo-core"),t=require("react"),a=require("react-router-dom"),n=require("@equinor/echo-utils"),r=require("@equinor/echo-base"),o=require("@equinor/echo-search"),i=require("@equinor/echo-components"),c=require("@equinor/eds-core-react");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var h=l(e),d=l(t),m=s(t),u=l(n);function v(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===a&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}function p(){p=function(){return e};var e={},t=Object.prototype,a=t.hasOwnProperty,n=Object.defineProperty||function(e,t,a){e[t]=a.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",c=r.toStringTag||"@@toStringTag";function l(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,a){return e[t]=a}}function s(e,t,a,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),c=new H(r||[]);return n(i,"_invoke",{value:x(e,a,c)}),i}function h(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var d={};function m(){}function u(){}function v(){}var f={};l(f,o,(function(){return this}));var g=Object.getPrototypeOf,z=g&&g(g(y([])));z&&z!==t&&a.call(z,o)&&(f=z);var _=v.prototype=m.prototype=Object.create(f);function w(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(n,o,i,c){var l=h(e[n],e,o);if("throw"!==l.type){var s=l.arg,d=s.value;return d&&"object"==typeof d&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;n(this,"_invoke",{value:function(e,a){function n(){return new t((function(t,n){r(e,a,t,n)}))}return o=o?o.then(n,n):n()}})}function x(e,t,a){var n="suspendedStart";return function(r,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw o;return A()}for(a.method=r,a.arg=o;;){var i=a.delegate;if(i){var c=M(i,a);if(c){if(c===d)continue;return c}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===n)throw n="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n="executing";var l=h(e,t,a);if("normal"===l.type){if(n=a.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:a.done}}"throw"===l.type&&(n="completed",a.method="throw",a.arg=l.arg)}}}function M(e,t){var a=t.method,n=e.iterator[a];if(void 0===n)return t.delegate=null,"throw"===a&&e.iterator.return&&(t.method="return",t.arg=void 0,M(e,t),"throw"===t.method)||"return"!==a&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),d;var r=h(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function b(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function H(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function y(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(a.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:A}}function A(){return{value:void 0,done:!0}}return u.prototype=v,n(_,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:u,configurable:!0}),u.displayName=l(v,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,c,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},w(E.prototype),l(E.prototype,i,(function(){return this})),e.AsyncIterator=E,e.async=function(t,a,n,r,o){void 0===o&&(o=Promise);var i=new E(s(t,a,n,r),o);return e.isGeneratorFunction(a)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(_),l(_,c,"Generator"),l(_,o,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),a=[];for(var n in t)a.push(n);return a.reverse(),function e(){for(;a.length;){var n=a.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=y,H.prototype={constructor:H,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(a,n){return i.type="throw",i.arg=e,t.next=a,n&&(t.method="next",t.arg=void 0),!!n}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),b(a),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var n=a.completion;if("throw"===n.type){var r=n.arg;b(a)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:y(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,L(n.key),n)}}function z(e,t,a){return t&&g(e.prototype,t),a&&g(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e,t,a){return(t=L(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function w(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function M(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=E(e);if(t){var r=E(this).constructor;a=Reflect.construct(n,arguments,r)}else a=n.apply(this,arguments);return M(this,a)}}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,o,i,c=[],l=!0,s=!1;try{if(o=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;l=!1}else for(;!(l=(n=o.call(a)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=a.return&&(i=a.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){if(e){if("string"==typeof e)return A(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function P(e,t){var a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!a){if(Array.isArray(e)||(a=y(e))||t&&e&&"number"==typeof e.length){a&&(e=a);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,c=!1;return{s:function(){a=a.call(e)},n:function(){var e=a.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==a.return||a.return()}finally{if(c)throw o}}}}function L(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function D(){var e=b((0,u.default.Hooks.useStateSafe)(void 0),2),a=e[0],n=e[1],r=t.useCallback((function(){document.documentElement.clientWidth>document.documentElement.clientHeight?n("landscape"):n("portrait")}),[n]);return t.useEffect((function(){return r(),window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}}),[r]),a}function k(e){var a=function(){var e=b(t.useState({width:0,height:0}),2),a=e[0],n=e[1];return t.useEffect((function(){function e(){n({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight})}return window.addEventListener("resize",e),e(),function(){return window.removeEventListener("resize",e)}}),[]),a}(),n=b(t.useState(!1),2),r=n[0],o=n[1],i=a.width,c=Math.ceil(i),l=c<928&&e||c<768&&!e;return r!==l&&o(l),r}function V(){var e=D();return{isScreenMobileSize:k("landscape"===e),screenOrientation:e}}v(":root{--echo-framework-z-level-panel-left:500;--echo-framework-z-level-panel-main:550;--echo-framework-z-level-bottom-bar:1425;--echo-framework-z-level-scrim:1450}[class^=Scrim__StyledScrim]{z-index:var(--echo-framework-z-level-scrim)!important}");var I,N,S,B,T,O,R,Q,j,F,G,Y,U,W,Z,q,J,X,K,$,ee,te,ae,ne,re,oe,ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ce={exports:{}};function le(e){var t=e.tagNo,a=e.instCode;return ce.exports.__awaiter(this,void 0,void 0,p().mark((function e(){var n;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.Search.Tags.getTagDetailsAsync(t,a);case 2:if(n=e.sent,o.resultHelper.throwIfError(n),n.value){e.next=6;break}throw new r.NotFoundError({message:"Could not find ".concat(a," ").concat(t),httpStatusCode:404,url:"getTagDetails"});case 6:return e.abrupt("return",n.value);case 7:case"end":return e.stop()}}),e)})))}I=ce,function(e){var t="object"==typeof ie?ie:"object"==typeof self?self:"object"==typeof this?this:{};function a(e,a){return e!==t&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(t,n){return e[t]=a?a(t,n):n}}!function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])};N=function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function n(){this.constructor=e}t(e,a),e.prototype=null===a?Object.create(a):(n.prototype=a.prototype,new n)},S=Object.assign||function(e){for(var t,a=1,n=arguments.length;a<n;a++)for(var r in t=arguments[a])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},B=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(a[n[r]]=e[n[r]])}return a},T=function(e,t,a,n){var r,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,a):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,a,n);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(i=(o<3?r(i):o>3?r(t,a,i):r(t,a))||i);return o>3&&i&&Object.defineProperty(t,a,i),i},O=function(e,t){return function(a,n){t(a,n,e)}},R=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Q=function(e,t,a,n){function r(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function c(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?a(e.value):r(e.value).then(i,c)}l((n=n.apply(e,t||[])).next())}))},j=function(e,t){var a,n,r,o,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(e){return function(t){return l([e,t])}}function l(c){if(a)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(i=0)),i;)try{if(a=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){i.label=c[1];break}if(6===c[0]&&i.label<r[1]){i.label=r[1],r=c;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(c);break}r[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{a=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},F=function(e,t){for(var a in e)"default"===a||Object.prototype.hasOwnProperty.call(t,a)||oe(t,e,a)},oe=Object.create?function(e,t,a,n){void 0===n&&(n=a);var r=Object.getOwnPropertyDescriptor(t,a);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,n,r)}:function(e,t,a,n){void 0===n&&(n=a),e[n]=t[a]},G=function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Y=function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,r,o=a.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=o.return)&&a.call(o)}finally{if(r)throw r.error}}return i},U=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Y(arguments[t]));return e},W=function(){for(var e=0,t=0,a=arguments.length;t<a;t++)e+=arguments[t].length;var n=Array(e),r=0;for(t=0;t<a;t++)for(var o=arguments[t],i=0,c=o.length;i<c;i++,r++)n[r]=o[i];return n},Z=function(e,t,a){if(a||2===arguments.length)for(var n,r=0,o=t.length;r<o;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))},q=function(e){return this instanceof q?(this.v=e,this):new q(e)},J=function(e,t,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,r=a.apply(e,t||[]),o=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(e){r[e]&&(n[e]=function(t){return new Promise((function(a,n){o.push([e,t,a,n])>1||c(e,t)}))})}function c(e,t){try{l(r[e](t))}catch(e){d(o[0][3],e)}}function l(e){e.value instanceof q?Promise.resolve(e.value.v).then(s,h):d(o[0][2],e)}function s(e){c("next",e)}function h(e){c("throw",e)}function d(e,t){e(t),o.shift(),o.length&&c(o[0][0],o[0][1])}},X=function(e){var t,a;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,r){t[n]=e[n]?function(t){return(a=!a)?{value:q(e[n](t)),done:"return"===n}:r?r(t):t}:r}},K=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,a=e[Symbol.asyncIterator];return a?a.call(e):(e=G(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(a){t[a]=e[a]&&function(t){return new Promise((function(n,o){r(n,o,(t=e[a](t)).done,t.value)}))}}function r(e,t,a,n){Promise.resolve(n).then((function(t){e({value:t,done:a})}),t)}},$=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};var a=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};ee=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&oe(t,e,n);return a(t,e),t},te=function(e){return e&&e.__esModule?e:{default:e}},ae=function(e,t,a,n){if("a"===a&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?n:"a"===a?n.call(e):n?n.value:t.get(e)},ne=function(e,t,a,n,r){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?r.call(e,a):r?r.value=a:t.set(e,a),a},re=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},e("__extends",N),e("__assign",S),e("__rest",B),e("__decorate",T),e("__param",O),e("__metadata",R),e("__awaiter",Q),e("__generator",j),e("__exportStar",F),e("__createBinding",oe),e("__values",G),e("__read",Y),e("__spread",U),e("__spreadArrays",W),e("__spreadArray",Z),e("__await",q),e("__asyncGenerator",J),e("__asyncDelegator",X),e("__asyncValues",K),e("__makeTemplateObject",$),e("__importStar",ee),e("__importDefault",te),e("__classPrivateFieldGet",ae),e("__classPrivateFieldSet",ne),e("__classPrivateFieldIn",re)}(a(t,a(I.exports)))}();var se=e.analytics.createAnalyticsModule("ep");function he(e){var t=this,a=e.instCode,n=e.tagNo,r=u.default.Hooks,o=r.useStateSafe,i=r.useEffectAsync,c=b(o(void 0),2),l=c[0],s=c[1],d=b(o(!0),2),m=d[0],v=d[1],f=b(o(!1),2),g=f[0],z=f[1];return i((function(e){return ce.exports.__awaiter(t,void 0,void 0,p().mark((function e(){var t;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=function(e,t){return ce.exports.__awaiter(this,void 0,void 0,p().mark((function a(){var n;return p().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,v(!0),z(!1),a.next=5,le({tagNo:t,instCode:e});case 5:(n=a.sent)&&s(n),a.next=15;break;case 9:a.prev=9,a.t0=a.catch(0),h.default.handleErrors&&h.default.handleErrors(a.t0,se),s(void 0),v(!1),z(!0);case 15:return a.prev=15,v(!1),a.finish(15);case 18:case"end":return a.stop()}}),a,null,[[0,9,15,18]])})))},t(a,n);case 2:case"end":return e.stop()}}),e)})))}),[a,n]),{tagDetails:l,isTagDetailsLoading:m,hasError:g}}var de,me=Object.freeze({__proto__:null,useEchoHistory:function(){var n=a.useHistory(),r=e.useInstCode(),o=t.useCallback((function(t,a,o){o?n.push(t,o):n.push(t),(null==a?void 0:a.hasOwnProperty(e.DeepLinkParameters.InstCode))||e.setDeepLinkParams(e.DeepLinkParameters.InstCode,r),a&&Object.keys(a).forEach((function(t){e.setDeepLinkParams(t,a[t])}))}),[n,r]);return o},useScreenOrientation:D,useScreenValues:V,useTagDetails:he});exports.RegisteredHookName=void 0,(de=exports.RegisteredHookName||(exports.RegisteredHookName={})).useSetActiveTagNo="useSetActiveTagNo",de.useContextMenuDataInfo="useContextMenuDataInfo",de.useTagData="useTagData",de.useIsContextMenuInfoLoading="useIsContextMenuInfoLoading",de.useSetActiveCommPackNo="useSetActiveCommPackNo",de.useSetActiveMcPackNo="useSetActiveMcPackNo";var ue=Object.freeze({useSetActiveTagNo:function(){return h.default.echoHookRegistry.getHookByName(exports.RegisteredHookName.useSetActiveTagNo)()},useContextMenuDataInfo:function(e,t,a){return h.default.echoHookRegistry.getHookByName(exports.RegisteredHookName.useContextMenuDataInfo)(e,t,a)},useTagData:function(){return h.default.echoHookRegistry.getHookByName(exports.RegisteredHookName.useTagData)()},useIsContextMenuInfoLoading:function(){return h.default.echoHookRegistry.getHookByName(exports.RegisteredHookName.useIsContextMenuInfoLoading)()},useSetActiveCommPackNo:function(){return h.default.echoHookRegistry.getHookByName(exports.RegisteredHookName.useSetActiveCommPackNo)()},useSetActiveMcPackNo:function(){return h.default.echoHookRegistry.getHookByName(exports.RegisteredHookName.useSetActiveMcPackNo)()}}),ve=function(){function e(t){if(f(this,e),this.cache=[],this.cacheOptions=t,t.maxItems<0)throw new Error("cacheOptions.maxItems must be positive")}return z(e,[{key:"add",value:function(e){var t,a=this.removeItem(e.key),n=Object.assign(Object.assign({},e),{timeStamp:null!==(t=null==a?void 0:a.timeStamp)&&void 0!==t?t:new Date});this.cache.push(n)}},{key:"get",value:function(e){return this.clearExpired(),this.cache.find((function(t){return t.key===e}))}},{key:"clear",value:function(){this.cache=[]}},{key:"clearExpired",value:function(){var e=this,t=new Date,a=this.cacheOptions.defaultTimeToLiveMilliseconds;for(this.cache.filter((function(e){var n;return t.getTime()-e.timeStamp.getTime()>(null!==(n=null==e?void 0:e.timeToLiveMilliseconds)&&void 0!==n?n:a)})).forEach((function(t){e.removeItem(t.key)}));this.cache.length>this.cacheOptions.maxItems;)this.cache.shift()}},{key:"removeItem",value:function(e){var t=this.cache.findIndex((function(t){return t.key===e}));if(t>=0){var a=this.cache[t];return this.cache.splice(t,1),a}}}]),e}(),pe=e.EchoEnv.env().REACT_APP_API_URL,fe=new ve({maxItems:20,defaultTimeToLiveMilliseconds:144e5});function ge(e){var t=e.cache,a=e.url,n=e.abortSignal,r=e.options;return ce.exports.__awaiter(this,void 0,void 0,p().mark((function e(){var o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=fe.get(a)){e.next=13;break}return e.prev=2,o={task:ze(a,n,r),key:a,timeToLiveMilliseconds:t.timeToLiveMilliseconds},t.isEnabled&&fe.add(o),e.next=7,o.task;case 7:e.next=13;break;case 9:throw e.prev=9,e.t0=e.catch(2),t.isEnabled&&o&&(o.timeToLiveMilliseconds=1e4,fe.add(o)),e.t0;case 13:return e.next=15,o.task;case 15:return e.abrupt("return",e.sent);case 16:case"end":return e.stop()}}),e,null,[[2,9]])})))}function ze(e,t,a){return ce.exports.__awaiter(this,void 0,void 0,p().mark((function n(){var o,i,c;return p().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,h.default.EchoClient.fetch(e,void 0,void 0,void 0,t);case 2:if(o=n.sent,i=o.headers.get("content-type"),200!==o.status&&202!==o.status||!(null==a?void 0:a.successResponseParser)){n.next=14;break}return n.prev=5,n.next=8,a.successResponseParser(o);case 8:case 35:return n.abrupt("return",n.sent);case 11:throw n.prev=11,n.t0=n.catch(5),new r.BaseError({name:"[framework.api-manager.request]",message:"Could not parse with ResponseParser",innerError:{parseError:n.t0,url:e}});case 14:if(200!==o.status&&202!==o.status||!i||-1===i.indexOf("application/json")){n.next=26;break}return n.prev=15,n.t1=JSON,n.next=19,o.text();case 19:return n.t2=n.sent,n.abrupt("return",n.t1.parse.call(n.t1,n.t2));case 23:throw n.prev=23,n.t3=n.catch(15),new r.BaseError({name:"[framework.api-manager.request]",message:"Could not parse JSON",innerError:{parseError:n.t3,url:e}});case 26:if(200!==o.status&&202!==o.status||!i||-1===i.indexOf("text/plain")){n.next=31;break}return n.next=29,o.text();case 29:return c=n.sent,n.abrupt("return",c);case 31:if(!((200===o.status||202===o.status)&&i&&i.indexOf("image/")>=0||i&&i.indexOf("video/")>=0)){n.next=45;break}return n.prev=32,n.next=35,o.arrayBuffer();case 38:if(n.prev=38,n.t4=n.catch(32),"string"!=typeof n.t4){n.next=44;break}throw new Error(n.t4);case 44:throw new Error("Unknown error while processing request. The exception in string format: ".concat(JSON.stringify(n.t4)));case 45:return n.abrupt("return",void 0);case 46:case"end":return n.stop()}}),n,null,[[5,11],[15,23],[32,38]])})))}var _e=6e5;function we(e){var t;return ce.exports.__awaiter(this,void 0,void 0,p().mark((function a(){var n;return p().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n="".concat(pe,"/EchoHub/plant-info"),e&&(n+="?instCode=".concat(e)),a.next=4,ge({url:n,cache:{isEnabled:!0}});case 4:if(a.t1=t=a.sent,a.t0=null!==a.t1,!a.t0){a.next=8;break}a.t0=void 0!==t;case 8:if(!a.t0){a.next=12;break}a.t2=t,a.next=13;break;case 12:a.t2=[];case 13:return a.abrupt("return",a.t2);case 14:case"end":return a.stop()}}),a)})))}function Ee(e){var t;return ce.exports.__awaiter(this,void 0,void 0,p().mark((function a(){var n,r;return p().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return n="".concat(pe,"/echo-3d-model/platform/access/").concat(e),r={plantCodes:[],timestamp:new Date},a.next=4,ge({url:n,cache:{isEnabled:!0,timeToLiveMilliseconds:_e}});case 4:if(a.t1=t=a.sent,a.t0=null!==a.t1,!a.t0){a.next=8;break}a.t0=void 0!==t;case 8:if(!a.t0){a.next=12;break}a.t2=t,a.next=13;break;case 12:a.t2=r;case 13:return a.abrupt("return",a.t2);case 14:case"end":return a.stop()}}),a)})))}function xe(){var e;return ce.exports.__awaiter(this,void 0,void 0,p().mark((function t(){var a,n;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a="".concat(pe,"/echo-3d-model/platform/access"),n={plantCodes:[],timestamp:new Date},t.next=4,ge({url:a,cache:{isEnabled:!0,timeToLiveMilliseconds:_e}});case 4:if(t.t1=e=t.sent,t.t0=null!==t.t1,!t.t0){t.next=8;break}t.t0=void 0!==e;case 8:if(!t.t0){t.next=12;break}t.t2=e,t.next=13;break;case 12:t.t2=n;case 13:return t.abrupt("return",t.t2);case 14:case"end":return t.stop()}}),t)})))}exports.RegisteredComponentName=void 0,(exports.RegisteredComponentName||(exports.RegisteredComponentName={})).TagItem="TagItem";var Me,Ce,be,He=(Me={},Object.freeze({registerComponent:function(e){var t=e.name,a=e.component;if(Me[t])throw new r.BaseError({name:"ComponentAlreadyRegisteredError",message:"[EchoFramework.componentRegistry.registerComponent] Can not set component: a component with name ".concat(t," is already set."),innerError:{componentName:t}});Me[t]=a},getTagItem:function(){var e=exports.RegisteredComponentName.TagItem;return Me[e]||function(e){throw new r.BaseError({name:"UnregisteredComponentNameError",message:'[EchoFramework.componentRegistry] Can not get component: there is no component by the name "'.concat(e,'" registered.'),innerError:{componentName:e}})}(e),Me[e]}}));function ye(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=getComputedStyle(document.documentElement);if(!e)return t.getPropertyValue("--unknown");var a=e.toString().toLowerCase();if(a.includes("open"))return t.getPropertyValue("--ok");if(a.includes("closed"))return t.getPropertyValue("--voided");switch(a){case exports.LegendStatus.AsBuilt.toLowerCase():return t.getPropertyValue("--asBuilt");case exports.LegendStatus.Planned.toLowerCase():return t.getPropertyValue("--planned");case exports.LegendStatus.Future.toLowerCase():return t.getPropertyValue("--future");case exports.LegendStatus.Historic.toLowerCase():return t.getPropertyValue("--historic");case exports.LegendStatus.OutOfService.toLowerCase():return t.getPropertyValue("--outOfService");case exports.LegendStatus.Reserved.toLowerCase():return t.getPropertyValue("--reserved");case exports.LegendStatus.Voided.toLowerCase():return t.getPropertyValue("--voided");case exports.LegendStatus.OK.toLowerCase():return t.getPropertyValue("--ok");case exports.LegendStatus.OS.toLowerCase():return t.getPropertyValue("--os");case exports.LegendStatus.PA.toLowerCase():return t.getPropertyValue("--pa");case exports.LegendStatus.PB.toLowerCase():return t.getPropertyValue("--pb");case exports.LegendStatus.RFCCSent.toLowerCase():return t.getPropertyValue("--rfccSent");case exports.LegendStatus.RFCCPartly.toLowerCase():return t.getPropertyValue("--rfccPartly");case exports.LegendStatus.RFCC.toLowerCase():return t.getPropertyValue("--rfcc");case exports.LegendStatus.RFOCSent.toLowerCase():return t.getPropertyValue("--rfocSent");case exports.LegendStatus.RFOCPartly.toLowerCase():return t.getPropertyValue("--rfocPartly");case exports.LegendStatus.RFOC.toLowerCase():return t.getPropertyValue("--rfoc");case exports.LegendStatus.RFCCRejected.toLowerCase():return t.getPropertyValue("--rfccRejected");case exports.LegendStatus.RFOCRejected.toLowerCase():return t.getPropertyValue("--rfocRejected");case exports.LegendStatus.Error.toLowerCase():return t.getPropertyValue("--handoverError");case exports.LegendStatus.Unknown.toLowerCase():return t.getPropertyValue("--unknown");case exports.LegendStatus.PM01.toLocaleLowerCase():return t.getPropertyValue("--pm01");case exports.LegendStatus.PM02.toLocaleLowerCase():return t.getPropertyValue("--pm02");case exports.LegendStatus.PM03.toLocaleLowerCase():return t.getPropertyValue("--pm03");case exports.LegendStatus.PM04.toLocaleLowerCase():return t.getPropertyValue("--pm04");case exports.LegendStatus.PM05.toLocaleLowerCase():return t.getPropertyValue("--pm05");case exports.LegendStatus.PM06.toLocaleLowerCase():return t.getPropertyValue("--pm06");case exports.LegendStatus.PM010.toLocaleLowerCase():return t.getPropertyValue("--pm010");case exports.LegendStatus.PM015.toLocaleLowerCase():return t.getPropertyValue("--pm015");case exports.LegendStatus.PM020.toLocaleLowerCase():return t.getPropertyValue("--pm020");default:return u.default.Utils.Color.getColorStatusFromString(e)}}function Ae(e,t){if(!e)return Object.keys(t)[0];var a,n=(a=Object.values(t),a.map((function(e){return e.toLowerCase()}))).indexOf(e.toLowerCase());return-1===n?Object.values(t)[0]:Object.values(t)[n]}exports.LegendStatus=void 0,(Ce=exports.LegendStatus||(exports.LegendStatus={})).Unknown="Unknown",Ce.AsBuilt="AsBuilt",Ce.Planned="Planned",Ce.Reserved="Reserved",Ce.Future="Future",Ce.Historic="Historic",Ce.OutOfService="Out Of Service",Ce.Voided="Voided",Ce.OK="OK",Ce.OS="OS",Ce.PA="PA",Ce.PB="PB",Ce.RFCCSent="RFCCSent",Ce.RFCCPartly="RFCCPartly",Ce.RFCC="RFCC",Ce.RFOCSent="RFOCSent",Ce.RFOCPartly="RFOCPartly",Ce.RFOC="RFOC",Ce.RFCCRejected="RFCCRejected",Ce.RFOCRejected="RFOCRejected",Ce.Error="Error",Ce.PM01="PM01",Ce.PM02="PM02",Ce.PM03="PM03",Ce.PM04="PM04",Ce.PM05="PM05",Ce.PM06="PM06",Ce.PM010="PM010",Ce.PM015="PM015",Ce.PM020="PM020",exports.LegendType=void 0,(be=exports.LegendType||(exports.LegendType={})).Stid="Stid",be.CommPk="CommPk",be.CommPkStatus="CommPkStatus",be.MCCRStatus="MCCRStatus",be.CPCLStatus="CPCLStatus",be.Notifications="Notifications",be.WorkOrders="WorkOrders",be.ValvePosition="ValvePosition",be.MeasuringPosition="MeasuringPosition",be.WorkPermit="WorkPermit";var Pe=function(e,t){se.trackEventBy("ExternalLink","Opened",{linkTo:e}),t?window.location.href=e:window.open(e,"_blank")},Le="AppLinks-module_AppBar__EjURT";v(".AppLinks-module_AppBar__EjURT{align-items:flex-start;display:flex;flex-wrap:wrap;justify-content:center;margin:0 auto 48px}");var De=function(e,t){var a=e.params;return(null==a?void 0:a.includes("instCode"))?e:Object.assign(Object.assign({},e),{params:a&&a.length>0?a+"&instCode=".concat(t):"?instCode=".concat(t)})},ke=function(t){var a=t.appLink,n=a.name,r=a.path,o=a.icon,c=a.isVisible,l=e.useInternalLink();return!c||c()?d.default.createElement(i.TextIconButton,{onClick:function(){l(r,a)},icon:o,title:n}):d.default.createElement(d.default.Fragment,null)},Ve=function(t){var a=t.isHome,n=e.useAppLinks(a),r=e.useInstCode();return d.default.createElement("div",{className:Le},n.map((function(e,t){return d.default.createElement(ke,{key:e.name+t,appLink:De(e,r)})})))},Ie={exports:{}};
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|