@nimbus-ds/patterns 1.39.2-rc.1 → 1.40.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.
- package/CHANGELOG.md +20 -0
- package/dist/CHANGELOG.md +20 -0
- package/dist/EmptyApp/index.js +1 -1
- package/dist/HelpLink/index.js +1 -1
- package/dist/SummaryStats/index.d.ts +23 -4
- package/dist/SummaryStats/index.js +1 -1
- package/dist/components-props.json +1 -0
- package/dist/index.d.ts +16 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/prototypes/README.md +145 -0
package/dist/HelpLink/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/components"),require("@nimbus-ds/icons")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/components","@nimbus-ds/icons"],t):"object"==typeof exports?exports["@nimbus-ds/patterns"]=t(require("react"),require("@nimbus-ds/components"),require("@nimbus-ds/icons")):e["@nimbus-ds/patterns"]=t(e.react,e["@nimbus-ds/components"],e["@nimbus-ds/icons"])}(global,((e,t,r)=>(()=>{"use strict";var n={4989:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HelpLink=void 0;const n=r(5163).__importDefault(r(8156)),o=r(5280),i=r(3215),a=({style:e,children:t,...r})=>n.default.createElement(o.Box,{...r,display:"flex",alignItems:"center",justifyContent:"center",gap:"2"},n.default.createElement(o.Box,{display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"2",width:"2rem",height:"2rem",minWidth:"2rem",minHeight:"2rem",backgroundColor:"primary-surface"},n.default.createElement(o.Icon,{source:n.default.createElement(i.QuestionCircleIcon,null),color:"primary-textLow"})),t);t.HelpLink=a,a.displayName="HelpLink"},5163:(e,t,r)=>{r.r(t),r.d(t,{__assign:()=>i,__asyncDelegator:()=>x,__asyncGenerator:()=>P,__asyncValues:()=>S,__await:()=>j,__awaiter:()=>d,__classPrivateFieldGet:()=>C,__classPrivateFieldIn:()=>L,__classPrivateFieldSet:()=>H,__createBinding:()=>v,__decorate:()=>c,__esDecorate:()=>l,__exportStar:()=>h,__extends:()=>o,__generator:()=>b,__importDefault:()=>k,__importStar:()=>I,__makeTemplateObject:()=>E,__metadata:()=>y,__param:()=>u,__propKey:()=>s,__read:()=>_,__rest:()=>a,__runInitializers:()=>f,__setFunctionName:()=>p,__spread:()=>w,__spreadArray:()=>O,__spreadArrays:()=>g,__values:()=>m});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function c(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var c,u=n.kind,l="getter"===u?"get":"setter"===u?"set":"value",f=!t&&e?n.static?e:e.prototype:null,s=t||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,y=r.length-1;y>=0;y--){var d={};for(var b in n)d[b]="access"===b?{}:n[b];for(var b in n.access)d.access[b]=n.access[b];d.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var v=(0,r[y])("accessor"===u?{get:s.get,set:s.set}:s[l],d);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(c=a(v.get))&&(s.get=c),(c=a(v.set))&&(s.set=c),(c=a(v.init))&&o.push(c)}else(c=a(v))&&("field"===u?o.push(c):s[l]=c)}f&&Object.defineProperty(f,n.name,s),p=!0}function f(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function s(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function y(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function d(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function c(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,c)}u((n=n.apply(e,t||[])).next())}))}function b(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function h(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function m(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.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.")}function _(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e}function g(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,c=i.length;a<c;a++,o++)n[o]=i[a];return n}function O(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function j(e){return this instanceof j?(this.v=e,this):new j(e)}function P(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||c(e,t)}))})}function c(e,t){try{(r=o[e](t)).value instanceof j?Promise.resolve(r.value.v).then(u,l):f(i[0][2],r)}catch(e){f(i[0][3],e)}var r}function u(e){c("next",e)}function l(e){c("throw",e)}function f(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function x(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:j(e[n](t)),done:!1}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=m(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function I(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&v(t,e,r);return T(t,e),t}function k(e){return e&&e.__esModule?e:{default:e}}function C(e,t,r,n){if("a"===r&&!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"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function H(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function L(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)}},5280:e=>{e.exports=t},3215:e=>{e.exports=r},8156:t=>{t.exports=e}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{var e=a;Object.defineProperty(e,"__esModule",{value:!0}),e.HelpLink=void 0;const t=i(4989);var r=i(4989);Object.defineProperty(e,"HelpLink",{enumerable:!0,get:function(){return r.HelpLink}}),e.default=t.HelpLink})(),a})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/components"),require("@nimbus-ds/icons")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/components","@nimbus-ds/icons"],t):"object"==typeof exports?exports["@nimbus-ds/patterns"]=t(require("react"),require("@nimbus-ds/components"),require("@nimbus-ds/icons")):e["@nimbus-ds/patterns"]=t(e.react,e["@nimbus-ds/components"],e["@nimbus-ds/icons"])}(global,((e,t,r)=>(()=>{"use strict";var n={4989:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HelpLink=void 0;const n=r(5163).__importDefault(r(8156)),o=r(5280),i=r(3215),a=({style:e,children:t,...r})=>n.default.createElement(o.Box,{...r,display:"flex",alignItems:"center",justifyContent:"center",gap:"2"},n.default.createElement(o.Box,{display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"2",width:"2rem",height:"2rem",minWidth:"2rem",minHeight:"2rem",backgroundColor:"neutral-surfaceDisabled"},n.default.createElement(o.Icon,{source:n.default.createElement(i.QuestionCircleIcon,null),color:"neutral-textLow"})),t);t.HelpLink=a,a.displayName="HelpLink"},5163:(e,t,r)=>{r.r(t),r.d(t,{__assign:()=>i,__asyncDelegator:()=>x,__asyncGenerator:()=>P,__asyncValues:()=>S,__await:()=>j,__awaiter:()=>d,__classPrivateFieldGet:()=>C,__classPrivateFieldIn:()=>H,__classPrivateFieldSet:()=>D,__createBinding:()=>v,__decorate:()=>c,__esDecorate:()=>l,__exportStar:()=>h,__extends:()=>o,__generator:()=>b,__importDefault:()=>k,__importStar:()=>I,__makeTemplateObject:()=>E,__metadata:()=>y,__param:()=>u,__propKey:()=>s,__read:()=>_,__rest:()=>a,__runInitializers:()=>f,__setFunctionName:()=>p,__spread:()=>w,__spreadArray:()=>O,__spreadArrays:()=>g,__values:()=>m});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function c(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var c,u=n.kind,l="getter"===u?"get":"setter"===u?"set":"value",f=!t&&e?n.static?e:e.prototype:null,s=t||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,y=r.length-1;y>=0;y--){var d={};for(var b in n)d[b]="access"===b?{}:n[b];for(var b in n.access)d.access[b]=n.access[b];d.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var v=(0,r[y])("accessor"===u?{get:s.get,set:s.set}:s[l],d);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(c=a(v.get))&&(s.get=c),(c=a(v.set))&&(s.set=c),(c=a(v.init))&&o.push(c)}else(c=a(v))&&("field"===u?o.push(c):s[l]=c)}f&&Object.defineProperty(f,n.name,s),p=!0}function f(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function s(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function y(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function d(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function c(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,c)}u((n=n.apply(e,t||[])).next())}))}function b(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(u){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function h(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function m(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.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.")}function _(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e}function g(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,c=i.length;a<c;a++,o++)n[o]=i[a];return n}function O(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function j(e){return this instanceof j?(this.v=e,this):new j(e)}function P(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||c(e,t)}))})}function c(e,t){try{(r=o[e](t)).value instanceof j?Promise.resolve(r.value.v).then(u,l):f(i[0][2],r)}catch(e){f(i[0][3],e)}var r}function u(e){c("next",e)}function l(e){c("throw",e)}function f(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function x(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:j(e[n](t)),done:!1}:o?o(t):t}:o}}function S(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=m(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function I(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&v(t,e,r);return T(t,e),t}function k(e){return e&&e.__esModule?e:{default:e}}function C(e,t,r,n){if("a"===r&&!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"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function D(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function H(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)}},5280:e=>{e.exports=t},3215:e=>{e.exports=r},8156:t=>{t.exports=e}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{var e=a;Object.defineProperty(e,"__esModule",{value:!0}),e.HelpLink=void 0;const t=i(4989);var r=i(4989);Object.defineProperty(e,"HelpLink",{enumerable:!0,get:function(){return r.HelpLink}}),e.default=t.HelpLink})(),a})()));
|
|
@@ -36,6 +36,13 @@ export interface SummaryStatsItemProperties {
|
|
|
36
36
|
* Brief text that identifies the metric.
|
|
37
37
|
*/
|
|
38
38
|
description: string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether this stat is expandable (interactive). When unset, the stat
|
|
41
|
+
* inherits the `expandable` value of the SummaryStats container. An explicit
|
|
42
|
+
* `true` or `false` overrides the container value. Ignored in the "grid"
|
|
43
|
+
* layout. Set it to `false` on stats without children so they stay static.
|
|
44
|
+
*/
|
|
45
|
+
expandable?: boolean;
|
|
39
46
|
/**
|
|
40
47
|
* Trend indicator showing the change direction.
|
|
41
48
|
*/
|
|
@@ -61,14 +68,16 @@ export type SummaryStatsItemProps = SummaryStatsItemProperties & Omit<HTMLAttrib
|
|
|
61
68
|
* primary value and description, an optional trend indicator (up/down/neutral with
|
|
62
69
|
* text), and an optional info icon with tooltip. When used inside an expandable
|
|
63
70
|
* SummaryStats, the stat is clickable and reveals additional content (children) in
|
|
64
|
-
* an expandable area below the stats row.
|
|
71
|
+
* an expandable area below the stats row. The `expandable` prop overrides the
|
|
72
|
+
* container value for this stat only, so a row can mix static and interactive
|
|
73
|
+
* stats. Arrow Left/Right move focus between the interactive stats of a row.
|
|
65
74
|
*
|
|
66
75
|
* **Returns:** A stat display (Box-based layout) showing value and description,
|
|
67
76
|
* with optional trend indicator and info tooltip. In expandable mode it behaves as
|
|
68
77
|
* a button that toggles the expanded content.
|
|
69
78
|
*
|
|
70
79
|
* **Required props:** `value`, `description`.
|
|
71
|
-
* **Optional props:** `trend`, `trendText`, `infoTooltip`, `children`,
|
|
80
|
+
* **Optional props:** `expandable`, `trend`, `trendText`, `infoTooltip`, `children`,
|
|
72
81
|
* and any valid HTML element attributes (rest props).
|
|
73
82
|
*
|
|
74
83
|
* @param props - SummaryStatsItemProps
|
|
@@ -76,6 +85,9 @@ export type SummaryStatsItemProps = SummaryStatsItemProperties & Omit<HTMLAttrib
|
|
|
76
85
|
* Type: `string`.
|
|
77
86
|
* @param props.description - **Required.** Short label for the metric (e.g. "Total Sales").
|
|
78
87
|
* Type: `string`.
|
|
88
|
+
* @param props.expandable - **Optional.** Whether this stat is interactive. When unset it
|
|
89
|
+
* inherits the container `expandable` value; `true`/`false` override it. Ignored in the
|
|
90
|
+
* "grid" layout. Type: `boolean`.
|
|
79
91
|
* @param props.trend - **Optional.** Trend direction for the indicator. Type: `"up" | "down" | "neutral"`.
|
|
80
92
|
* When set, a trend icon and optional `trendText` are shown next to the value.
|
|
81
93
|
* @param props.trendText - **Optional.** Text shown next to the trend icon (e.g. "15%", "-8%").
|
|
@@ -194,6 +206,8 @@ export interface SummaryStatsProperties {
|
|
|
194
206
|
layout?: SummaryStatsLayout;
|
|
195
207
|
/**
|
|
196
208
|
* Enables expandable mode where stats can be clicked to show additional content.
|
|
209
|
+
* This is the default for every SummaryStats.Item; an item can override it with
|
|
210
|
+
* its own `expandable` prop. Ignored in the "grid" layout.
|
|
197
211
|
* @default false
|
|
198
212
|
*/
|
|
199
213
|
expandable?: boolean;
|
|
@@ -204,8 +218,10 @@ export interface SummaryStatsProperties {
|
|
|
204
218
|
*/
|
|
205
219
|
activeStatId?: string | null;
|
|
206
220
|
/**
|
|
207
|
-
* Callback fired when the
|
|
208
|
-
* Receives the new active stat id, or `null` when the
|
|
221
|
+
* Callback fired when the user toggles a stat, in both controlled and
|
|
222
|
+
* uncontrolled modes. Receives the new active stat id, or `null` when the
|
|
223
|
+
* active stat is deselected. It is not fired when the active stat unmounts,
|
|
224
|
+
* loses its children, or becomes static.
|
|
209
225
|
*/
|
|
210
226
|
onActiveStatIdChange?: (activeStatId: string | null) => void;
|
|
211
227
|
}
|
|
@@ -222,6 +238,9 @@ export type SummaryStatsProps = SummaryStatsProperties & Omit<HTMLAttributes<HTM
|
|
|
222
238
|
* Layout can be horizontal (single row, optionally with scroll/expand) or grid
|
|
223
239
|
* (2-column). When layout is "horizontal" and expandable is true, clicking a
|
|
224
240
|
* stat toggles an expanded area below showing that stat's extra content.
|
|
241
|
+
* Each SummaryStats.Item can override the container value with its own
|
|
242
|
+
* `expandable` prop, so static and interactive stats can share a row. Arrow
|
|
243
|
+
* keys move focus between the interactive stats of the same row.
|
|
225
244
|
*
|
|
226
245
|
* @param props - See SummaryStatsProps
|
|
227
246
|
* @param props.className - Optional CSS class for the root element
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/components"),require("@nimbus-ds/icons")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/components","@nimbus-ds/icons"],t):"object"==typeof exports?exports["@nimbus-ds/patterns"]=t(require("react"),require("@nimbus-ds/components"),require("@nimbus-ds/icons")):e["@nimbus-ds/patterns"]=t(e.react,e["@nimbus-ds/components"],e["@nimbus-ds/icons"])}(global,((e,t,r)=>(()=>{"use strict";var n={8302:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useRandomId=void 0;var n=r(2660);Object.defineProperty(t,"useRandomId",{enumerable:!0,get:function(){return n.useRandomId}})},2660:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useRandomId=void 0;var n=r(7761);Object.defineProperty(t,"useRandomId",{enumerable:!0,get:function(){return n.useRandomId}})},7761:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useRandomId=void 0;const n=r(8156);t.useRandomId=function(){const e=(0,n.useRef)(null);return e.current??=Math.random().toString(36).substring(2,9),e.current}},9144:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SummaryStats=void 0;const n=r(5163).__importStar(r(8156)),o=r(5280),a=r(6815),i=r(4948),l=({style:e,children:t,layout:r="horizontal",expandable:a=!1,activeStatId:l,onActiveStatIdChange:u,...c})=>{const s="horizontal"===r&&a,d=void 0!==l,[f,m]=(0,n.useState)(null),p=d?l??null:f,[y,b]=(0,n.useState)(new Map),[v,S]=(0,n.useState)([]),[g,h]=(0,n.useState)([]),x=(0,n.useCallback)((e=>{const t=p===e?null:e;d||m(t),u?.(t)}),[p,d,u]),_=(0,n.useCallback)(((e,t,r)=>{b((r=>new Map(r).set(e,t))),r?h((t=>t.includes(e)?t:[...t,e])):S((t=>t.includes(e)?t:[...t,e]))}),[]),w=(0,n.useCallback)((e=>{b((t=>{const r=new Map(t);return r.delete(e),r})),S((t=>t.filter((t=>t!==e)))),h((t=>t.filter((t=>t!==e)))),d||m((t=>t===e?null:t))}),[d]),I=(0,n.useMemo)((()=>s&&null!==p?y.get(p)??null:null),[s,p,y]),O="horizontal"===r,P=(0,n.useMemo)((()=>({activeId:p,onToggle:x,expandable:s,layout:r,registerStat:_,unregisterStat:w,statIds:v,isHorizontalLayout:O,visibleStatIds:v})),[p,x,s,r,_,w,v,O]),j=(0,n.useMemo)((()=>({...P,isScrollPaneBlock:!0,statIds:g,visibleStatIds:g})),[P,g]),C=(0,n.useMemo)((()=>({...P,isScrollPaneBlock:!1})),[P]);return n.default.createElement(i.SummaryStatsContext.Provider,{value:P},n.default.createElement(o.Box,{...c,display:"flex",flexDirection:"column",width:"100%",backgroundColor:"neutral-background",boxShadow:"2",borderRadius:"2",overflow:"hidden"},"grid"===r&&n.default.createElement(o.Box,{display:"grid",alignItems:"stretch",gridTemplateColumns:"1fr 1fr",padding:"1"},t),"horizontal"===r&&n.default.createElement(i.SummaryStatsContext.Provider,{value:j},n.default.createElement(o.Box,{display:{xs:"block",md:"none"}},n.default.createElement(o.ScrollPane,{showGradients:!0,enableGrabScroll:!0},n.default.createElement(o.Box,{display:"flex",flexDirection:"row",alignItems:"stretch"},t)))),"horizontal"===r&&n.default.createElement(i.SummaryStatsContext.Provider,{value:C},n.default.createElement(o.Box,{display:{xs:"none",md:"flex"},flexDirection:"row",alignItems:"stretch",padding:"1"},t)),I&&n.default.createElement(o.Box,{display:"flex",flexDirection:"column",padding:"4",margin:"4",backgroundColor:"neutral-background"},I)))};t.SummaryStats=l,l.Item=a.SummaryStatsItem,l.displayName="SummaryStats",l.Item.displayName="SummaryStats.Item"},6032:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=r(5163);n.__exportStar(r(7052),t),n.__exportStar(r(6815),t)},1412:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SummaryStatsItem=void 0;const n=r(5163).__importStar(r(8156)),o=r(5280),a=r(3215),i=r(8302),l=r(4948),u=r(9420),c=r(9539),s=({style:e,children:t,value:r,description:s,trend:d,trendText:f,infoTooltip:m,"aria-label":p,...y})=>{const b=(0,i.useRandomId)(),{activeId:v,onToggle:S,expandable:g,layout:h,registerStat:x,unregisterStat:_,statIds:w,isHorizontalLayout:I,isScrollPaneBlock:O}=(0,l.useSummaryStatsContext)(!1),P=v===b,j=w.indexOf(b),C="grid"===h&&w.length%2!=0&&w.length>0&&w.at(-1)===b,E="grid"===h&&w.length%2!=0&&w.length>=2&&w.at(-2)===b,T=(0,c.getSeparatorConfig)(j,w,b,h,I);(0,n.useEffect)((()=>(x(b,t,O),()=>{_(b)})),[t,b,x,_,O]);const k=(0,n.useCallback)((()=>{g&&S(b)}),[g,S,b]),M=(0,n.useCallback)((e=>{!g||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),S(b))}),[g,S,b]);return n.default.createElement(o.Box,{...y,display:"flex",flexDirection:"column",backgroundColor:"neutral-background",flex:"1"},n.default.createElement(o.Box,{display:"flex",flexDirection:"row",alignItems:"stretch",flex:"1",paddingLeft:"1",paddingRight:T.paddingRight},n.default.createElement(o.Box,{display:"flex",flexDirection:"column",gap:"1",padding:"2",flex:"1",backgroundColor:{xs:P?"primary-surface":"neutral-background",...g&&{hover:P?"primary-surface":"neutral-surface"}},borderRadius:"2",cursor:g?"pointer":void 0,onClick:k,onKeyDown:M,tabIndex:g?0:void 0,role:g?"button":void 0,"aria-expanded":g?P:void 0,"aria-label":p},n.default.createElement(o.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"2"},n.default.createElement(o.Box,{display:"flex",alignItems:"center",gap:"1"},n.default.createElement(o.Text,{fontSize:"base",fontWeight:"medium",color:"neutral-textHigh"},r),d&&n.default.createElement(u.SummaryStatsTrendIndicator,{trend:d,text:f})),g&&n.default.createElement(c.ExpandableChevron,{isActive:P})),n.default.createElement(o.Box,{display:"flex",alignItems:"center",gap:"1"},n.default.createElement(o.Text,{fontSize:"caption",color:"neutral-textLow"},s),m&&n.default.createElement(o.Tooltip,{content:m,position:"bottom"},n.default.createElement(o.Icon,{source:n.default.createElement(a.InfoCircleIcon,{size:"small"}),color:"neutral-textLow",cursor:"pointer","data-testid":"summary-stats-item-info-icon"})))),T.showVerticalSeparator&&!C&&n.default.createElement(o.Box,{display:T.verticalSeparatorDisplay,alignItems:"center",marginLeft:"1","data-testid":"summary-stats-item-vertical-separator"},n.default.createElement(o.Box,{width:"1px",height:"100%",backgroundColor:"neutral-surfaceDisabled"}))),n.default.createElement(o.Box,{display:E?{xs:"block",md:"block"}:T.showHorizontalSeparator||{xs:"none",md:"none"},width:"100%",height:"1px",backgroundColor:"neutral-surfaceDisabled"}))};t.SummaryStatsItem=s,s.displayName="SummaryStatsItem"},4987:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SummaryStatsItem=void 0;const n=r(1412);var o=r(1412);Object.defineProperty(t,"SummaryStatsItem",{enumerable:!0,get:function(){return o.SummaryStatsItem}}),t.default=n.SummaryStatsItem},9539:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSeparatorConfig=t.ExpandableChevron=void 0;const n=r(5163).__importDefault(r(8156)),o=r(5280),a=r(3215);t.ExpandableChevron=({isActive:e})=>{const t=e?a.ChevronUpIcon:a.ChevronDownIcon;return n.default.createElement(o.Icon,{source:n.default.createElement(t,{size:"small"}),color:"neutral-textLow"})},t.ExpandableChevron.displayName="ExpandableChevron",t.getSeparatorConfig=function(e,t,r,n,o){const a=t.length>0&&t.at(-1)===r,i=(e+1)%2!=0,l=e>=t.length-2,u="grid"===n&&!l;return{showVerticalSeparator:"grid"===n?i:!a,paddingRight:a?"1":void 0,verticalSeparatorDisplay:"grid"===n||o?"flex":{xs:"none",md:"flex"},showHorizontalSeparator:{xs:u||"grid"!==n&&!o&&!a?"block":"none",md:u?"block":"none"}}}},5739:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.trendConfig=t.SummaryStatsTrendIndicator=void 0;const n=r(5163).__importDefault(r(8156)),o=r(5280),a=r(3215),i={up:{icon:a.ArrowupIcon,color:"success-interactivePressed",label:"increase"},down:{icon:a.ArrowDownIcon,color:"danger-interactive",label:"decrease"},neutral:{icon:null,color:"neutral-textLow",label:"no change"}};t.trendConfig=i;const l=({style:e,trend:t,text:r,...a})=>{const l=i[t];return n.default.createElement(o.Box,{...a,display:"flex",alignItems:"center",gap:"0-5",role:"img","aria-label":l.label},l.icon&&n.default.createElement(o.Icon,{source:n.default.createElement(l.icon,{size:"small"}),color:l.color}),r&&n.default.createElement(o.Text,{fontSize:"caption",color:l.color},r))};t.SummaryStatsTrendIndicator=l,l.displayName="SummaryStatsTrendIndicator"},9420:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.trendConfig=t.SummaryStatsTrendIndicator=void 0;var n=r(5739);Object.defineProperty(t,"SummaryStatsTrendIndicator",{enumerable:!0,get:function(){return n.SummaryStatsTrendIndicator}}),Object.defineProperty(t,"trendConfig",{enumerable:!0,get:function(){return n.trendConfig}})},6815:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=r(5163);n.__exportStar(r(4987),t),n.__exportStar(r(9420),t)},9811:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initialSummaryStatsContextValue=void 0,t.initialSummaryStatsContextValue={activeId:null,isScrollPaneBlock:void 0,onToggle:()=>{},expandable:!1,layout:"horizontal",registerStat:()=>{},unregisterStat:()=>{},statIds:[],isHorizontalLayout:!1,visibleStatIds:[]}},2524:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useSummaryStatsContext=t.SummaryStatsContext=void 0;const n=r(8156),o=r(9811);t.SummaryStatsContext=(0,n.createContext)(void 0);t.useSummaryStatsContext=(e=!0)=>{const r=(0,n.useContext)(t.SummaryStatsContext);if(void 0===r){if(!e)return o.initialSummaryStatsContextValue;throw new Error("useSummaryStatsContext must be used within a SummaryStats component")}return r}},4736:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useSummaryStatsContext=t.SummaryStatsContext=void 0;var n=r(2524);Object.defineProperty(t,"SummaryStatsContext",{enumerable:!0,get:function(){return n.SummaryStatsContext}}),Object.defineProperty(t,"useSummaryStatsContext",{enumerable:!0,get:function(){return n.useSummaryStatsContext}})},4948:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});r(5163).__exportStar(r(4736),t)},7052:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SummaryStats=void 0;const n=r(9144);var o=r(9144);Object.defineProperty(t,"SummaryStats",{enumerable:!0,get:function(){return o.SummaryStats}}),t.default=n.SummaryStats},5163:(e,t,r)=>{r.r(t),r.d(t,{__assign:()=>a,__asyncDelegator:()=>O,__asyncGenerator:()=>I,__asyncValues:()=>P,__await:()=>w,__awaiter:()=>p,__classPrivateFieldGet:()=>k,__classPrivateFieldIn:()=>D,__classPrivateFieldSet:()=>M,__createBinding:()=>b,__decorate:()=>l,__esDecorate:()=>c,__exportStar:()=>v,__extends:()=>o,__generator:()=>y,__importDefault:()=>T,__importStar:()=>E,__makeTemplateObject:()=>j,__metadata:()=>m,__param:()=>u,__propKey:()=>d,__read:()=>g,__rest:()=>i,__runInitializers:()=>s,__setFunctionName:()=>f,__spread:()=>h,__spreadArray:()=>_,__spreadArrays:()=>x,__values:()=>S});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function l(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",s=!t&&e?n.static?e:e.prototype:null,d=t||(s?Object.getOwnPropertyDescriptor(s,n.name):{}),f=!1,m=r.length-1;m>=0;m--){var p={};for(var y in n)p[y]="access"===y?{}:n[y];for(var y in n.access)p.access[y]=n.access[y];p.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var b=(0,r[m])("accessor"===u?{get:d.get,set:d.set}:d[c],p);if("accessor"===u){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(l=i(b.get))&&(d.get=l),(l=i(b.set))&&(d.set=l),(l=i(b.init))&&o.push(l)}else(l=i(b))&&("field"===u?o.push(l):d[c]=l)}s&&Object.defineProperty(s,n.name,d),f=!0}function s(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function m(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{u(n.next(e))}catch(e){a(e)}}function l(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}u((n=n.apply(e,t||[])).next())}))}function y(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(u){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,n=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,u])}}}var b=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function v(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||b(t,e,r)}function S(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.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.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function h(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function x(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var a=arguments[t],i=0,l=a.length;i<l;i++,o++)n[o]=a[i];return n}function _(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function w(e){return this instanceof w?(this.v=e,this):new w(e)}function I(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),a=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||l(e,t)}))})}function l(e,t){try{(r=o[e](t)).value instanceof w?Promise.resolve(r.value.v).then(u,c):s(a[0][2],r)}catch(e){s(a[0][3],e)}var r}function u(e){l("next",e)}function c(e){l("throw",e)}function s(e,t){e(t),a.shift(),a.length&&l(a[0][0],a[0][1])}}function O(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:w(e[n](t)),done:!1}:o?o(t):t}:o}}function P(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=S(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function j(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var C=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&b(t,e,r);return C(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function k(e,t,r,n){if("a"===r&&!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"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function M(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function D(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)}},5280:e=>{e.exports=t},3215:e=>{e.exports=r},8156:t=>{t.exports=e}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,a),r.exports}return a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a(6032)})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("@nimbus-ds/components"),require("@nimbus-ds/icons")):"function"==typeof define&&define.amd?define(["react","@nimbus-ds/components","@nimbus-ds/icons"],t):"object"==typeof exports?exports["@nimbus-ds/patterns"]=t(require("react"),require("@nimbus-ds/components"),require("@nimbus-ds/icons")):e["@nimbus-ds/patterns"]=t(e.react,e["@nimbus-ds/components"],e["@nimbus-ds/icons"])}(global,((e,t,r)=>(()=>{"use strict";var n={8302:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useRandomId=void 0;var n=r(2660);Object.defineProperty(t,"useRandomId",{enumerable:!0,get:function(){return n.useRandomId}})},2660:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useRandomId=void 0;var n=r(7761);Object.defineProperty(t,"useRandomId",{enumerable:!0,get:function(){return n.useRandomId}})},7761:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useRandomId=void 0;const n=r(8156);t.useRandomId=function(){const e=(0,n.useRef)(null);return e.current??=Math.random().toString(36).substring(2,9),e.current}},9144:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SummaryStats=void 0;const n=r(5163).__importStar(r(8156)),o=r(5280),a=r(8302),l=r(6815),i=r(4948),u=({style:e,children:t,layout:r="horizontal",expandable:l=!1,activeStatId:u,onActiveStatIdChange:c,...s})=>{const d="horizontal"===r&&l,f=void 0!==u,[p,m]=(0,n.useState)(null),y=f?u??null:p,[b,v]=(0,n.useState)(new Map),[S,g]=(0,n.useState)([]),[h,x]=(0,n.useState)([]),_=(0,n.useCallback)((e=>{const t=y===e?null:e;f||m(t),c?.(t)}),[y,f,c]),w=(0,a.useRandomId)(),I=(0,n.useRef)(null),C=(0,n.useRef)(null),O=(0,n.useCallback)(((e,t)=>{t?x((t=>t.includes(e)?t:[...t,e])):g((t=>t.includes(e)?t:[...t,e]))}),[]),E=(0,n.useCallback)(((e,t)=>{v((r=>{const n=r.get(e);return n?.content===t.content&&n?.expandable===t.expandable?r:new Map(r).set(e,t)}))}),[]),P=(0,n.useCallback)((e=>{v((t=>{if(!t.has(e))return t;const r=new Map(t);return r.delete(e),r})),g((t=>t.filter((t=>t!==e)))),x((t=>t.filter((t=>t!==e)))),m((t=>t===e?null:t))}),[]),j="horizontal"===r,T=(0,n.useMemo)((()=>{if(!j||null===y)return null;const e=b.get(y);return e?.expandable?0===n.default.Children.toArray(e.content).length?null:e.content:null}),[j,y,b]),k=null!==T,R=(0,n.useMemo)((()=>({activeId:y,onToggle:_,expandable:d,layout:r,registerStat:O,updateStat:E,unregisterStat:P,statIds:S,isHorizontalLayout:j,visibleStatIds:S,panelId:k?w:void 0})),[y,_,d,r,O,E,P,S,j,k,w]),M=(0,n.useMemo)((()=>({...R,isScrollPaneBlock:!0,statIds:h,visibleStatIds:h,rowRef:I})),[R,h]),D=(0,n.useMemo)((()=>({...R,isScrollPaneBlock:!1,rowRef:C})),[R]);return n.default.createElement(i.SummaryStatsContext.Provider,{value:R},n.default.createElement(o.Box,{...s,display:"flex",flexDirection:"column",width:"100%",backgroundColor:"neutral-background",boxShadow:"2",borderRadius:"2",overflow:"hidden"},j&&n.default.createElement(i.SummaryStatsContext.Provider,{value:M},n.default.createElement(o.Box,{display:{xs:"block",md:"none"}},n.default.createElement(o.ScrollPane,{showGradients:!0,enableGrabScroll:!0},n.default.createElement(o.Box,{ref:I,display:"flex",flexDirection:"row",alignItems:"stretch"},t)))),n.default.createElement(i.SummaryStatsContext.Provider,{value:D},n.default.createElement(o.Box,{ref:C,display:j?{xs:"none",md:"flex"}:"grid",flexDirection:j?"row":void 0,gridTemplateColumns:j?void 0:"1fr 1fr",alignItems:"stretch",padding:"1"},t)),k&&n.default.createElement(o.Box,{paddingLeft:"1",paddingRight:"1",paddingBottom:"1"},n.default.createElement(o.Box,{id:w,display:"flex",flexDirection:"column",padding:"3",backgroundColor:"neutral-background"},T))))};t.SummaryStats=u,u.Item=l.SummaryStatsItem,u.displayName="SummaryStats",u.Item.displayName="SummaryStats.Item"},6032:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=r(5163);n.__exportStar(r(7052),t),n.__exportStar(r(6815),t)},1412:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SummaryStatsItem=void 0;const n=r(5163).__importStar(r(8156)),o=r(5280),a=r(3215),l=r(8302),i=r(4948),u=r(9420),c=r(9539),s=({style:e,children:t,value:r,description:s,expandable:d,trend:f,trendText:p,infoTooltip:m,"aria-label":y,...b})=>{const v=(0,l.useRandomId)(),{activeId:S,onToggle:g,expandable:h,layout:x,registerStat:_,updateStat:w,unregisterStat:I,statIds:C,isHorizontalLayout:O,isScrollPaneBlock:E,panelId:P,rowRef:j}=(0,i.useSummaryStatsContext)(!1),T=O&&(d??h),k=T&&S===v,R=C.indexOf(v),M="grid"===x&&C.length%2!=0&&C.length>0&&C.at(-1)===v,D="grid"===x&&C.length%2!=0&&C.length>=2&&C.at(-2)===v,A=(0,c.getSeparatorConfig)(R,C,v,x,O);(0,n.useEffect)((()=>(_(v,E),()=>{I(v)})),[v,_,I,E]),(0,n.useEffect)((()=>{w(v,{content:t,expandable:T})}),[t,v,T,w]);const B=(0,n.useCallback)((()=>{T&&g(v)}),[T,g,v]),L=(0,n.useCallback)((e=>{T&&(0,c.handleInteractiveCellKeyDown)(e,j?.current,(()=>g(v)))}),[T,g,v,j]);return n.default.createElement(o.Box,{...b,display:"flex",flexDirection:"column",backgroundColor:"neutral-background",flex:"1"},n.default.createElement(o.Box,{display:"flex",flexDirection:"row",alignItems:"stretch",flex:"1",paddingLeft:"1",paddingRight:A.paddingRight},n.default.createElement(o.Box,{display:"flex",flexDirection:"column",gap:"1",padding:"2",flex:"1",borderRadius:"2",...(0,c.getCellInteractionProps)(T,k,P),onClick:B,onKeyDown:L,"aria-label":y},n.default.createElement(o.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"2"},n.default.createElement(o.Box,{display:"flex",alignItems:"center",gap:"1"},n.default.createElement(o.Text,{fontSize:"base",fontWeight:"medium",color:"neutral-textHigh"},r),f&&n.default.createElement(u.SummaryStatsTrendIndicator,{trend:f,text:p})),T&&n.default.createElement(c.ExpandableChevron,{isActive:k})),n.default.createElement(o.Box,{display:"flex",alignItems:"center",gap:"1"},n.default.createElement(o.Text,{fontSize:"caption",color:"neutral-textLow"},s),m&&n.default.createElement(o.Tooltip,{content:m,position:"bottom"},n.default.createElement(o.Icon,{source:n.default.createElement(a.InfoCircleIcon,{size:"small"}),color:"neutral-textLow",cursor:"pointer","data-testid":"summary-stats-item-info-icon"})))),A.showVerticalSeparator&&!M&&n.default.createElement(o.Box,{display:A.verticalSeparatorDisplay,alignItems:"center",marginLeft:"1","data-testid":"summary-stats-item-vertical-separator"},n.default.createElement(o.Box,{width:"1px",height:"100%",backgroundColor:"neutral-surfaceDisabled"}))),n.default.createElement(o.Box,{display:D?{xs:"block",md:"block"}:A.showHorizontalSeparator||{xs:"none",md:"none"},width:"100%",height:"1px",backgroundColor:"neutral-surfaceDisabled"}))};t.SummaryStatsItem=s,s.displayName="SummaryStatsItem"},4987:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SummaryStatsItem=void 0;const n=r(1412);var o=r(1412);Object.defineProperty(t,"SummaryStatsItem",{enumerable:!0,get:function(){return o.SummaryStatsItem}}),t.default=n.SummaryStatsItem},9539:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getCellInteractionProps=t.handleInteractiveCellKeyDown=t.getAdjacentInteractiveCell=t.INTERACTIVE_CELL_SELECTOR=t.getSeparatorConfig=t.ExpandableChevron=void 0;const n=r(5163).__importDefault(r(8156)),o=r(5280),a=r(3215);function l(e,r,n){if(!e)return null;const o=Array.from(e.querySelectorAll(t.INTERACTIVE_CELL_SELECTOR)),a=o.indexOf(r);return-1===a?null:o[a+n]??null}t.ExpandableChevron=({isActive:e})=>{const t=e?a.ChevronUpIcon:a.ChevronDownIcon;return n.default.createElement(o.Icon,{source:n.default.createElement(t,{size:"small"}),color:"neutral-textLow"})},t.ExpandableChevron.displayName="ExpandableChevron",t.getSeparatorConfig=function(e,t,r,n,o){const a=t.length>0&&t.at(-1)===r,l=(e+1)%2!=0,i=e>=t.length-2,u="grid"===n&&!i;return{showVerticalSeparator:"grid"===n?l:!a,paddingRight:a?"1":void 0,verticalSeparatorDisplay:"grid"===n||o?"flex":{xs:"none",md:"flex"},showHorizontalSeparator:{xs:u||"grid"!==n&&!o&&!a?"block":"none",md:u?"block":"none"}}},t.INTERACTIVE_CELL_SELECTOR='[role="button"][aria-expanded]',t.getAdjacentInteractiveCell=l,t.handleInteractiveCellKeyDown=function(e,t,r){if("Enter"===e.key||" "===e.key)return e.preventDefault(),void r();const n="ArrowLeft"===e.key||"ArrowRight"===e.key,o=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;if(!n||o)return;e.preventDefault();const a=l(t,e.currentTarget,"ArrowRight"===e.key?1:-1);a&&(a.focus(),"function"==typeof a.scrollIntoView&&a.scrollIntoView({block:"nearest",inline:"nearest"}))},t.getCellInteractionProps=function(e,t,r){return e?{backgroundColor:{xs:t?"primary-surface":"neutral-background",hover:t?"primary-surface":"neutral-surface"},cursor:"pointer",tabIndex:0,role:"button","aria-expanded":t,"aria-controls":t?r:void 0}:{backgroundColor:{xs:"neutral-background"}}}},5739:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.trendConfig=t.SummaryStatsTrendIndicator=void 0;const n=r(5163).__importDefault(r(8156)),o=r(5280),a=r(3215),l={up:{icon:a.ArrowupIcon,color:"success-interactivePressed",label:"increase"},down:{icon:a.ArrowDownIcon,color:"danger-interactive",label:"decrease"},neutral:{icon:null,color:"neutral-textLow",label:"no change"}};t.trendConfig=l;const i=({style:e,trend:t,text:r,...a})=>{const i=l[t];return n.default.createElement(o.Box,{...a,display:"flex",alignItems:"center",gap:"0-5",role:"img","aria-label":i.label},i.icon&&n.default.createElement(o.Icon,{source:n.default.createElement(i.icon,{size:"small"}),color:i.color}),r&&n.default.createElement(o.Text,{fontSize:"caption",color:i.color},r))};t.SummaryStatsTrendIndicator=i,i.displayName="SummaryStatsTrendIndicator"},9420:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.trendConfig=t.SummaryStatsTrendIndicator=void 0;var n=r(5739);Object.defineProperty(t,"SummaryStatsTrendIndicator",{enumerable:!0,get:function(){return n.SummaryStatsTrendIndicator}}),Object.defineProperty(t,"trendConfig",{enumerable:!0,get:function(){return n.trendConfig}})},6815:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=r(5163);n.__exportStar(r(4987),t),n.__exportStar(r(9420),t)},9811:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.initialSummaryStatsContextValue=void 0,t.initialSummaryStatsContextValue={activeId:null,isScrollPaneBlock:void 0,onToggle:()=>{},expandable:!1,layout:"horizontal",registerStat:()=>{},updateStat:()=>{},unregisterStat:()=>{},statIds:[],isHorizontalLayout:!1,visibleStatIds:[],panelId:void 0,rowRef:void 0}},2524:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useSummaryStatsContext=t.SummaryStatsContext=void 0;const n=r(8156),o=r(9811);t.SummaryStatsContext=(0,n.createContext)(void 0);t.useSummaryStatsContext=(e=!0)=>{const r=(0,n.useContext)(t.SummaryStatsContext);if(void 0===r){if(!e)return o.initialSummaryStatsContextValue;throw new Error("useSummaryStatsContext must be used within a SummaryStats component")}return r}},4736:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useSummaryStatsContext=t.SummaryStatsContext=void 0;var n=r(2524);Object.defineProperty(t,"SummaryStatsContext",{enumerable:!0,get:function(){return n.SummaryStatsContext}}),Object.defineProperty(t,"useSummaryStatsContext",{enumerable:!0,get:function(){return n.useSummaryStatsContext}})},4948:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});r(5163).__exportStar(r(4736),t)},7052:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SummaryStats=void 0;const n=r(9144);var o=r(9144);Object.defineProperty(t,"SummaryStats",{enumerable:!0,get:function(){return o.SummaryStats}}),t.default=n.SummaryStats},5163:(e,t,r)=>{r.r(t),r.d(t,{__assign:()=>a,__asyncDelegator:()=>C,__asyncGenerator:()=>I,__asyncValues:()=>O,__await:()=>w,__awaiter:()=>m,__classPrivateFieldGet:()=>k,__classPrivateFieldIn:()=>M,__classPrivateFieldSet:()=>R,__createBinding:()=>b,__decorate:()=>i,__esDecorate:()=>c,__exportStar:()=>v,__extends:()=>o,__generator:()=>y,__importDefault:()=>T,__importStar:()=>j,__makeTemplateObject:()=>E,__metadata:()=>p,__param:()=>u,__propKey:()=>d,__read:()=>g,__rest:()=>l,__runInitializers:()=>s,__setFunctionName:()=>f,__spread:()=>h,__spreadArray:()=>_,__spreadArrays:()=>x,__values:()=>S});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function l(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function i(e,t,r,n){var o,a=arguments.length,l=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,r,n);else for(var i=e.length-1;i>=0;i--)(o=e[i])&&(l=(a<3?o(l):a>3?o(t,r,l):o(t,r))||l);return a>3&&l&&Object.defineProperty(t,r,l),l}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t,r,n,o,a){function l(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var i,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",s=!t&&e?n.static?e:e.prototype:null,d=t||(s?Object.getOwnPropertyDescriptor(s,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var m={};for(var y in n)m[y]="access"===y?{}:n[y];for(var y in n.access)m.access[y]=n.access[y];m.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");a.push(l(e||null))};var b=(0,r[p])("accessor"===u?{get:d.get,set:d.set}:d[c],m);if("accessor"===u){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(i=l(b.get))&&(d.get=i),(i=l(b.set))&&(d.set=i),(i=l(b.init))&&o.push(i)}else(i=l(b))&&("field"===u?o.push(i):d[c]=i)}s&&Object.defineProperty(s,n.name,d),f=!0}function s(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function p(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,r,n){return new(r||(r=Promise))((function(o,a){function l(e){try{u(n.next(e))}catch(e){a(e)}}function i(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(l,i)}u((n=n.apply(e,t||[])).next())}))}function y(e,t){var r,n,o,a,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(l=0)),l;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return l.label++,{value:i[1],done:!1};case 5:l.label++,n=i[1],i=[0];continue;case 7:i=l.ops.pop(),l.trys.pop();continue;default:if(!(o=l.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){l=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){l.label=i[1];break}if(6===i[0]&&l.label<o[1]){l.label=o[1],o=i;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(i);break}o[2]&&l.ops.pop(),l.trys.pop();continue}i=t.call(e,l)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var b=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function v(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||b(t,e,r)}function S(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.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.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),l=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)l.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return l}function h(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function x(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var a=arguments[t],l=0,i=a.length;l<i;l++,o++)n[o]=a[l];return n}function _(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function w(e){return this instanceof w?(this.v=e,this):new w(e)}function I(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),a=[];return n={},l("next"),l("throw"),l("return"),n[Symbol.asyncIterator]=function(){return this},n;function l(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||i(e,t)}))})}function i(e,t){try{(r=o[e](t)).value instanceof w?Promise.resolve(r.value.v).then(u,c):s(a[0][2],r)}catch(e){s(a[0][3],e)}var r}function u(e){i("next",e)}function c(e){i("throw",e)}function s(e,t){e(t),a.shift(),a.length&&i(a[0][0],a[0][1])}}function C(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:w(e[n](t)),done:!1}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=S(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function j(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&b(t,e,r);return P(t,e),t}function T(e){return e&&e.__esModule?e:{default:e}}function k(e,t,r,n){if("a"===r&&!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"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function R(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function M(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)}},5280:e=>{e.exports=t},3215:e=>{e.exports=r},8156:t=>{t.exports=e}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,a),r.exports}return a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a(6032)})()));
|