@livetiles/reach-components-react 0.4.0-preview.216 → 0.4.0-preview.219
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/KeywordsFilter.d.ts +2 -0
- package/common/ToolbarFilterCalloutButton.d.ts +8 -0
- package/en.async.esm.esm.js +3 -0
- package/index.d.ts +3 -1
- package/index.esm.js +1 -1
- package/index.esm2.js +2694 -192
- package/index.umd.js +2697 -191
- package/package.json +1 -1
package/index.esm2.js
CHANGED
|
@@ -1194,16 +1194,16 @@ var userAgent$5 = engineUserAgent$4;
|
|
|
1194
1194
|
var process$7 = global$r.process;
|
|
1195
1195
|
var versions$5 = process$7 && process$7.versions;
|
|
1196
1196
|
var v8$4 = versions$5 && versions$5.v8;
|
|
1197
|
-
var match$
|
|
1197
|
+
var match$7, version$a;
|
|
1198
1198
|
|
|
1199
1199
|
if (v8$4) {
|
|
1200
|
-
match$
|
|
1201
|
-
version$a = match$
|
|
1200
|
+
match$7 = v8$4.split('.');
|
|
1201
|
+
version$a = match$7[0] + match$7[1];
|
|
1202
1202
|
} else if (userAgent$5) {
|
|
1203
|
-
match$
|
|
1204
|
-
if (!match$
|
|
1205
|
-
match$
|
|
1206
|
-
if (match$
|
|
1203
|
+
match$7 = userAgent$5.match(/Edge\/(\d+)/);
|
|
1204
|
+
if (!match$7 || match$7[1] >= 74) {
|
|
1205
|
+
match$7 = userAgent$5.match(/Chrome\/(\d+)/);
|
|
1206
|
+
if (match$7) version$a = match$7[1];
|
|
1207
1207
|
}
|
|
1208
1208
|
}
|
|
1209
1209
|
|
|
@@ -41498,17 +41498,17 @@ var userAgent$4 = engineUserAgent$3;
|
|
|
41498
41498
|
var process$1$3 = global$2$3.process;
|
|
41499
41499
|
var versions$3 = process$1$3 && process$1$3.versions;
|
|
41500
41500
|
var v8$3 = versions$3 && versions$3.v8;
|
|
41501
|
-
var match$
|
|
41501
|
+
var match$6, version$7;
|
|
41502
41502
|
|
|
41503
41503
|
if (v8$3) {
|
|
41504
|
-
match$
|
|
41505
|
-
version$7 = match$
|
|
41504
|
+
match$6 = v8$3.split('.');
|
|
41505
|
+
version$7 = match$6[0] + match$6[1];
|
|
41506
41506
|
} else if (userAgent$4) {
|
|
41507
|
-
match$
|
|
41507
|
+
match$6 = userAgent$4.match(/Edge\/(\d+)/);
|
|
41508
41508
|
|
|
41509
|
-
if (!match$
|
|
41510
|
-
match$
|
|
41511
|
-
if (match$
|
|
41509
|
+
if (!match$6 || match$6[1] >= 74) {
|
|
41510
|
+
match$6 = userAgent$4.match(/Chrome\/(\d+)/);
|
|
41511
|
+
if (match$6) version$7 = match$6[1];
|
|
41512
41512
|
}
|
|
41513
41513
|
}
|
|
41514
41514
|
|
|
@@ -49733,17 +49733,17 @@ var userAgent$3 = engineUserAgent$2;
|
|
|
49733
49733
|
var process$2$2 = global$4$2.process;
|
|
49734
49734
|
var versions$2 = process$2$2 && process$2$2.versions;
|
|
49735
49735
|
var v8$2 = versions$2 && versions$2.v8;
|
|
49736
|
-
var match$
|
|
49736
|
+
var match$5, version$6;
|
|
49737
49737
|
|
|
49738
49738
|
if (v8$2) {
|
|
49739
|
-
match$
|
|
49740
|
-
version$6 = match$
|
|
49739
|
+
match$5 = v8$2.split('.');
|
|
49740
|
+
version$6 = match$5[0] + match$5[1];
|
|
49741
49741
|
} else if (userAgent$3) {
|
|
49742
|
-
match$
|
|
49742
|
+
match$5 = userAgent$3.match(/Edge\/(\d+)/);
|
|
49743
49743
|
|
|
49744
|
-
if (!match$
|
|
49745
|
-
match$
|
|
49746
|
-
if (match$
|
|
49744
|
+
if (!match$5 || match$5[1] >= 74) {
|
|
49745
|
+
match$5 = userAgent$3.match(/Chrome\/(\d+)/);
|
|
49746
|
+
if (match$5) version$6 = match$5[1];
|
|
49747
49747
|
}
|
|
49748
49748
|
}
|
|
49749
49749
|
|
|
@@ -66234,7 +66234,7 @@ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
|
66234
66234
|
var booleanValueOf = Boolean.prototype.valueOf;
|
|
66235
66235
|
var objectToString = Object.prototype.toString;
|
|
66236
66236
|
var functionToString$2 = Function.prototype.toString;
|
|
66237
|
-
var match$
|
|
66237
|
+
var match$4 = String.prototype.match;
|
|
66238
66238
|
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
66239
66239
|
var gOPS = Object.getOwnPropertySymbols;
|
|
66240
66240
|
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
@@ -66410,7 +66410,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
66410
66410
|
if (isString$1(obj)) {
|
|
66411
66411
|
return markBoxed(inspect(String(obj)));
|
|
66412
66412
|
}
|
|
66413
|
-
if (!isDate(obj) && !isRegExp$8(obj)) {
|
|
66413
|
+
if (!isDate$1(obj) && !isRegExp$8(obj)) {
|
|
66414
66414
|
var ys = arrObjKeys(obj, inspect);
|
|
66415
66415
|
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
66416
66416
|
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
@@ -66436,7 +66436,7 @@ function quote(s) {
|
|
|
66436
66436
|
}
|
|
66437
66437
|
|
|
66438
66438
|
function isArray$8(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
66439
|
-
function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
66439
|
+
function isDate$1(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
66440
66440
|
function isRegExp$8(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
66441
66441
|
function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
66442
66442
|
function isString$1(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
@@ -66483,7 +66483,7 @@ function toStr(obj) {
|
|
|
66483
66483
|
|
|
66484
66484
|
function nameOf(f) {
|
|
66485
66485
|
if (f.name) { return f.name; }
|
|
66486
|
-
var m = match$
|
|
66486
|
+
var m = match$4.call(functionToString$2.call(f), /^function\s*([\w$]+)/);
|
|
66487
66487
|
if (m) { return m[1]; }
|
|
66488
66488
|
return null;
|
|
66489
66489
|
}
|
|
@@ -71018,7 +71018,7 @@ var clipboardToIE11Formatting = {
|
|
|
71018
71018
|
|
|
71019
71019
|
var defaultMessage = "Copy to clipboard: #{key}, Enter";
|
|
71020
71020
|
|
|
71021
|
-
function format(message) {
|
|
71021
|
+
function format$1(message) {
|
|
71022
71022
|
var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
71023
71023
|
return message.replace(/#{\s*key\s*}/g, copyKey);
|
|
71024
71024
|
}
|
|
@@ -71097,7 +71097,7 @@ function copy(text, options) {
|
|
|
71097
71097
|
} catch (err) {
|
|
71098
71098
|
debug && console.error("unable to copy using clipboardData: ", err);
|
|
71099
71099
|
debug && console.error("falling back to prompt");
|
|
71100
|
-
message = format("message" in options ? options.message : defaultMessage);
|
|
71100
|
+
message = format$1("message" in options ? options.message : defaultMessage);
|
|
71101
71101
|
window.prompt(message, text);
|
|
71102
71102
|
}
|
|
71103
71103
|
} finally {
|
|
@@ -75703,11 +75703,11 @@ var _1 = __importDefault(video$1);
|
|
|
75703
75703
|
var volume_1 = volume;
|
|
75704
75704
|
var VideoContainer = styled_1.default.div(templateObject_1$2q || (templateObject_1$2q = __makeTemplateObject$2(["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n height: 100%;\n width: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n height: 100%;\n width: 100%;\n"])));
|
|
75705
75705
|
var VideoStyled = styled_1.default(_1.default)(templateObject_2$1D || (templateObject_2$1D = __makeTemplateObject$2(["\n height: 100%;\n display: inline-block;\n object-fit: fill;\n pointer-events: none;\n background: rgb(0, 0, 0, 0);\n"], ["\n height: 100%;\n display: inline-block;\n object-fit: fill;\n pointer-events: none;\n background: rgb(0, 0, 0, 0);\n"])));
|
|
75706
|
-
var Button$
|
|
75706
|
+
var Button$2 = styled_1.default.div(templateObject_3$15 || (templateObject_3$15 = __makeTemplateObject$2(["\n position: absolute;\n top: 6px;\n right: 6px;\n cursor: pointer;\n opacity: ", ";\n transition: opacity ease-out 800ms;\n"], ["\n position: absolute;\n top: 6px;\n right: 6px;\n cursor: pointer;\n opacity: ", ";\n transition: opacity ease-out 800ms;\n"])), function (props) { return (props.isHovered ? 1 : 0.8); });
|
|
75707
75707
|
var speakerClassName = 'giphy-video-overlay-button';
|
|
75708
75708
|
var VolumeButton = function (_a) {
|
|
75709
75709
|
var muted = _a.muted, toggleMute = _a.toggleMute, mutedByBrowser = _a.mutedByBrowser, isHovered = _a.isHovered;
|
|
75710
|
-
return (react_1.default.createElement(Button$
|
|
75710
|
+
return (react_1.default.createElement(Button$2, { className: speakerClassName, onClick: function (e) {
|
|
75711
75711
|
e.preventDefault();
|
|
75712
75712
|
e.stopPropagation();
|
|
75713
75713
|
toggleMute();
|
|
@@ -80314,17 +80314,17 @@ var userAgent$2 = engineUserAgent$1;
|
|
|
80314
80314
|
var process$2$1 = global$2$1.process;
|
|
80315
80315
|
var versions$1 = process$2$1 && process$2$1.versions;
|
|
80316
80316
|
var v8$1 = versions$1 && versions$1.v8;
|
|
80317
|
-
var match$
|
|
80317
|
+
var match$3, version$2;
|
|
80318
80318
|
|
|
80319
80319
|
if (v8$1) {
|
|
80320
|
-
match$
|
|
80321
|
-
version$2 = match$
|
|
80320
|
+
match$3 = v8$1.split('.');
|
|
80321
|
+
version$2 = match$3[0] + match$3[1];
|
|
80322
80322
|
} else if (userAgent$2) {
|
|
80323
|
-
match$
|
|
80323
|
+
match$3 = userAgent$2.match(/Edge\/(\d+)/);
|
|
80324
80324
|
|
|
80325
|
-
if (!match$
|
|
80326
|
-
match$
|
|
80327
|
-
if (match$
|
|
80325
|
+
if (!match$3 || match$3[1] >= 74) {
|
|
80326
|
+
match$3 = userAgent$2.match(/Chrome\/(\d+)/);
|
|
80327
|
+
if (match$3) version$2 = match$3[1];
|
|
80328
80328
|
}
|
|
80329
80329
|
}
|
|
80330
80330
|
|
|
@@ -82500,7 +82500,7 @@ var IconHeaderButton = function IconHeaderButton(_a) {
|
|
|
82500
82500
|
}
|
|
82501
82501
|
|
|
82502
82502
|
var allClassNames = classNames('header-button', className);
|
|
82503
|
-
var IconElement = !link ? jsx$1(Button, __assign$1({
|
|
82503
|
+
var IconElement = !link ? jsx$1(Button$1, __assign$1({
|
|
82504
82504
|
className: allClassNames,
|
|
82505
82505
|
disabled: disabled,
|
|
82506
82506
|
onClick: function (e) {
|
|
@@ -82538,10 +82538,10 @@ var Host$k$1 = _styled.div.withConfig({
|
|
|
82538
82538
|
componentId: "sc-1p61ffo-0"
|
|
82539
82539
|
})(templateObject_1$J$1 || (templateObject_1$J$1 = __makeTemplateObject$1(["\n height: 100%;\n"], ["\n height: 100%;\n"])));
|
|
82540
82540
|
|
|
82541
|
-
var Button = _styled(IconButton$1).withConfig({
|
|
82541
|
+
var Button$1 = _styled(IconButton$1).withConfig({
|
|
82542
82542
|
displayName: "IconHeaderButton__Button",
|
|
82543
82543
|
componentId: "sc-1p61ffo-1"
|
|
82544
|
-
})(templateObject_4$d$
|
|
82544
|
+
})(templateObject_4$d$2 || (templateObject_4$d$2 = __makeTemplateObject$1(["\n && {\n display: flex;\n padding: 0 5px;\n background-color: transparent;\n height: 100%;\n margin: 0 -1.5px; // this removes the \"gap\" between two side by side active buttons\n\n ", ";\n ", "\n }\n"], ["\n && {\n display: flex;\n padding: 0 5px;\n background-color: transparent;\n height: 100%;\n margin: 0 -1.5px; // this removes the \"gap\" between two side by side active buttons\n\n ", ";\n ", "\n }\n"])), function (p) {
|
|
82545
82545
|
return !p.isActive && css$2(templateObject_2$u$1 || (templateObject_2$u$1 = __makeTemplateObject$1(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.theme.textColors.onPrimary);
|
|
82546
82546
|
}, function (p) {
|
|
82547
82547
|
return p.isActive && css$2(templateObject_3$l$1 || (templateObject_3$l$1 = __makeTemplateObject$1(["\n background-color: ", ";\n color: ", ";\n\n &&:hover {\n background-color: ", ";\n color: ", ";\n }\n "], ["\n background-color: ", ";\n color: ", ";\n\n &&:hover {\n background-color: ", ";\n color: ", ";\n }\n "])), p.theme.palette.themeSecondary, p.theme.textColors.onSecondary, p.theme.palette.themeSecondary, p.theme.textColors.onSecondary);
|
|
@@ -82554,7 +82554,7 @@ var StyledLink$2 = _styled(Link$4).withConfig({
|
|
|
82554
82554
|
return css$2(templateObject_5$8$2 || (templateObject_5$8$2 = __makeTemplateObject$1(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.theme.textColors.onPrimary);
|
|
82555
82555
|
});
|
|
82556
82556
|
|
|
82557
|
-
var templateObject_1$J$1, templateObject_2$u$1, templateObject_3$l$1, templateObject_4$d$
|
|
82557
|
+
var templateObject_1$J$1, templateObject_2$u$1, templateObject_3$l$1, templateObject_4$d$2, templateObject_5$8$2, templateObject_6$6$2; // a string of all valid unicode whitespaces
|
|
82558
82558
|
// eslint-disable-next-line max-len
|
|
82559
82559
|
|
|
82560
82560
|
var whitespaces$2$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
@@ -83368,7 +83368,7 @@ var templateObject_1$y$1;
|
|
|
83368
83368
|
var ToggleAllButtons = function ToggleAllButtons(_a) {
|
|
83369
83369
|
var toggleAll = _a.toggleAll,
|
|
83370
83370
|
className = _a.className;
|
|
83371
|
-
return jsxs(Host$h$
|
|
83371
|
+
return jsxs(Host$h$2, __assign$1({
|
|
83372
83372
|
className: className
|
|
83373
83373
|
}, {
|
|
83374
83374
|
children: [jsx$1(StyledButton$1$1, __assign$1({
|
|
@@ -83393,7 +83393,7 @@ var ToggleAllButtons = function ToggleAllButtons(_a) {
|
|
|
83393
83393
|
}), void 0);
|
|
83394
83394
|
};
|
|
83395
83395
|
|
|
83396
|
-
var Host$h$
|
|
83396
|
+
var Host$h$2 = _styled.div.withConfig({
|
|
83397
83397
|
displayName: "ToggleAllButtons__Host",
|
|
83398
83398
|
componentId: "sc-kbn3b4-0"
|
|
83399
83399
|
})(templateObject_1$x$1 || (templateObject_1$x$1 = __makeTemplateObject$1(["\n margin-bottom: ", "px;\n"], ["\n margin-bottom: ", "px;\n"])), spacingS);
|
|
@@ -83525,7 +83525,7 @@ var ChannelList$1 = function ChannelList(_a) {
|
|
|
83525
83525
|
}
|
|
83526
83526
|
|
|
83527
83527
|
var showMoreIndicator = channels.length > visibleChannelsCount;
|
|
83528
|
-
return jsxs(Host$e$
|
|
83528
|
+
return jsxs(Host$e$2, __assign$1({
|
|
83529
83529
|
className: className,
|
|
83530
83530
|
"data-has-more-indicator": showMoreIndicator
|
|
83531
83531
|
}, {
|
|
@@ -83611,13 +83611,13 @@ var IndicatorWidth = 50; // We calculate the space available to show the channel
|
|
|
83611
83611
|
// The full width of the container => 100%
|
|
83612
83612
|
// Minus the indicator width which might not be there in the case we have 3 channels or less
|
|
83613
83613
|
|
|
83614
|
-
var Host$e$
|
|
83614
|
+
var Host$e$2 = _styled.div(templateObject_1$s$1 || (templateObject_1$s$1 = __makeTemplateObject$1(["\n display: flex;\n width: 100%;\n\n &[data-has-more-indicator='true'] {\n [data-channels] {\n width: calc(100% - ", "px);\n }\n }\n\n &[data-has-more-indicator='false'] {\n [data-channels] {\n width: 100%;\n }\n }\n"], ["\n display: flex;\n width: 100%;\n\n &[data-has-more-indicator='true'] {\n [data-channels] {\n width: calc(100% - ", "px);\n }\n }\n\n &[data-has-more-indicator='false'] {\n [data-channels] {\n width: 100%;\n }\n }\n"])), IndicatorWidth + BubbleGap);
|
|
83615
83615
|
|
|
83616
83616
|
var ChannelsHost = _styled.div(templateObject_2$m$1 || (templateObject_2$m$1 = __makeTemplateObject$1(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"]))); // Max channel width: Divide the space by the number of bubbles we need to display minus bubble gap - 6px
|
|
83617
83617
|
|
|
83618
83618
|
|
|
83619
83619
|
var StyledChannelTitle = _styled.span(templateObject_5$4$2 || (templateObject_5$4$2 = __makeTemplateObject$1(["\n z-index: 1;\n\n ", "\n\n ", "\n\n ", "\n"], ["\n z-index: 1;\n\n ", "\n\n ", "\n\n ", "\n"])), function (p) {
|
|
83620
|
-
return p.bubbleCount && css$2(templateObject_3$e$
|
|
83620
|
+
return p.bubbleCount && css$2(templateObject_3$e$2 || (templateObject_3$e$2 = __makeTemplateObject$1(["\n max-width: calc(100% / ", " - ", "px);\n "], ["\n max-width: calc(100% / ", " - ", "px);\n "])), p.bubbleCount, BubbleGap);
|
|
83621
83621
|
}, function (p) {
|
|
83622
83622
|
return p.bubbleCount && p.bubbleCount > 1 && css$2(templateObject_4$8$2 || (templateObject_4$8$2 = __makeTemplateObject$1(["\n margin-right: ", "px;\n "], ["\n margin-right: ", "px;\n "])), BubbleGap);
|
|
83623
83623
|
}, function (p) {
|
|
@@ -83640,7 +83640,7 @@ var StyledCallout$3 = _styled(Callout)(templateObject_8$l || (templateObject_8$l
|
|
|
83640
83640
|
|
|
83641
83641
|
var CalloutList = _styled.ul(templateObject_9$g || (templateObject_9$g = __makeTemplateObject$1(["\n margin: 0;\n padding: 0;\n list-style: none;\n"], ["\n margin: 0;\n padding: 0;\n list-style: none;\n"])));
|
|
83642
83642
|
|
|
83643
|
-
var templateObject_1$s$1, templateObject_2$m$1, templateObject_3$e$
|
|
83643
|
+
var templateObject_1$s$1, templateObject_2$m$1, templateObject_3$e$2, templateObject_4$8$2, templateObject_5$4$2, templateObject_6$2$2, templateObject_7$n, templateObject_8$l, templateObject_9$g;
|
|
83644
83644
|
|
|
83645
83645
|
_styled('div').withConfig({
|
|
83646
83646
|
displayName: "ChannelSelector__Host",
|
|
@@ -83696,7 +83696,7 @@ function isChannel(value) {
|
|
|
83696
83696
|
var Host$c$1 = _styled.ul.withConfig({
|
|
83697
83697
|
displayName: "ClickableChannelTitles__Host",
|
|
83698
83698
|
componentId: "sc-1a7ny18-0"
|
|
83699
|
-
})(templateObject_1$q$
|
|
83699
|
+
})(templateObject_1$q$2 || (templateObject_1$q$2 = __makeTemplateObject$1(["\n display: flex;\n flex-wrap: wrap;\n font-size: ", "px;\n\n &&& {\n margin: 0;\n padding: 0;\n list-style: none;\n\n li {\n margin: 0;\n }\n }\n"], ["\n display: flex;\n flex-wrap: wrap;\n font-size: ", "px;\n\n &&& {\n margin: 0;\n padding: 0;\n list-style: none;\n\n li {\n margin: 0;\n }\n }\n"])), fontSizeSmall);
|
|
83700
83700
|
|
|
83701
83701
|
var ChannelBubble = _styled.div.withConfig({
|
|
83702
83702
|
displayName: "ClickableChannelTitles__ChannelBubble",
|
|
@@ -83719,7 +83719,7 @@ var ChannelBubbleWrapper = _styled.span.withConfig({
|
|
|
83719
83719
|
componentId: "sc-1a7ny18-3"
|
|
83720
83720
|
})(templateObject_4$7$2 || (templateObject_4$7$2 = __makeTemplateObject$1(["\n display: block;\n margin: 2px ", "px 2px 0;\n"], ["\n display: block;\n margin: 2px ", "px 2px 0;\n"])), spacingXs);
|
|
83721
83721
|
|
|
83722
|
-
var templateObject_1$q$
|
|
83722
|
+
var templateObject_1$q$2, templateObject_2$l$1, templateObject_3$d$2, templateObject_4$7$2;
|
|
83723
83723
|
|
|
83724
83724
|
var ToolbarSearch = function ToolbarSearch(_a) {
|
|
83725
83725
|
var searchText = _a.searchText,
|
|
@@ -83750,14 +83750,14 @@ var ToolbarSearch = function ToolbarSearch(_a) {
|
|
|
83750
83750
|
var SearchBoxLargeScreen = _styled.div.withConfig({
|
|
83751
83751
|
displayName: "ToolbarSearch__SearchBoxLargeScreen",
|
|
83752
83752
|
componentId: "sc-1f480ry-0"
|
|
83753
|
-
})(templateObject_1$p$
|
|
83753
|
+
})(templateObject_1$p$2 || (templateObject_1$p$2 = __makeTemplateObject$1(["\n display: flex;\n justify-content: flex-end;\n max-width: 300px;\n flex-grow: 1;\n @media (max-width: ", "px) {\n display: none;\n }\n"], ["\n display: flex;\n justify-content: flex-end;\n max-width: 300px;\n flex-grow: 1;\n @media (max-width: ", "px) {\n display: none;\n }\n"])), maxScreenSize.medium);
|
|
83754
83754
|
|
|
83755
83755
|
var SearchIconSmallScreen = _styled.div.withConfig({
|
|
83756
83756
|
displayName: "ToolbarSearch__SearchIconSmallScreen",
|
|
83757
83757
|
componentId: "sc-1f480ry-1"
|
|
83758
83758
|
})(templateObject_2$k$1 || (templateObject_2$k$1 = __makeTemplateObject$1(["\n @media (min-width: ", "px) {\n display: none;\n }\n"], ["\n @media (min-width: ", "px) {\n display: none;\n }\n"])), minScreenSize.medium);
|
|
83759
83759
|
|
|
83760
|
-
var templateObject_1$p$
|
|
83760
|
+
var templateObject_1$p$2, templateObject_2$k$1;
|
|
83761
83761
|
|
|
83762
83762
|
var Toolbar$1 = function Toolbar(_a) {
|
|
83763
83763
|
var leftSide = _a.leftSide,
|
|
@@ -84088,9 +84088,9 @@ var GifSelectorCallout = function GifSelectorCallout(_a) {
|
|
|
84088
84088
|
|
|
84089
84089
|
var StyledCallout$1$1 = _styled(Callout)(templateObject_1$h$2 || (templateObject_1$h$2 = __makeTemplateObject$1(["\n border-radius: 10px;\n padding: 5px;\n width: 360px;\n height: 450px;\n"], ["\n border-radius: 10px;\n padding: 5px;\n width: 360px;\n height: 450px;\n"])));
|
|
84090
84090
|
|
|
84091
|
-
var StyledGifSelector = _styled(GifSelector)(templateObject_2$f$
|
|
84091
|
+
var StyledGifSelector = _styled(GifSelector)(templateObject_2$f$2 || (templateObject_2$f$2 = __makeTemplateObject$1(["\n overflow-y: auto;\n height: 400px;\n"], ["\n overflow-y: auto;\n height: 400px;\n"])));
|
|
84092
84092
|
|
|
84093
|
-
var templateObject_1$h$2, templateObject_2$f$
|
|
84093
|
+
var templateObject_1$h$2, templateObject_2$f$2;
|
|
84094
84094
|
|
|
84095
84095
|
createGlobalStyle(templateObject_1$g$2 || (templateObject_1$g$2 = __makeTemplateObject$1(["\n .lt-reach.dialog-gif-selector {\n .ms-Dialog-main {\n width: 400px !important;\n\n @media (max-width: ", "px) {\n width: 100% !important;\n }\n }\n}\n"], ["\n .lt-reach.dialog-gif-selector {\n .ms-Dialog-main {\n width: 400px !important;\n\n @media (max-width: ", "px) {\n width: 100% !important;\n }\n }\n}\n"])), maxScreenSize.small);
|
|
84096
84096
|
|
|
@@ -87472,9 +87472,9 @@ var AuthenticationContextProvider = function AuthenticationContextProvider(_a) {
|
|
|
87472
87472
|
}), void 0);
|
|
87473
87473
|
};
|
|
87474
87474
|
|
|
87475
|
-
var version$1 = "0.4.0-preview.
|
|
87476
|
-
var buildId = "
|
|
87477
|
-
var commitId = "
|
|
87475
|
+
var version$1 = "0.4.0-preview.219";
|
|
87476
|
+
var buildId = "98555";
|
|
87477
|
+
var commitId = "7017e140d89782fc7985a4be2c49f4898fab5489";
|
|
87478
87478
|
var isCustomerBuild = false;
|
|
87479
87479
|
var buildInfo = {
|
|
87480
87480
|
version: version$1,
|
|
@@ -131619,7 +131619,7 @@ promise=Promise$1.resolve(undefined);then=promise.then;notify$1=function(){then.
|
|
|
131619
131619
|
// - setTimeout
|
|
131620
131620
|
}else {notify$1=function(){// strange IE + webpack dev server bug - use .call(global)
|
|
131621
131621
|
macrotask.call(global$6,flush);};}}var microtask$1=queueMicrotask||function(fn){var task={fn:fn,next:undefined};if(last)last.next=task;if(!head){head=task;notify$1();}last=task;};var newPromiseCapability$2={};var aFunction$4=aFunction$7;var PromiseCapability=function(C){var resolve,reject;this.promise=new C(function($$resolve,$$reject){if(resolve!==undefined||reject!==undefined)throw TypeError('Bad Promise constructor');resolve=$$resolve;reject=$$reject;});this.resolve=aFunction$4(resolve);this.reject=aFunction$4(reject);};// 25.4.1.5 NewPromiseCapability(C)
|
|
131622
|
-
newPromiseCapability$2.f=function(C){return new PromiseCapability(C);};var anObject$2$1=anObject$h;var isObject$3=isObject$c;var newPromiseCapability$1=newPromiseCapability$2;var promiseResolve$1=function(C,x){anObject$2$1(C);if(isObject$3(x)&&x.constructor===C)return x;var promiseCapability=newPromiseCapability$1.f(C);var resolve=promiseCapability.resolve;resolve(x);return promiseCapability.promise;};var global$5=global$m;var hostReportErrors$1=function(a,b){var console=global$5.console;if(console&&console.error){arguments.length===1?console.error(a):console.error(a,b);}};var perform$1=function(exec){try{return {error:false,value:exec()};}catch(error){return {error:true,value:error};}};var global$4=global$m;var userAgent=engineUserAgent;var process$1=global$4.process;var versions=process$1&&process$1.versions;var v8=versions&&versions.v8;var match,version;if(v8){match=v8.split('.');version=match[0]+match[1];}else if(userAgent){match=userAgent.match(/Edge\/(\d+)/);if(!match||match[1]>=74){match=userAgent.match(/Chrome\/(\d+)/);if(match)version=match[1];}}var engineV8Version=version&&+version;var $$9=_export;var global$3=global$m;var getBuiltIn=getBuiltIn$6;var NativePromise=nativePromiseConstructor;var redefine$a=redefine$9.exports;var redefineAll=redefineAll$2;var setToStringTag=setToStringTag$5;var setSpecies=setSpecies$2;var isObject$2=isObject$c;var aFunction$3=aFunction$7;var anInstance=anInstance$3;var classof$1=classofRaw$1;var inspectSource=inspectSource$3;var iterate=iterate$2.exports;var checkCorrectnessOfIteration=checkCorrectnessOfIteration$1;var speciesConstructor=speciesConstructor$2;var task=task$1.set;var microtask=microtask$1;var promiseResolve=promiseResolve$1;var hostReportErrors=hostReportErrors$1;var newPromiseCapabilityModule=newPromiseCapability$2;var perform=perform$1;var InternalStateModule=internalState;var isForced=isForced_1;var wellKnownSymbol$2=wellKnownSymbol$l;var V8_VERSION=engineV8Version;var SPECIES$1=wellKnownSymbol$2('species');var PROMISE='Promise';var getInternalState=InternalStateModule.get;var setInternalState=InternalStateModule.set;var getInternalPromiseState=InternalStateModule.getterFor(PROMISE);var PromiseConstructor=NativePromise;var TypeError$1=global$3.TypeError;var document$1=global$3.document;var process$4=global$3.process;var $fetch=getBuiltIn('fetch');var newPromiseCapability=newPromiseCapabilityModule.f;var newGenericPromiseCapability=newPromiseCapability;var IS_NODE=classof$1(process$4)=='process';var DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$3.dispatchEvent);var UNHANDLED_REJECTION='unhandledrejection';var REJECTION_HANDLED='rejectionhandled';var PENDING=0;var FULFILLED=1;var REJECTED=2;var HANDLED=1;var UNHANDLED=2;var Internal,OwnPromiseCapability,PromiseWrapper,nativeThen;var FORCED$2=isForced(PROMISE,function(){var GLOBAL_CORE_JS_PROMISE=inspectSource(PromiseConstructor)!==String(PromiseConstructor);if(!GLOBAL_CORE_JS_PROMISE){// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
131622
|
+
newPromiseCapability$2.f=function(C){return new PromiseCapability(C);};var anObject$2$1=anObject$h;var isObject$3=isObject$c;var newPromiseCapability$1=newPromiseCapability$2;var promiseResolve$1=function(C,x){anObject$2$1(C);if(isObject$3(x)&&x.constructor===C)return x;var promiseCapability=newPromiseCapability$1.f(C);var resolve=promiseCapability.resolve;resolve(x);return promiseCapability.promise;};var global$5=global$m;var hostReportErrors$1=function(a,b){var console=global$5.console;if(console&&console.error){arguments.length===1?console.error(a):console.error(a,b);}};var perform$1=function(exec){try{return {error:false,value:exec()};}catch(error){return {error:true,value:error};}};var global$4=global$m;var userAgent=engineUserAgent;var process$1=global$4.process;var versions=process$1&&process$1.versions;var v8=versions&&versions.v8;var match$2,version;if(v8){match$2=v8.split('.');version=match$2[0]+match$2[1];}else if(userAgent){match$2=userAgent.match(/Edge\/(\d+)/);if(!match$2||match$2[1]>=74){match$2=userAgent.match(/Chrome\/(\d+)/);if(match$2)version=match$2[1];}}var engineV8Version=version&&+version;var $$9=_export;var global$3=global$m;var getBuiltIn=getBuiltIn$6;var NativePromise=nativePromiseConstructor;var redefine$a=redefine$9.exports;var redefineAll=redefineAll$2;var setToStringTag=setToStringTag$5;var setSpecies=setSpecies$2;var isObject$2=isObject$c;var aFunction$3=aFunction$7;var anInstance=anInstance$3;var classof$1=classofRaw$1;var inspectSource=inspectSource$3;var iterate=iterate$2.exports;var checkCorrectnessOfIteration=checkCorrectnessOfIteration$1;var speciesConstructor=speciesConstructor$2;var task=task$1.set;var microtask=microtask$1;var promiseResolve=promiseResolve$1;var hostReportErrors=hostReportErrors$1;var newPromiseCapabilityModule=newPromiseCapability$2;var perform=perform$1;var InternalStateModule=internalState;var isForced=isForced_1;var wellKnownSymbol$2=wellKnownSymbol$l;var V8_VERSION=engineV8Version;var SPECIES$1=wellKnownSymbol$2('species');var PROMISE='Promise';var getInternalState=InternalStateModule.get;var setInternalState=InternalStateModule.set;var getInternalPromiseState=InternalStateModule.getterFor(PROMISE);var PromiseConstructor=NativePromise;var TypeError$1=global$3.TypeError;var document$1=global$3.document;var process$4=global$3.process;var $fetch=getBuiltIn('fetch');var newPromiseCapability=newPromiseCapabilityModule.f;var newGenericPromiseCapability=newPromiseCapability;var IS_NODE=classof$1(process$4)=='process';var DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$3.dispatchEvent);var UNHANDLED_REJECTION='unhandledrejection';var REJECTION_HANDLED='rejectionhandled';var PENDING=0;var FULFILLED=1;var REJECTED=2;var HANDLED=1;var UNHANDLED=2;var Internal,OwnPromiseCapability,PromiseWrapper,nativeThen;var FORCED$2=isForced(PROMISE,function(){var GLOBAL_CORE_JS_PROMISE=inspectSource(PromiseConstructor)!==String(PromiseConstructor);if(!GLOBAL_CORE_JS_PROMISE){// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
131623
131623
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
131624
131624
|
// We can't detect it synchronously, so just check versions
|
|
131625
131625
|
if(V8_VERSION===66)return true;// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
@@ -131840,7 +131840,7 @@ var existingNode=allNodesById[node.id];if(existingNode){if(existingNode.id===pag
|
|
|
131840
131840
|
// for this case the blockProps would be an empty object and
|
|
131841
131841
|
// we need to set the showPages and showDocuments to true
|
|
131842
131842
|
var InlinePageListByCurrentPage=function InlinePageListByCurrentPage(_a){var _b=_a.blockProps,props=_b===void 0?{showDocuments:true,showPages:true}:_b;var item=useDetailViewContext().item;var getSubpages=usePagesApi().getSubpages;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var _c=useItemLoaderByCurrentPage(item.id,defaultPageSize,item.navigationContext,{showPages:props.showPages,showDocuments:props.showDocuments},getAllSubItems,[item===null||item===void 0?void 0:item.id]),items=_c.pageItems,pagingProps=_c.pagingProps;if(items.length===0){return null;}return jsx$1(InlinePageListWithPaging,{pages:items,pagingProps:pagingProps,baseRoute:buildPath('pages'),filterBaseUrl:buildPath('/pages/search')},void 0);function getAllSubItems(id,pageType){return __awaiter(this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getSubpages(id,{pageType:pageType})];case 1:result=_a.sent();return [2/*return*/,result.items];}});});}};var InlinePageList=function InlinePageList(_a){var blockProps=_a.blockProps;if(blockProps===null||blockProps===void 0?void 0:blockProps.keywords){return jsx$1(InlinePageListByKeywords,{keywords:blockProps.keywords.split(','),showPages:blockProps.showPages,showDocuments:blockProps.showDocuments},void 0);}if(blockProps===null||blockProps===void 0?void 0:blockProps.pageId){return jsx$1(InlinePageListByPageId,{pageId:blockProps.pageId,showPages:blockProps.showPages,showDocuments:blockProps.showDocuments},void 0);}return jsx$1(InlinePageListByCurrentPage,{blockProps:blockProps},void 0);};var InlinePageListMapper={component:InlinePageList,type:EntityType.InlinePageList,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var pageListId=node.getAttribute('data-page-list-id');if(pageListId==null){return null;}var showChildren=node.getAttribute('data-show-children')==='true';var showDocumentsAttribute=node.getAttribute('data-show-documents');var showPagesAttribute=node.getAttribute('data-show-pages');var pageId=node.getAttribute('data-page-id');var keywords=node.getAttribute('data-keywords');if(!showDocumentsAttribute&&!showPagesAttribute){// ensure backwards compatibility
|
|
131843
|
-
return {id:pageListId,showChildren:showChildren,showPages:true,showDocuments:false,pageId:pageId,keywords:keywords};}var showDocuments=showDocumentsAttribute==='true';var showPages=showPagesAttribute==='true';return {id:pageListId,showChildren:showChildren,showDocuments:showDocuments,showPages:showPages,pageId:pageId,keywords:keywords};}};var PageBreadcrumb=function PageBreadcrumb(_a){var page=_a.page,target=_a.target,languageOverride=_a.language,hideCurrentPageNode=_a.hideCurrentPageNode,className=_a.className;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var history=useHistory();if(!page||!page.navigationContext){return null;}var _b=getBreadcrumbsItems(page,target,handleOnClick,function(page){return getTitle(page,user,formatMessage,languageOverride);},formatMessage,hideCurrentPageNode),parentNode=_b.parentNode,breadcrumbItems=_b.breadcrumbItems;return jsxs("div",__assign({className:className},{children:[jsx$1(LargeScreenBreadcrumb,{items:breadcrumbItems,onRenderItem:renderBreadcrumbItem,overflowIndex:1,"data-breadcrumb":true,overflowAriaLabel:formatMessage({id:'AriaLabel.otherPages'}),focusZoneProps:{handleTabKey:1}},void 0),jsx$1(MobileBreadcrumb,{target:target,parentNode:parentNode},void 0)]}),void 0);function renderBreadcrumbItem(item){if(item.key==='home'){return jsx$1(BreadcrumbHomeItem,__assign({to:item.href,"aria-label":item.text,"data-pages-home-icon":true},{children:jsx$1(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0);}if(item.isCurrentItem){return jsx$1(BreadcrumbCurrentItem,__assign({"aria-current":"page"},{children:item.text}),void 0);}return jsx$1(BreadcrumbItem,__assign({to:item.href,"data-page-breadcrumb-node":item.key},{children:item.text}),void 0);}function handleOnClick(e,item){e.stopPropagation();e.preventDefault();history.push({pathname:item.href});}};var MobileBreadcrumb=function MobileBreadcrumb(_a){var target=_a.target,parentNode=_a.parentNode;var formatMessage=useIntl().formatMessage;return jsxs(MobileBreadcrumbHost,__assign({"data-mobile-breadcrumb":true},{children:[jsx$1("li",{children:jsx$1(BreadcrumbHomeItem,__assign({to:target,"aria-label":formatMessage({id:'Generic.home'}),"data-pages-home-icon":true},{children:jsx$1(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0)},void 0),parentNode&&jsxs(ParentNode,{children:[jsx$1(LeftChevronIcon,{iconName:"ChevronLeft"},void 0),jsx$1(BreadcrumbItem,__assign({to:NewsService.getNewsRoute(target,parentNode.id,parentNode.title),"data-page-breadcrumb-parent-node":parentNode.id},{children:parentNode.title}),void 0)]},void 0)]}),void 0);};var MobileBreadcrumbHost=_styled.ul.withConfig({displayName:"PageBreadcrumb__MobileBreadcrumbHost",componentId:"sc-1m4qq1d-0"})(templateObject_1$Q||(templateObject_1$Q=__makeTemplateObject(["\n display: none;\n align-items: center;\n padding: 0;\n margin: 0;\n list-style: none;\n font-size: ","px;\n\n @media (max-width: ","px) {\n display: flex;\n }\n"],["\n display: none;\n align-items: center;\n padding: 0;\n margin: 0;\n list-style: none;\n font-size: ","px;\n\n @media (max-width: ","px) {\n display: flex;\n }\n"])),fontSizeSmall,maxScreenSize.medium);var ParentNode=_styled.li.withConfig({displayName:"PageBreadcrumb__ParentNode",componentId:"sc-1m4qq1d-1"})(templateObject_2$w||(templateObject_2$w=__makeTemplateObject(["\n margin: 0 ","px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ",";\n"],["\n margin: 0 ","px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ",";\n"])),spacingM,function(p){return p.theme.palette.accent;});var LeftChevronIcon=_styled(Icon).withConfig({displayName:"PageBreadcrumb__LeftChevronIcon",componentId:"sc-1m4qq1d-2"})(templateObject_3$n||(templateObject_3$n=__makeTemplateObject(["\n font-size: 10px;\n font-weight: bold;\n color: ",";\n"],["\n font-size: 10px;\n font-weight: bold;\n color: ",";\n"])),function(p){return p.theme.palette.accent;});var LargeScreenBreadcrumb=_styled(Breadcrumb).withConfig({displayName:"PageBreadcrumb__LargeScreenBreadcrumb",componentId:"sc-1m4qq1d-3"})(templateObject_4$e||(templateObject_4$e=__makeTemplateObject(["\n && {\n margin: 0;\n }\n\n .ms-Breadcrumb-chevron {\n font-weight: bold;\n }\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n && {\n margin: 0;\n }\n\n .ms-Breadcrumb-chevron {\n font-weight: bold;\n }\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.medium);var HomeIcon=_styled(Icon).withConfig({displayName:"PageBreadcrumb__HomeIcon",componentId:"sc-1m4qq1d-4"})(templateObject_5$c||(templateObject_5$c=__makeTemplateObject(["\n padding-top: 1px;\n"],["\n padding-top: 1px;\n"])));var BreadcrumbItem=_styled(NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbItem",componentId:"sc-1m4qq1d-5"})(templateObject_6$6$1||(templateObject_6$6$1=__makeTemplateObject(["\n padding: 0 ","px;\n color: ",";\n"],["\n padding: 0 ","px;\n color: ",";\n"])),spacingS,function(p){return p.theme.palette.accent;});var BreadcrumbHomeItem=_styled(NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbHomeItem",componentId:"sc-1m4qq1d-6"})(templateObject_7$4$1||(templateObject_7$4$1=__makeTemplateObject(["\n color: ",";\n\n + i {\n padding-left: ","px;\n }\n"],["\n color: ",";\n\n + i {\n padding-left: ","px;\n }\n"])),function(p){return p.theme.palette.accent;},spacingS);var BreadcrumbCurrentItem=_styled.div.withConfig({displayName:"PageBreadcrumb__BreadcrumbCurrentItem",componentId:"sc-1m4qq1d-7"})(templateObject_8$4$1||(templateObject_8$4$1=__makeTemplateObject(["\n padding-left: ","px;\n color: ",";\n"],["\n padding-left: ","px;\n color: ",";\n"])),spacingS,function(p){return p.theme.palette.neutralSecondaryAlt;});var templateObject_1$Q,templateObject_2$w,templateObject_3$n,templateObject_4$e,templateObject_5$c,templateObject_6$6$1,templateObject_7$4$1,templateObject_8$4$1;var DetailViewPageDocumentDownload=function DetailViewPageDocumentDownload(){var user=useCurrentUser();var _a=useDetailViewContext(),item=_a.item,preferredContent=_a.content;if(!item){return null;}var content=(preferredContent===null||preferredContent===void 0?void 0:preferredContent.fileInfo)?preferredContent:getContentForPage(item,user).content;if(!(content===null||content===void 0?void 0:content.fileInfo)){return null;}return jsx$1(PageDocumentDownloadButton,{item:item,content:content},void 0);};var PageDocumentDownloadButton=function PageDocumentDownloadButton(_a){var item=_a.item,content=_a.content,basePath=_a.basePath;var _b=useInlinePageDocument({pageId:item.id,fileId:content.fileInfo.fileId,extension:content.fileInfo.extension,title:content.title,fileName:content.fileInfo.fileName},item,basePath),fileUrl=_b.fileUrl,iconName=_b.iconName,title=_b.title,fileName=_b.fileName,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return jsxs(Host$k,{children:[jsx$1(FormattedMessage$1,{id:"Pages.documents.buttonDownloadInfo"},void 0),jsx$1(DownloadButton,{fileUrl:fileUrl,fileName:fileName,title:title,fileIconName:iconName,onClick:onPageDocumentDownloadClick},void 0)]},void 0);};var Host$k=_styled.div.withConfig({displayName:"DetailViewPageDocumentDownload__Host",componentId:"sc-1gtkslm-0"})(templateObject_1$P||(templateObject_1$P=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var DownloadButton=_styled(InlinePageDocumentDownloadButton).withConfig({displayName:"DetailViewPageDocumentDownload__DownloadButton",componentId:"sc-1gtkslm-1"})(templateObject_2$v||(templateObject_2$v=__makeTemplateObject(["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"],["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"])),spacingS,minScreenSize.medium);var templateObject_1$P,templateObject_2$v;_styled(PublishableItemBanner).withConfig({displayName:"CardBanner__StyledBanner",componentId:"sc-mqzdnh-0"})(templateObject_1$O||(templateObject_1$O=__makeTemplateObject(["\n &.video-view-container {\n height: 100%; /* this is needed for not overlapping the card title */\n }\n"],["\n &.video-view-container {\n height: 100%; /* this is needed for not overlapping the card title */\n }\n"])));var templateObject_1$O;_styled.div.withConfig({displayName:"Card__Host",componentId:"sc-1m8ygh-0"})(templateObject_1$N||(templateObject_1$N=__makeTemplateObject(["\n &.card {\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n\n width: 100%;\n\n margin-bottom: 10px;\n\n &[data-packed] {\n opacity: 1;\n }\n\n &.card-enter,\n &.card-appear {\n opacity: 0.01;\n }\n\n &.card-enter.card-enter-active,\n &.card-appear.card-appear-active {\n opacity: 1;\n transition: opacity 0.75s ease-in;\n }\n\n @media all and (min-width: ","px) {\n transition: opacity 0.75s ease-in;\n opacity: 0;\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n }\n"],["\n &.card {\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n\n width: 100%;\n\n margin-bottom: 10px;\n\n &[data-packed] {\n opacity: 1;\n }\n\n &.card-enter,\n &.card-appear {\n opacity: 0.01;\n }\n\n &.card-enter.card-enter-active,\n &.card-appear.card-appear-active {\n opacity: 1;\n transition: opacity 0.75s ease-in;\n }\n\n @media all and (min-width: ","px) {\n transition: opacity 0.75s ease-in;\n opacity: 0;\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n }\n"])),minScreenSize.small,cardWidthS,minScreenSize.medium,cardWidthM,minScreenSize.large,cardWidthL,minScreenSize.xLarge,cardWidthXL);_styled.article.withConfig({displayName:"Card__Article",componentId:"sc-1m8ygh-1"})(templateObject_3$m||(templateObject_3$m=__makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ","\n\n > .card-banner {\n height: calc(((100vw - ","px) * (1 / ",")));\n flex: 0 1 auto;\n }\n\n .card-title {\n margin-top: 7px;\n margin-bottom: 0;\n font-size: 1.1em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n\n .card-metaInfo {\n padding-top: ","px;\n color: #666;\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n .card-title {\n margin-top: 7px;\n font-size: 1.3em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n }\n"],["\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ","\n\n > .card-banner {\n height: calc(((100vw - ","px) * (1 / ",")));\n flex: 0 1 auto;\n }\n\n .card-title {\n margin-top: 7px;\n margin-bottom: 0;\n font-size: 1.1em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n\n .card-metaInfo {\n padding-top: ","px;\n color: #666;\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n .card-title {\n margin-top: 7px;\n font-size: 1.3em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n }\n"])),function(p){return p.highlight&&css$2(templateObject_2$u||(templateObject_2$u=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "])),spacingXs,function(p){return p.theme.palette.accent;});},spacingM,bannerAspectRatio,spacingM,minScreenSize.small,cardWidthS,bannerAspectRatio,minScreenSize.medium,cardWidthM,bannerAspectRatio,minScreenSize.large,cardWidthL,bannerAspectRatio,minScreenSize.xLarge,cardWidthXL,bannerAspectRatio);var templateObject_1$N,templateObject_2$u,templateObject_3$m;var LanguageSelector=function LanguageSelector(props){var history=useHistory();var currentUser=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var getAllLanguagesLocalized=useLanguageApi().getAllLanguagesLocalized;var intl=useIntl();var formatMessage=intl.formatMessage;var languageDefinitions=usePromise$2(function(){return getAllLanguagesLocalized(intl);})[0];var features=useFeatures();if(languageDefinitions==null){return null;}if(props.chromeless)return jsx$1(ActionButton,__assign({iconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout'},className:classNames(props.className,'header-button')},{children:formatMessage({id:"Generic.languages."+props.selectedLanguage})}),void 0);return jsx$1(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsx$1(LanguageSelectorButton,{menuIconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout',isBeakVisible:props.showBeak},className:classNames(props.className,'header-button'),"data-language-selector-button":true,ariaLabel:formatMessage({id:'AriaLabel.autoTranslation'})},void 0)}),void 0);function getContextualMenuItems(){if(props.languages==null){return [];}var menuItems=[];var preferredLanguageItem=getPreferredLanguageItem();if(preferredLanguageItem){menuItems.push(preferredLanguageItem);}var activeLanguagesItems=getActiveLanguagesItems();activeLanguagesItems.sort(function(a,b){return a.text.localeCompare(b.text);});menuItems=menuItems.concat(activeLanguagesItems);if(!props.hideEditLanguagePreferences){var editLanguagePreferencesItem={key:'edit',text:formatMessage({id:'Generic.editLanguagePreferences'}),iconProps:{iconName:'PlayerSettings'},onClick:handleEditLanguagePreferences,className:'lt-reach-languageselector-menu-item'};menuItems.push(editLanguagePreferencesItem);}return menuItems;}function handleEditLanguagePreferences(){if(props.onEditLanguagePreferencesClick){props.onEditLanguagePreferencesClick();}else {history.push(buildPath('/user'));}}function getActiveLanguagesItems(){return props.languages.map(function(l){var fullLanguage=languageDefinitions.find(function(ld){return ld.code===l;});return {key:l,text:fullLanguage.localizedName,iconProps:{iconName:'World'},onClick:function(){return props.onLanguageChange(l.toString());},className:classNames('lt-reach-languageselector-menu-item',l===props.selectedLanguage&&'selected')};});}function getPreferredLanguageItem(){if(!features.automaticTranslation){return null;}if(!props.onTranslateClick){return null;}var preferredContentLanguage=getPreferredContentLanguage(currentUser);var shouldAddPreferredContentLanguage=preferredContentLanguage!=null&&!contentLanguagesWithoutAutomaticTranslation.includes(preferredContentLanguage)&&allAvailableContentLanguages.includes(preferredContentLanguage)&&props.languages.indexOf(preferredContentLanguage)<0;if(!shouldAddPreferredContentLanguage){return null;}return {key:preferredContentLanguage,text:formatMessage({id:'Generic.automaticTranslation'},{language:formatMessage({id:"Generic.languages."+preferredContentLanguage})}),iconProps:{iconName:'Robot'},onClick:function(){return props.onTranslateClick(preferredContentLanguage);},className:classNames('lt-reach-languageselector-menu-item',preferredContentLanguage===props.selectedLanguage&&'selected')};}};var LanguageSelectorButton=_styled(IconButton).withConfig({displayName:"LanguageSelector__LanguageSelectorButton",componentId:"sc-48zwek-0"})(templateObject_1$M||(templateObject_1$M=__makeTemplateObject(["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"],["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"])));var templateObject_1$M;_styled.article.withConfig({displayName:"DetailViewArticle__Host",componentId:"sc-we2q7z-0"})(templateObject_1$L||(templateObject_1$L=__makeTemplateObject(["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"],["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"])),minScreenSize.large+1,maxContentWidth);var templateObject_1$L;var DetailViewBanner=function DetailViewBanner(){var _a=useDetailViewContext(),item=_a.item,resourceType=_a.resourceType,isEditorPreview=_a.isEditorPreview;if(!item.bannerInfo){return null;}return jsx$1(Banner$3,{itemId:item.id,token:item.fileAccessToken,bannerInfo:item.bannerInfo,useEditorRoutes:isEditorPreview,width:getMaxImageWidth(),canOpenImage:true,resourceType:resourceType},void 0);};var Banner$3=_styled(PublishableItemBanner).withConfig({displayName:"DetailViewBanner__Banner",componentId:"sc-1wuqvtw-0"})(templateObject_1$K||(templateObject_1$K=__makeTemplateObject(["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"],["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"])),bannerAspectRatio,minScreenSize.large+1,minScreenSize.large,spacingM,bannerAspectRatio);var templateObject_1$K;var DetailViewIntro=function DetailViewIntro(){var content=useDetailViewContext().content;var hasIntro=content.intro&&content.intro.length>0;if(!hasIntro){return null;}return jsx$1(DetailIntro,{children:content.intro},void 0);};var DetailIntro=_styled.p.withConfig({displayName:"DetailViewIntro__DetailIntro",componentId:"sc-1kubhyf-0"})(templateObject_1$J||(templateObject_1$J=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"],["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,spacingS,spacingS+2,fontSizeMedium+2);var templateObject_1$J;var DetailMainSection=function DetailMainSection(_a){var children=_a.children;return jsx$1(DetailMainStyledSection,__assign({className:"detail-view-main"},{children:children}),void 0);};var DetailMainStyledSection=_styled.section.withConfig({displayName:"DetailViewMainSection__DetailMainStyledSection",componentId:"sc-ifywhg-0"})(templateObject_1$I||(templateObject_1$I=__makeTemplateObject(["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"],["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"])),detailViewSectionPadding-5,detailViewSectionPadding,detailViewSectionPadding,minScreenSize.small,detailViewSectionPaddingLarge-10,detailViewSectionPaddingLarge,detailViewSectionPaddingLarge);var templateObject_1$I;var GutterMarkerIcon=function GutterMarkerIcon(_a){var iconName=_a.iconName,children=_a.children,isActive=_a.isActive,color=_a.color,tooltipResourceKey=_a.tooltipResourceKey,className=_a.className;return jsxs(Host$h,__assign({className:className},{children:[jsx$1(IconContainer$1,__assign({isActive:isActive,className:isActive?"ms-bgColor-"+color:'ms-bgColor-white'},{children:isActive&&jsx$1(StyledTooltip,__assign({resourceKey:tooltipResourceKey},{children:jsx$1(StyledIcon$2$1,{className:"ms-fontColor-white",iconName:iconName},void 0)}),void 0)}),void 0),isActive?jsx$1(ActiveContent,__assign({className:"ms-borderColor-"+color},{children:children}),void 0):jsx$1(Content$3,{children:children},void 0)]}),void 0);};var Host$h=_styled.div.withConfig({displayName:"GutterMakerIcon__Host",componentId:"sc-aa2cf4-0"})(templateObject_1$H||(templateObject_1$H=__makeTemplateObject(["\n margin: 0;\n display: flex;\n align-content: center;\n"],["\n margin: 0;\n display: flex;\n align-content: center;\n"])));var StyledIcon$2$1=_styled(Icon).withConfig({displayName:"GutterMakerIcon__StyledIcon",componentId:"sc-aa2cf4-1"})(templateObject_2$t||(templateObject_2$t=__makeTemplateObject(["\n font-size: 25px;\n"],["\n font-size: 25px;\n"])));var Content$3=_styled.div.withConfig({displayName:"GutterMakerIcon__Content",componentId:"sc-aa2cf4-2"})(templateObject_3$l||(templateObject_3$l=__makeTemplateObject(["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"],["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"])));var ActiveContent=_styled(Content$3).withConfig({displayName:"GutterMakerIcon__ActiveContent",componentId:"sc-aa2cf4-3"})(templateObject_4$d||(templateObject_4$d=__makeTemplateObject(["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"],["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"])));var IconContainer$1=_styled.div.withConfig({displayName:"GutterMakerIcon__IconContainer",componentId:"sc-aa2cf4-4"})(templateObject_5$b||(templateObject_5$b=__makeTemplateObject(["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"],["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"])),function(_a){var isActive=_a.isActive;return isActive?'50px':'auto';});var StyledTooltip=_styled(Tooltip).withConfig({displayName:"GutterMakerIcon__StyledTooltip",componentId:"sc-aa2cf4-5"})(templateObject_6$5$1||(templateObject_6$5$1=__makeTemplateObject(["\n && {\n display: inherit;\n }\n"],["\n && {\n display: inherit;\n }\n"])));var templateObject_1$H,templateObject_2$t,templateObject_3$l,templateObject_4$d,templateObject_5$b,templateObject_6$5$1;var DetailViewTitle=function DetailViewTitle(){var _a=useDetailViewContext(),content=_a.content,item=_a.item;var hasAlert=hasFlag(item.knownState,KnownNewsState.Alert);return jsx$1(GutterMarkerIcon,__assign({iconName:"Warning",isActive:hasAlert,color:"red",tooltipResourceKey:"NewsArticle.alert"},{children:jsx$1(Title$4,__assign({"data-title":true},{children:content.title}),void 0)}),void 0);};var Title$4=_styled.h1.withConfig({displayName:"DetailViewTitle__Title",componentId:"sc-1jbzvna-0"})(templateObject_1$G||(templateObject_1$G=__makeTemplateObject(["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"],["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"])),fontSizeLarge-1,minScreenSize.small);var templateObject_1$G;_styled(ItemMetaInfo).withConfig({displayName:"NewsDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-kib7we-0"})(templateObject_1$F||(templateObject_1$F=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"],["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"])),fontSizeSmall);var templateObject_1$F;var mappers=[InlineImageMapper,InlineFileMapper,InlineQuoteMapper,InlineGalleryMapper,InlineCodeMapper,InlineVideoMapper,InlineTable,InlineContactMapper,InlinePageListMapper,InlineUrlPreviewMapper];var RichTextViewer=function RichTextViewer(_a){var html=_a.html;return jsx$1(TextViewer,{html:html,componentMappers:mappers},void 0);};var DetailViewBody=function DetailViewBody(){var _a=useDetailViewContext(),content=_a.content,resourceType=_a.resourceType;var bodyHtml=content&&content.body;return jsx$1(DetailBody$1,__assign({className:"lt-reach-detail-view-body","data-item-type":resourceType},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(RichTextViewer,{html:bodyHtml},void 0)},void 0)}),void 0);};var DetailBody$1=_styled.div.withConfig({displayName:"DetailViewBody__DetailBody",componentId:"sc-7b4trq-0"})(templateObject_1$E||(templateObject_1$E=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n\n // So that headings have the correct semantics for accessibility (i.e. title is h1, subheadings start at h2),\n // but maintain the same visual design, this styles each heading to look one \"step\" larger\n // e.g. h2 looks like h1, etc.\n && {\n h2 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h4 {\n font-size: ","px;\n }\n\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n }\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n\n // So that headings have the correct semantics for accessibility (i.e. title is h1, subheadings start at h2),\n // but maintain the same visual design, this styles each heading to look one \"step\" larger\n // e.g. h2 looks like h1, etc.\n && {\n h2 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h4 {\n font-size: ","px;\n }\n\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n }\n"])),fontSizeLarge-1,spacingS+2,fontSizeLarge-3,fontSizeLarge-5,spacingS);var templateObject_1$E;var DetailViewKeywords=function DetailViewKeywords(_a){var filterBaseUrl=_a.filterBaseUrl;var features=useFeatures();var _b=useDetailViewContext(),item=_b.item,userPreferredLanguage=_b.userPreferredLanguage;var formatMessage=useIntl().formatMessage;if(!features.keywords){return null;}return jsx$1(Fragment,{children:Object.keys(item.keywords).length>0&&jsx$1(KeywordsSection,__assign({"aria-label":formatMessage({id:'AriaLabel.section.keywords'})},{children:jsx$1(KeywordsInfo,{keywords:item.keywords,language:userPreferredLanguage,filterBaseUrl:filterBaseUrl},void 0)}),void 0)},void 0);};var KeywordsSection=_styled.section.withConfig({displayName:"DetailViewKeywords__KeywordsSection",componentId:"sc-ltysu4-0"})(templateObject_1$D||(templateObject_1$D=__makeTemplateObject(["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),maxScreenSize.medium,fontSizeSmall);var templateObject_1$D;var ConfirmationBox=function ConfirmationBox(_a){var disabled=_a.disabled,checked=_a.checked,onChange=_a.onChange;var formatMessage=useIntl().formatMessage;return jsx$1(Host$g$1,{children:jsx$1(NeutralCheckBox,{disabled:disabled,checked:checked,onChange:function(_,value){return onChange(value);},label:formatMessage({id:checked?'NewsArticle.confirmed':'NewsArticle.confirm'})},void 0)},void 0);};var Host$g$1=_styled.div.withConfig({displayName:"ConfirmationBox__Host",componentId:"sc-1m5alil-0"})(templateObject_1$C||(templateObject_1$C=__makeTemplateObject(["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"],["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"])));var templateObject_1$C;var ConfirmationSection=function ConfirmationSection(_a){var item=_a.item,showDescription=_a.showDescription,readOnly=_a.readOnly,className=_a.className;var refreshStatistics=useNewsApi().refreshStatistics;var _b=useNotificationContext(),dismissToast=_b.dismissToast,showToast=_b.showToast,showError=_b.showError;var _c=useFeedbackApi(),getFeedback=_c.getFeedback,setFeedback=_c.setFeedback,unsetFeedback=_c.unsetFeedback;var _d=usePromise$2(function(){return getFeedback(ItemResourceTypes.News,item.id);}),summary=_d[0],isLoading=_d[1];var _e=useState$2(null),userChecked=_e[0],setChecked=_e[1];var toastHandle=useRef$1(null);var checked=userChecked!==null?userChecked:summary!=null&&!!summary.records.find(function(r){return r.type==='confirm';});return jsxs(Host$f$1,__assign({isLoading:isLoading,className:className},{children:[showDescription&&jsx$1(FormattedMessage$1,{id:"NewsArticle.confirmationRequiredDescription",tagName:"p"},void 0),jsx$1(StyledGutterMarkerIcon,__assign({iconName:"Completed",isActive:!isLoading&&!checked,color:"green"},{children:readOnly?jsx$1(ConfirmationBox,{checked:checked,disabled:true},void 0):jsx$1(ConfirmationBox,{checked:checked,disabled:checked,onChange:handleClickConfirm},void 0)}),void 0)]}),void 0);function handleClickConfirm(){return __awaiter(this,void 0,void 0,function(){var error_1;return __generator(this,function(_a){switch(_a.label){case 0:setChecked(true);_a.label=1;case 1:_a.trys.push([1,4,,5]);return [4/*yield*/,setFeedback(ItemResourceTypes.News,item.id,'confirm')];case 2:_a.sent();toastHandle.current=showToast('NewsArticle.confirmationSuccessToast',{},jsx$1(DefaultButton,__assign({onClick:handleUndo},{children:jsx$1(FormattedMessage$1,{id:"Generic.undo"},void 0)}),void 0),{autoClose:false});return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:1})];case 3:_a.sent();return [3/*break*/,5];case 4:error_1=_a.sent();logger.error(error_1);showError('Generic.error');setChecked(false);return [3/*break*/,5];case 5:return [2/*return*/];}});});}function handleUndo(){return __awaiter(this,void 0,void 0,function(){var error_2;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,3,,4]);dismissToast(toastHandle.current);toastHandle.current=null;return [4/*yield*/,unsetFeedback(ItemResourceTypes.News,item.id,'confirm')];case 1:_a.sent();return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:-1})];case 2:_a.sent();setChecked(false);return [3/*break*/,4];case 3:error_2=_a.sent();logger.error(error_2);showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var Host$f$1=_styled.div.withConfig({displayName:"ConfirmationSection__Host",componentId:"sc-1g2fxdb-0"})(templateObject_1$B||(templateObject_1$B=__makeTemplateObject(["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),function(_a){var isLoading=_a.isLoading;return isLoading?0.4:1;},spacingM,minScreenSize.small,spacingS,maxScreenSize.medium,fontSizeSmall);var StyledGutterMarkerIcon=_styled(GutterMarkerIcon).withConfig({displayName:"ConfirmationSection__StyledGutterMarkerIcon",componentId:"sc-1g2fxdb-1"})(templateObject_2$s||(templateObject_2$s=__makeTemplateObject(["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"],["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"])),maxScreenSize.small,spacingM);var templateObject_1$B,templateObject_2$s;var DetailViewConfirmations=function DetailViewConfirmations(){var features=useFeatures();var _a=useDetailViewContext(),item=_a.item,isEditorPreview=_a.isEditorPreview;var formatMessage=useIntl().formatMessage;if(!showConfirmationBox()){return null;}return jsx$1(ConfirmationHost,__assign({"aria-label":formatMessage({id:'NewsArticle.confirmation'})},{children:jsx$1(ConfirmationSection,{item:item,showDescription:true,readOnly:isEditorPreview},void 0)}),void 0);function showConfirmationBox(){return features.confirmation&&item.metadata&&item.metadata.feedbackSettings&&item.metadata.feedbackSettings.feedbackOptions.indexOf('confirm')>=0;}};var ConfirmationHost=_styled.section.withConfig({displayName:"DetailViewConfirmations__ConfirmationHost",componentId:"sc-f8jogv-0"})(templateObject_1$A||(templateObject_1$A=__makeTemplateObject(["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"],["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"])),spacingL,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$A;var DetailViewPageViewTracker=function DetailViewPageViewTracker(){var _a=useDetailViewContext(),resourceType=_a.resourceType,itemId=_a.itemId;usePageViewTracker(resourceType,itemId);return null;};var FeedbackButtonBookmark=function FeedbackButtonBookmark(_a){var isReadOnly=_a.isReadOnly;var _b=useContext(FeedbackButtonContext),item=_b.item,bookmarkCount=_b.statistics.bookmarkCount;return jsxs(CountButtonHost,{children:[jsx$1(BookmarkButton,{item:item,isReadOnly:isReadOnly},void 0),jsx$1(CountLabel,__assign({isDisabled:isReadOnly},{children:bookmarkCount}),void 0)]},void 0);};var NewsDetailViewFeedbackSection=function NewsDetailViewFeedbackSection(_a){var _b;var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType,contentLanguage=_c.contentLanguage,isEditorPreview=_c.isEditorPreview;return jsxs(StyledFeedbackSection,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:(_b=item.metadata)===null||_b===void 0?void 0:_b.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser,isReadOnly:isEditorPreview},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{isReadOnly:isEditorPreview},void 0),jsx$1(FeedbackButtonBookmark,{isReadOnly:isEditorPreview},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(FeedbackButtonShare,{isReadOnly:isEditorPreview},void 0),jsx$1(FeedbackButtonConfirmations,{},void 0)]}),void 0);};var StyledFeedbackSection=_styled(FeedbackSection).withConfig({displayName:"NewsDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-pjpy6x-0"})(templateObject_1$z||(templateObject_1$z=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),DetailViewSectionPadding);var templateObject_1$z;var DetailViewBodyExternalContent=function DetailViewBodyExternalContent(_a){var itemType=_a.itemType;var content=useDetailViewContext().content;var externalUrl=content&&content.externalUrl;return jsx$1(DetailBody,__assign({className:"lt-reach-detail-view-body"},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(FormattedMessageWithStyle,{id:"ExternalLink."+itemType+".navigateTo",tagName:"p",values:{url:jsx$1(ExternalLink$2,__assign({href:externalUrl,className:"ms-fontColor-accent",target:"_blank",rel:"noopener noreferrer"},{children:externalUrl}),void 0)}},void 0)},void 0)}),void 0);};var DetailBody=_styled.div.withConfig({displayName:"DetailViewBodyExternalContent__DetailBody",componentId:"sc-1xjgw89-0"})(templateObject_1$y||(templateObject_1$y=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"])));var templateObject_1$y;var DetailViewHeadline=function DetailViewHeadline(){var content=useDetailViewContext().content;var features=useFeatures();if(!features.contentHeadline||!content.headline){return null;}return jsx$1(Headline$1$1,__assign({"data-detail-view-headline":true},{children:content.headline}),void 0);};var Headline$1$1=_styled.p.withConfig({displayName:"DetailViewHeadline__Headline",componentId:"sc-wsid06-0"})(templateObject_1$x||(templateObject_1$x=__makeTemplateObject(["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"],["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,fontSizeMedium,spacingS);var templateObject_1$x;var StateIcon=function StateIcon(_a){var status=_a.status,isActive=_a.isActive,_b=_a.width,width=_b===void 0?16:_b,activeColor=_a.activeColor;var textColors=useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsx$1(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsx$1(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsx$1(Ready,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}return null;};var Draft=function Draft(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?16.25:_b;var ratio=20/16.25;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 16.25 20",enableBackground:"new 0 0 16.25 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25V0h0.89l5.36,5.361V6.25H10z M11.25,5h2.861L11.25,2.139V5z M10,0H9.25v1.25H10V0z M7.675,1.25H6.1\n\tV0h1.575V1.25z M4.525,1.25H2.95V0h1.575V1.25z M1.25,17.057H0v-1.567h1.25V17.057z M1.25,13.921H0v-1.568h1.25V13.921z\n\t M1.25,10.784H0V9.216h1.25V10.784z M1.25,7.647H0V6.08h1.25V7.647z M1.25,4.512H0V2.943h1.25V4.512z M13.375,\n\t 20h-1.5v-1.25h1.5V20z\n\t M10.375,20h-1.5v-1.25h1.5V20z M7.375,20h-1.5v-1.25h1.5V20z M4.375,20h-1.5v-1.25h1.5V20z M16.25,\n\t 16.964H15v-1.661h1.25V16.964z\n\t M16.25,13.643H15v-1.661h1.25V13.643z M16.25,10.321H15V8.66h1.25V10.321z M16.25,6.25H15V7h1.25V6.25z\n\t M1.25,18.75H0V20h1.25\n\tV18.75z M1.25,0H0v1.25h1.25V0z M16.25,18.75H15V20h1.25V18.75z"},void 0)}),void 0);};var Ready=function Ready(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?18.564:_b;var ratio=20/18.564;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 18.564 20",enableBackground:"new 0 0 18.564 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25v-5H1.25v17.5H10V20H0V0h10.889l5.361,5.361V12.5L15,13.75v-7.5H10z M18.564,14.551L13.125,20\n \tl-2.627-2.637l0.879-0.879l1.748,1.738l4.561-4.551L18.564,14.551z M11.25,5h2.861L11.25,2.139V5z"},void 0)}),void 0);};function useCommonEditorApi(){var api=useApi();return useMemo(function(){return {list:list,getTaskViewCounts:getTaskViewCounts};function list(type,filter,token,sortDefinition){var params=Object.assign({},__assign(__assign(__assign({},filter),getCommaSeparatedChannelsString(filter===null||filter===void 0?void 0:filter.channels)),getCommaSeparatedKeywordsString(filter===null||filter===void 0?void 0:filter.keywords)),{token:token},sortDefinition);return api.custom("editor/"+type+"?"+queryString.stringify(params)).get().then(function(res){return res.body().data();});}function getTaskViewCounts(type,groupId){return __awaiter(this,void 0,void 0,function(){var response;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,api.custom("editor/"+type+"/taskcounts?"+queryString.stringify({groupId:groupId})).get(groupId)];case 1:response=_a.sent();return [4/*yield*/,response.body().data()];case 2:return [2/*return*/,_a.sent()];}});});}},[api]);}var SortFieldsDefinitionBuilder=/** @class */function(){function SortFieldsDefinitionBuilder(){this.sort=[];}SortFieldsDefinitionBuilder.prototype.addSortField=function(field,direction){this.sort.push(field+":"+SortFieldsDefinitionBuilder.getSortDirectionAsString(direction));return this;};SortFieldsDefinitionBuilder.getSortDirectionAsString=function(direction){return direction===SortDirection.asc?'asc':'desc';};return SortFieldsDefinitionBuilder;}();var EventSortFieldsDefinitionBuilder=/** @class */function(_super){__extends(EventSortFieldsDefinitionBuilder,_super);function EventSortFieldsDefinitionBuilder(){return _super!==null&&_super.apply(this,arguments)||this;}EventSortFieldsDefinitionBuilder.create=function(){return new EventSortFieldsDefinitionBuilder();};return EventSortFieldsDefinitionBuilder;}(SortFieldsDefinitionBuilder);EventSortFieldsDefinitionBuilder.create().addSortField('startDate',SortDirection.desc);EventSortFieldsDefinitionBuilder.create().addSortField('publishingDate',SortDirection.desc);var ItemType;(function(ItemType){ItemType[ItemType["None"]=0]="None";ItemType[ItemType["News"]=1]="News";ItemType[ItemType["Post"]=2]="Post";ItemType[ItemType["Page"]=4]="Page";ItemType[ItemType["Event"]=8]="Event";})(ItemType||(ItemType={}));var BaseFilterDefinitionImpl=/** @class */function(){function BaseFilterDefinitionImpl(){}return BaseFilterDefinitionImpl;}();__spreadArray(__spreadArray([],Object.keys(new BaseFilterDefinitionImpl())),['hideChrome','teams']);_styled.div.withConfig({displayName:"KeywordPickerGroup__Host",componentId:"sc-pu16jm-0"})(templateObject_1$w||(templateObject_1$w=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);_styled(ActionButton).withConfig({displayName:"KeywordPickerGroup__GroupButton",componentId:"sc-pu16jm-1"})(templateObject_2$r||(templateObject_2$r=__makeTemplateObject(["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"],["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"])),fontSizeNormal,fontSizeSmall);_styled(Icon).withConfig({displayName:"KeywordPickerGroup__CheckMarkIcon",componentId:"sc-pu16jm-2"})(templateObject_3$k||(templateObject_3$k=__makeTemplateObject(["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"],["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"])));_styled.span.withConfig({displayName:"KeywordPickerGroup__ButtonLabel",componentId:"sc-pu16jm-3"})(templateObject_5$a$1||(templateObject_5$a$1=__makeTemplateObject(["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"],["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"])),function(p){return !p.isSelected&&css$2(templateObject_4$c$1||(templateObject_4$c$1=__makeTemplateObject(["\n margin-left: 33px; // checkmark icon space\n "],["\n margin-left: 33px; // checkmark icon space\n "])));});_styled.ul.withConfig({displayName:"KeywordPickerGroup__KeywordsList",componentId:"sc-pu16jm-4"})(templateObject_7$3$1||(templateObject_7$3$1=__makeTemplateObject(["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"],["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"])),function(p){return p.isCollapsed&&css$2(templateObject_6$4$1||(templateObject_6$4$1=__makeTemplateObject(["\n display: none;\n "],["\n display: none;\n "])));},spacingX+10);_styled.li.withConfig({displayName:"KeywordPickerGroup__KeywordItem",componentId:"sc-pu16jm-5"})(templateObject_8$3$1||(templateObject_8$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"],["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"])));var templateObject_1$w,templateObject_2$r,templateObject_3$k,templateObject_4$c$1,templateObject_5$a$1,templateObject_6$4$1,templateObject_7$3$1,templateObject_8$3$1;_styled.div.withConfig({displayName:"KeywordPicker__KeywordPickerTree",componentId:"sc-1ejjfwa-0"})(templateObject_1$v||(templateObject_1$v=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled(ToggleAllButtons).withConfig({displayName:"KeywordPicker__StyledToggleAllButtons",componentId:"sc-1ejjfwa-1"})(templateObject_2$q||(templateObject_2$q=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled.div.withConfig({displayName:"KeywordPicker__Host",componentId:"sc-1ejjfwa-2"})(templateObject_3$j||(templateObject_3$j=__makeTemplateObject(["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"],["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"])));_styled.div.withConfig({displayName:"KeywordPicker__SearchHost",componentId:"sc-1ejjfwa-3"})(templateObject_4$b$1||(templateObject_4$b$1=__makeTemplateObject(["\n position: relative;\n margin-bottom: 8px;\n"],["\n position: relative;\n margin-bottom: 8px;\n"])));_styled(IconButton).withConfig({displayName:"KeywordPicker__SearchCancelButton",componentId:"sc-1ejjfwa-4"})(templateObject_5$9$1||(templateObject_5$9$1=__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"],["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"])));var templateObject_1$v,templateObject_2$q,templateObject_3$j,templateObject_4$b$1,templateObject_5$9$1;var $$2=_export;var requireObjectCoercible$1$1=requireObjectCoercible$c;var isRegExp=isRegexp;var getRegExpFlags=regexpFlags$1$1;var wellKnownSymbol$1=wellKnownSymbol$l;var REPLACE$2=wellKnownSymbol$1('replace');var RegExpPrototype$3=RegExp.prototype;// `String.prototype.replaceAll` method
|
|
131843
|
+
return {id:pageListId,showChildren:showChildren,showPages:true,showDocuments:false,pageId:pageId,keywords:keywords};}var showDocuments=showDocumentsAttribute==='true';var showPages=showPagesAttribute==='true';return {id:pageListId,showChildren:showChildren,showDocuments:showDocuments,showPages:showPages,pageId:pageId,keywords:keywords};}};var PageBreadcrumb=function PageBreadcrumb(_a){var page=_a.page,target=_a.target,languageOverride=_a.language,hideCurrentPageNode=_a.hideCurrentPageNode,className=_a.className;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var history=useHistory();if(!page||!page.navigationContext){return null;}var _b=getBreadcrumbsItems(page,target,handleOnClick,function(page){return getTitle(page,user,formatMessage,languageOverride);},formatMessage,hideCurrentPageNode),parentNode=_b.parentNode,breadcrumbItems=_b.breadcrumbItems;return jsxs("div",__assign({className:className},{children:[jsx$1(LargeScreenBreadcrumb,{items:breadcrumbItems,onRenderItem:renderBreadcrumbItem,overflowIndex:1,"data-breadcrumb":true,overflowAriaLabel:formatMessage({id:'AriaLabel.otherPages'}),focusZoneProps:{handleTabKey:1}},void 0),jsx$1(MobileBreadcrumb,{target:target,parentNode:parentNode},void 0)]}),void 0);function renderBreadcrumbItem(item){if(item.key==='home'){return jsx$1(BreadcrumbHomeItem,__assign({to:item.href,"aria-label":item.text,"data-pages-home-icon":true},{children:jsx$1(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0);}if(item.isCurrentItem){return jsx$1(BreadcrumbCurrentItem,__assign({"aria-current":"page"},{children:item.text}),void 0);}return jsx$1(BreadcrumbItem,__assign({to:item.href,"data-page-breadcrumb-node":item.key},{children:item.text}),void 0);}function handleOnClick(e,item){e.stopPropagation();e.preventDefault();history.push({pathname:item.href});}};var MobileBreadcrumb=function MobileBreadcrumb(_a){var target=_a.target,parentNode=_a.parentNode;var formatMessage=useIntl().formatMessage;return jsxs(MobileBreadcrumbHost,__assign({"data-mobile-breadcrumb":true},{children:[jsx$1("li",{children:jsx$1(BreadcrumbHomeItem,__assign({to:target,"aria-label":formatMessage({id:'Generic.home'}),"data-pages-home-icon":true},{children:jsx$1(HomeIcon,{iconName:"HomeSolid"},void 0)}),void 0)},void 0),parentNode&&jsxs(ParentNode,{children:[jsx$1(LeftChevronIcon,{iconName:"ChevronLeft"},void 0),jsx$1(BreadcrumbItem,__assign({to:NewsService.getNewsRoute(target,parentNode.id,parentNode.title),"data-page-breadcrumb-parent-node":parentNode.id},{children:parentNode.title}),void 0)]},void 0)]}),void 0);};var MobileBreadcrumbHost=_styled.ul.withConfig({displayName:"PageBreadcrumb__MobileBreadcrumbHost",componentId:"sc-1m4qq1d-0"})(templateObject_1$Q||(templateObject_1$Q=__makeTemplateObject(["\n display: none;\n align-items: center;\n padding: 0;\n margin: 0;\n list-style: none;\n font-size: ","px;\n\n @media (max-width: ","px) {\n display: flex;\n }\n"],["\n display: none;\n align-items: center;\n padding: 0;\n margin: 0;\n list-style: none;\n font-size: ","px;\n\n @media (max-width: ","px) {\n display: flex;\n }\n"])),fontSizeSmall,maxScreenSize.medium);var ParentNode=_styled.li.withConfig({displayName:"PageBreadcrumb__ParentNode",componentId:"sc-1m4qq1d-1"})(templateObject_2$w||(templateObject_2$w=__makeTemplateObject(["\n margin: 0 ","px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ",";\n"],["\n margin: 0 ","px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n color: ",";\n"])),spacingM,function(p){return p.theme.palette.accent;});var LeftChevronIcon=_styled(Icon).withConfig({displayName:"PageBreadcrumb__LeftChevronIcon",componentId:"sc-1m4qq1d-2"})(templateObject_3$n||(templateObject_3$n=__makeTemplateObject(["\n font-size: 10px;\n font-weight: bold;\n color: ",";\n"],["\n font-size: 10px;\n font-weight: bold;\n color: ",";\n"])),function(p){return p.theme.palette.accent;});var LargeScreenBreadcrumb=_styled(Breadcrumb).withConfig({displayName:"PageBreadcrumb__LargeScreenBreadcrumb",componentId:"sc-1m4qq1d-3"})(templateObject_4$e||(templateObject_4$e=__makeTemplateObject(["\n && {\n margin: 0;\n }\n\n .ms-Breadcrumb-chevron {\n font-weight: bold;\n }\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n && {\n margin: 0;\n }\n\n .ms-Breadcrumb-chevron {\n font-weight: bold;\n }\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.medium);var HomeIcon=_styled(Icon).withConfig({displayName:"PageBreadcrumb__HomeIcon",componentId:"sc-1m4qq1d-4"})(templateObject_5$c||(templateObject_5$c=__makeTemplateObject(["\n padding-top: 1px;\n"],["\n padding-top: 1px;\n"])));var BreadcrumbItem=_styled(NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbItem",componentId:"sc-1m4qq1d-5"})(templateObject_6$6$1||(templateObject_6$6$1=__makeTemplateObject(["\n padding: 0 ","px;\n color: ",";\n"],["\n padding: 0 ","px;\n color: ",";\n"])),spacingS,function(p){return p.theme.palette.accent;});var BreadcrumbHomeItem=_styled(NavLink).withConfig({displayName:"PageBreadcrumb__BreadcrumbHomeItem",componentId:"sc-1m4qq1d-6"})(templateObject_7$4$1||(templateObject_7$4$1=__makeTemplateObject(["\n color: ",";\n\n + i {\n padding-left: ","px;\n }\n"],["\n color: ",";\n\n + i {\n padding-left: ","px;\n }\n"])),function(p){return p.theme.palette.accent;},spacingS);var BreadcrumbCurrentItem=_styled.div.withConfig({displayName:"PageBreadcrumb__BreadcrumbCurrentItem",componentId:"sc-1m4qq1d-7"})(templateObject_8$4$1||(templateObject_8$4$1=__makeTemplateObject(["\n padding-left: ","px;\n color: ",";\n"],["\n padding-left: ","px;\n color: ",";\n"])),spacingS,function(p){return p.theme.palette.neutralSecondaryAlt;});var templateObject_1$Q,templateObject_2$w,templateObject_3$n,templateObject_4$e,templateObject_5$c,templateObject_6$6$1,templateObject_7$4$1,templateObject_8$4$1;var DetailViewPageDocumentDownload=function DetailViewPageDocumentDownload(){var user=useCurrentUser();var _a=useDetailViewContext(),item=_a.item,preferredContent=_a.content;if(!item){return null;}var content=(preferredContent===null||preferredContent===void 0?void 0:preferredContent.fileInfo)?preferredContent:getContentForPage(item,user).content;if(!(content===null||content===void 0?void 0:content.fileInfo)){return null;}return jsx$1(PageDocumentDownloadButton,{item:item,content:content},void 0);};var PageDocumentDownloadButton=function PageDocumentDownloadButton(_a){var item=_a.item,content=_a.content,basePath=_a.basePath;var _b=useInlinePageDocument({pageId:item.id,fileId:content.fileInfo.fileId,extension:content.fileInfo.extension,title:content.title,fileName:content.fileInfo.fileName},item,basePath),fileUrl=_b.fileUrl,iconName=_b.iconName,title=_b.title,fileName=_b.fileName,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return jsxs(Host$k,{children:[jsx$1(FormattedMessage$1,{id:"Pages.documents.buttonDownloadInfo"},void 0),jsx$1(DownloadButton,{fileUrl:fileUrl,fileName:fileName,title:title,fileIconName:iconName,onClick:onPageDocumentDownloadClick},void 0)]},void 0);};var Host$k=_styled.div.withConfig({displayName:"DetailViewPageDocumentDownload__Host",componentId:"sc-1gtkslm-0"})(templateObject_1$P||(templateObject_1$P=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var DownloadButton=_styled(InlinePageDocumentDownloadButton).withConfig({displayName:"DetailViewPageDocumentDownload__DownloadButton",componentId:"sc-1gtkslm-1"})(templateObject_2$v||(templateObject_2$v=__makeTemplateObject(["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"],["\n margin-top: ","px;\n @media (min-width: ","px) {\n width: 50%;\n }\n"])),spacingS,minScreenSize.medium);var templateObject_1$P,templateObject_2$v;_styled(PublishableItemBanner).withConfig({displayName:"CardBanner__StyledBanner",componentId:"sc-mqzdnh-0"})(templateObject_1$O||(templateObject_1$O=__makeTemplateObject(["\n &.video-view-container {\n height: 100%; /* this is needed for not overlapping the card title */\n }\n"],["\n &.video-view-container {\n height: 100%; /* this is needed for not overlapping the card title */\n }\n"])));var templateObject_1$O;_styled.div.withConfig({displayName:"Card__Host",componentId:"sc-1m8ygh-0"})(templateObject_1$N||(templateObject_1$N=__makeTemplateObject(["\n &.card {\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n\n width: 100%;\n\n margin-bottom: 10px;\n\n &[data-packed] {\n opacity: 1;\n }\n\n &.card-enter,\n &.card-appear {\n opacity: 0.01;\n }\n\n &.card-enter.card-enter-active,\n &.card-appear.card-appear-active {\n opacity: 1;\n transition: opacity 0.75s ease-in;\n }\n\n @media all and (min-width: ","px) {\n transition: opacity 0.75s ease-in;\n opacity: 0;\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n }\n"],["\n &.card {\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n\n width: 100%;\n\n margin-bottom: 10px;\n\n &[data-packed] {\n opacity: 1;\n }\n\n &.card-enter,\n &.card-appear {\n opacity: 0.01;\n }\n\n &.card-enter.card-enter-active,\n &.card-appear.card-appear-active {\n opacity: 1;\n transition: opacity 0.75s ease-in;\n }\n\n @media all and (min-width: ","px) {\n transition: opacity 0.75s ease-in;\n opacity: 0;\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n\n @media all and (min-width: ","px) {\n width: ","px;\n }\n }\n"])),minScreenSize.small,cardWidthS,minScreenSize.medium,cardWidthM,minScreenSize.large,cardWidthL,minScreenSize.xLarge,cardWidthXL);_styled.article.withConfig({displayName:"Card__Article",componentId:"sc-1m8ygh-1"})(templateObject_3$m||(templateObject_3$m=__makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ","\n\n > .card-banner {\n height: calc(((100vw - ","px) * (1 / ",")));\n flex: 0 1 auto;\n }\n\n .card-title {\n margin-top: 7px;\n margin-bottom: 0;\n font-size: 1.1em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n\n .card-metaInfo {\n padding-top: ","px;\n color: #666;\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n .card-title {\n margin-top: 7px;\n font-size: 1.3em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n }\n"],["\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n ","\n\n > .card-banner {\n height: calc(((100vw - ","px) * (1 / ",")));\n flex: 0 1 auto;\n }\n\n .card-title {\n margin-top: 7px;\n margin-bottom: 0;\n font-size: 1.1em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n\n .card-metaInfo {\n padding-top: ","px;\n color: #666;\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n .card-title {\n margin-top: 7px;\n font-size: 1.3em;\n }\n\n .card-metaInfo {\n font-size: 0.9em;\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n\n @media all and (min-width: ","px) {\n > .card-banner {\n height: calc(","px * (1 / ","));\n }\n }\n }\n"])),function(p){return p.highlight&&css$2(templateObject_2$u||(templateObject_2$u=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "])),spacingXs,function(p){return p.theme.palette.accent;});},spacingM,bannerAspectRatio,spacingM,minScreenSize.small,cardWidthS,bannerAspectRatio,minScreenSize.medium,cardWidthM,bannerAspectRatio,minScreenSize.large,cardWidthL,bannerAspectRatio,minScreenSize.xLarge,cardWidthXL,bannerAspectRatio);var templateObject_1$N,templateObject_2$u,templateObject_3$m;var LanguageSelector=function LanguageSelector(props){var history=useHistory();var currentUser=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var getAllLanguagesLocalized=useLanguageApi().getAllLanguagesLocalized;var intl=useIntl();var formatMessage=intl.formatMessage;var languageDefinitions=usePromise$2(function(){return getAllLanguagesLocalized(intl);})[0];var features=useFeatures();if(languageDefinitions==null){return null;}if(props.chromeless)return jsx$1(ActionButton,__assign({iconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout'},className:classNames(props.className,'header-button')},{children:formatMessage({id:"Generic.languages."+props.selectedLanguage})}),void 0);return jsx$1(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsx$1(LanguageSelectorButton,{menuIconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout',isBeakVisible:props.showBeak},className:classNames(props.className,'header-button'),"data-language-selector-button":true,ariaLabel:formatMessage({id:'AriaLabel.autoTranslation'})},void 0)}),void 0);function getContextualMenuItems(){if(props.languages==null){return [];}var menuItems=[];var preferredLanguageItem=getPreferredLanguageItem();if(preferredLanguageItem){menuItems.push(preferredLanguageItem);}var activeLanguagesItems=getActiveLanguagesItems();activeLanguagesItems.sort(function(a,b){return a.text.localeCompare(b.text);});menuItems=menuItems.concat(activeLanguagesItems);if(!props.hideEditLanguagePreferences){var editLanguagePreferencesItem={key:'edit',text:formatMessage({id:'Generic.editLanguagePreferences'}),iconProps:{iconName:'PlayerSettings'},onClick:handleEditLanguagePreferences,className:'lt-reach-languageselector-menu-item'};menuItems.push(editLanguagePreferencesItem);}return menuItems;}function handleEditLanguagePreferences(){if(props.onEditLanguagePreferencesClick){props.onEditLanguagePreferencesClick();}else {history.push(buildPath('/user'));}}function getActiveLanguagesItems(){return props.languages.map(function(l){var fullLanguage=languageDefinitions.find(function(ld){return ld.code===l;});return {key:l,text:fullLanguage.localizedName,iconProps:{iconName:'World'},onClick:function(){return props.onLanguageChange(l.toString());},className:classNames('lt-reach-languageselector-menu-item',l===props.selectedLanguage&&'selected')};});}function getPreferredLanguageItem(){if(!features.automaticTranslation){return null;}if(!props.onTranslateClick){return null;}var preferredContentLanguage=getPreferredContentLanguage(currentUser);var shouldAddPreferredContentLanguage=preferredContentLanguage!=null&&!contentLanguagesWithoutAutomaticTranslation.includes(preferredContentLanguage)&&allAvailableContentLanguages.includes(preferredContentLanguage)&&props.languages.indexOf(preferredContentLanguage)<0;if(!shouldAddPreferredContentLanguage){return null;}return {key:preferredContentLanguage,text:formatMessage({id:'Generic.automaticTranslation'},{language:formatMessage({id:"Generic.languages."+preferredContentLanguage})}),iconProps:{iconName:'Robot'},onClick:function(){return props.onTranslateClick(preferredContentLanguage);},className:classNames('lt-reach-languageselector-menu-item',preferredContentLanguage===props.selectedLanguage&&'selected')};}};var LanguageSelectorButton=_styled(IconButton).withConfig({displayName:"LanguageSelector__LanguageSelectorButton",componentId:"sc-48zwek-0"})(templateObject_1$M||(templateObject_1$M=__makeTemplateObject(["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"],["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"])));var templateObject_1$M;_styled.article.withConfig({displayName:"DetailViewArticle__Host",componentId:"sc-we2q7z-0"})(templateObject_1$L||(templateObject_1$L=__makeTemplateObject(["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"],["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"])),minScreenSize.large+1,maxContentWidth);var templateObject_1$L;var DetailViewBanner=function DetailViewBanner(){var _a=useDetailViewContext(),item=_a.item,resourceType=_a.resourceType,isEditorPreview=_a.isEditorPreview;if(!item.bannerInfo){return null;}return jsx$1(Banner$3,{itemId:item.id,token:item.fileAccessToken,bannerInfo:item.bannerInfo,useEditorRoutes:isEditorPreview,width:getMaxImageWidth(),canOpenImage:true,resourceType:resourceType},void 0);};var Banner$3=_styled(PublishableItemBanner).withConfig({displayName:"DetailViewBanner__Banner",componentId:"sc-1wuqvtw-0"})(templateObject_1$K||(templateObject_1$K=__makeTemplateObject(["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"],["\n && {\n height: calc(100vw * (1 / ","));\n\n @media (min-width: ","px) {\n height: calc(\n (","px - (2 * ","px)) *\n (1 / ",")\n );\n }\n }\n"])),bannerAspectRatio,minScreenSize.large+1,minScreenSize.large,spacingM,bannerAspectRatio);var templateObject_1$K;var DetailViewIntro=function DetailViewIntro(){var content=useDetailViewContext().content;var hasIntro=content.intro&&content.intro.length>0;if(!hasIntro){return null;}return jsx$1(DetailIntro,{children:content.intro},void 0);};var DetailIntro=_styled.p.withConfig({displayName:"DetailViewIntro__DetailIntro",componentId:"sc-1kubhyf-0"})(templateObject_1$J||(templateObject_1$J=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"],["\n margin: 0;\n font-size: ","px;\n line-height: 26px;\n font-weight: normal;\n\n min-width: 100%;\n width: 100px;\n\n @media (min-width: ","px) {\n margin-top: ","px;\n margin-bottom: ","px;\n line-height: 24px;\n font-size: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,spacingS,spacingS+2,fontSizeMedium+2);var templateObject_1$J;var DetailMainSection=function DetailMainSection(_a){var children=_a.children;return jsx$1(DetailMainStyledSection,__assign({className:"detail-view-main"},{children:children}),void 0);};var DetailMainStyledSection=_styled.section.withConfig({displayName:"DetailViewMainSection__DetailMainStyledSection",componentId:"sc-ifywhg-0"})(templateObject_1$I||(templateObject_1$I=__makeTemplateObject(["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"],["\n position: relative;\n flex: 1 0 auto;\n display: flex;\n flex-direction: column;\n padding: ","px ","px\n ","px;\n font-size: 16px;\n\n @media (min-width: ","px) {\n padding: ","px\n ","px ","px;\n }\n"])),detailViewSectionPadding-5,detailViewSectionPadding,detailViewSectionPadding,minScreenSize.small,detailViewSectionPaddingLarge-10,detailViewSectionPaddingLarge,detailViewSectionPaddingLarge);var templateObject_1$I;var GutterMarkerIcon=function GutterMarkerIcon(_a){var iconName=_a.iconName,children=_a.children,isActive=_a.isActive,color=_a.color,tooltipResourceKey=_a.tooltipResourceKey,className=_a.className;return jsxs(Host$h$1,__assign({className:className},{children:[jsx$1(IconContainer$1,__assign({isActive:isActive,className:isActive?"ms-bgColor-"+color:'ms-bgColor-white'},{children:isActive&&jsx$1(StyledTooltip,__assign({resourceKey:tooltipResourceKey},{children:jsx$1(StyledIcon$2$1,{className:"ms-fontColor-white",iconName:iconName},void 0)}),void 0)}),void 0),isActive?jsx$1(ActiveContent,__assign({className:"ms-borderColor-"+color},{children:children}),void 0):jsx$1(Content$3,{children:children},void 0)]}),void 0);};var Host$h$1=_styled.div.withConfig({displayName:"GutterMakerIcon__Host",componentId:"sc-aa2cf4-0"})(templateObject_1$H||(templateObject_1$H=__makeTemplateObject(["\n margin: 0;\n display: flex;\n align-content: center;\n"],["\n margin: 0;\n display: flex;\n align-content: center;\n"])));var StyledIcon$2$1=_styled(Icon).withConfig({displayName:"GutterMakerIcon__StyledIcon",componentId:"sc-aa2cf4-1"})(templateObject_2$t||(templateObject_2$t=__makeTemplateObject(["\n font-size: 25px;\n"],["\n font-size: 25px;\n"])));var Content$3=_styled.div.withConfig({displayName:"GutterMakerIcon__Content",componentId:"sc-aa2cf4-2"})(templateObject_3$l||(templateObject_3$l=__makeTemplateObject(["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"],["\n flex: 1 1 auto;\n flex-basis: 100%; /*IE fix*/\n\n display: flex;\n align-items: center;\n\n box-sizing: border-box;\n"])));var ActiveContent=_styled(Content$3).withConfig({displayName:"GutterMakerIcon__ActiveContent",componentId:"sc-aa2cf4-3"})(templateObject_4$d$1||(templateObject_4$d$1=__makeTemplateObject(["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"],["\n padding-left: 10px;\n min-height: 50px;\n\n border-bottom-style: solid;\n border-bottom-width: 4px;\n"])));var IconContainer$1=_styled.div.withConfig({displayName:"GutterMakerIcon__IconContainer",componentId:"sc-aa2cf4-4"})(templateObject_5$b||(templateObject_5$b=__makeTemplateObject(["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"],["\n flex-grow: 0;\n flex-shrink: 0;\n flex-basis: ",";\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n padding: 10px 0;\n"])),function(_a){var isActive=_a.isActive;return isActive?'50px':'auto';});var StyledTooltip=_styled(Tooltip).withConfig({displayName:"GutterMakerIcon__StyledTooltip",componentId:"sc-aa2cf4-5"})(templateObject_6$5$1||(templateObject_6$5$1=__makeTemplateObject(["\n && {\n display: inherit;\n }\n"],["\n && {\n display: inherit;\n }\n"])));var templateObject_1$H,templateObject_2$t,templateObject_3$l,templateObject_4$d$1,templateObject_5$b,templateObject_6$5$1;var DetailViewTitle=function DetailViewTitle(){var _a=useDetailViewContext(),content=_a.content,item=_a.item;var hasAlert=hasFlag(item.knownState,KnownNewsState.Alert);return jsx$1(GutterMarkerIcon,__assign({iconName:"Warning",isActive:hasAlert,color:"red",tooltipResourceKey:"NewsArticle.alert"},{children:jsx$1(Title$4,__assign({"data-title":true},{children:content.title}),void 0)}),void 0);};var Title$4=_styled.h1.withConfig({displayName:"DetailViewTitle__Title",componentId:"sc-1jbzvna-0"})(templateObject_1$G||(templateObject_1$G=__makeTemplateObject(["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"],["\n color: black;\n width: 100%;\n font-size: ","px;\n line-height: 29px;\n margin: 0;\n\n @media (min-width: ","px) {\n font-size: 2.2em;\n line-height: 42px;\n }\n"])),fontSizeLarge-1,minScreenSize.small);var templateObject_1$G;_styled(ItemMetaInfo).withConfig({displayName:"NewsDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-kib7we-0"})(templateObject_1$F||(templateObject_1$F=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"],["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"])),fontSizeSmall);var templateObject_1$F;var mappers=[InlineImageMapper,InlineFileMapper,InlineQuoteMapper,InlineGalleryMapper,InlineCodeMapper,InlineVideoMapper,InlineTable,InlineContactMapper,InlinePageListMapper,InlineUrlPreviewMapper];var RichTextViewer=function RichTextViewer(_a){var html=_a.html;return jsx$1(TextViewer,{html:html,componentMappers:mappers},void 0);};var DetailViewBody=function DetailViewBody(){var _a=useDetailViewContext(),content=_a.content,resourceType=_a.resourceType;var bodyHtml=content&&content.body;return jsx$1(DetailBody$1,__assign({className:"lt-reach-detail-view-body","data-item-type":resourceType},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(RichTextViewer,{html:bodyHtml},void 0)},void 0)}),void 0);};var DetailBody$1=_styled.div.withConfig({displayName:"DetailViewBody__DetailBody",componentId:"sc-7b4trq-0"})(templateObject_1$E||(templateObject_1$E=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n\n // So that headings have the correct semantics for accessibility (i.e. title is h1, subheadings start at h2),\n // but maintain the same visual design, this styles each heading to look one \"step\" larger\n // e.g. h2 looks like h1, etc.\n && {\n h2 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h4 {\n font-size: ","px;\n }\n\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n }\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n\n // So that headings have the correct semantics for accessibility (i.e. title is h1, subheadings start at h2),\n // but maintain the same visual design, this styles each heading to look one \"step\" larger\n // e.g. h2 looks like h1, etc.\n && {\n h2 {\n font-size: ","px;\n margin: ","px 0;\n }\n\n h3 {\n font-size: ","px;\n }\n\n h4 {\n font-size: ","px;\n }\n\n h3,\n h4,\n h5,\n h6 {\n margin: ","px 0;\n }\n }\n"])),fontSizeLarge-1,spacingS+2,fontSizeLarge-3,fontSizeLarge-5,spacingS);var templateObject_1$E;var DetailViewKeywords=function DetailViewKeywords(_a){var filterBaseUrl=_a.filterBaseUrl;var features=useFeatures();var _b=useDetailViewContext(),item=_b.item,userPreferredLanguage=_b.userPreferredLanguage;var formatMessage=useIntl().formatMessage;if(!features.keywords){return null;}return jsx$1(Fragment,{children:Object.keys(item.keywords).length>0&&jsx$1(KeywordsSection,__assign({"aria-label":formatMessage({id:'AriaLabel.section.keywords'})},{children:jsx$1(KeywordsInfo,{keywords:item.keywords,language:userPreferredLanguage,filterBaseUrl:filterBaseUrl},void 0)}),void 0)},void 0);};var KeywordsSection=_styled.section.withConfig({displayName:"DetailViewKeywords__KeywordsSection",componentId:"sc-ltysu4-0"})(templateObject_1$D||(templateObject_1$D=__makeTemplateObject(["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n margin-top: 2em;\n display: flex;\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),maxScreenSize.medium,fontSizeSmall);var templateObject_1$D;var ConfirmationBox=function ConfirmationBox(_a){var disabled=_a.disabled,checked=_a.checked,onChange=_a.onChange;var formatMessage=useIntl().formatMessage;return jsx$1(Host$g$1,{children:jsx$1(NeutralCheckBox,{disabled:disabled,checked:checked,onChange:function(_,value){return onChange(value);},label:formatMessage({id:checked?'NewsArticle.confirmed':'NewsArticle.confirm'})},void 0)},void 0);};var Host$g$1=_styled.div.withConfig({displayName:"ConfirmationBox__Host",componentId:"sc-1m5alil-0"})(templateObject_1$C||(templateObject_1$C=__makeTemplateObject(["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"],["\n .ms-Checkbox-text {\n font-weight: bold;\n color: black;\n }\n"])));var templateObject_1$C;var ConfirmationSection=function ConfirmationSection(_a){var item=_a.item,showDescription=_a.showDescription,readOnly=_a.readOnly,className=_a.className;var refreshStatistics=useNewsApi().refreshStatistics;var _b=useNotificationContext(),dismissToast=_b.dismissToast,showToast=_b.showToast,showError=_b.showError;var _c=useFeedbackApi(),getFeedback=_c.getFeedback,setFeedback=_c.setFeedback,unsetFeedback=_c.unsetFeedback;var _d=usePromise$2(function(){return getFeedback(ItemResourceTypes.News,item.id);}),summary=_d[0],isLoading=_d[1];var _e=useState$2(null),userChecked=_e[0],setChecked=_e[1];var toastHandle=useRef$1(null);var checked=userChecked!==null?userChecked:summary!=null&&!!summary.records.find(function(r){return r.type==='confirm';});return jsxs(Host$f$1,__assign({isLoading:isLoading,className:className},{children:[showDescription&&jsx$1(FormattedMessage$1,{id:"NewsArticle.confirmationRequiredDescription",tagName:"p"},void 0),jsx$1(StyledGutterMarkerIcon,__assign({iconName:"Completed",isActive:!isLoading&&!checked,color:"green"},{children:readOnly?jsx$1(ConfirmationBox,{checked:checked,disabled:true},void 0):jsx$1(ConfirmationBox,{checked:checked,disabled:checked,onChange:handleClickConfirm},void 0)}),void 0)]}),void 0);function handleClickConfirm(){return __awaiter(this,void 0,void 0,function(){var error_1;return __generator(this,function(_a){switch(_a.label){case 0:setChecked(true);_a.label=1;case 1:_a.trys.push([1,4,,5]);return [4/*yield*/,setFeedback(ItemResourceTypes.News,item.id,'confirm')];case 2:_a.sent();toastHandle.current=showToast('NewsArticle.confirmationSuccessToast',{},jsx$1(DefaultButton,__assign({onClick:handleUndo},{children:jsx$1(FormattedMessage$1,{id:"Generic.undo"},void 0)}),void 0),{autoClose:false});return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:1})];case 3:_a.sent();return [3/*break*/,5];case 4:error_1=_a.sent();logger.error(error_1);showError('Generic.error');setChecked(false);return [3/*break*/,5];case 5:return [2/*return*/];}});});}function handleUndo(){return __awaiter(this,void 0,void 0,function(){var error_2;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,3,,4]);dismissToast(toastHandle.current);toastHandle.current=null;return [4/*yield*/,unsetFeedback(ItemResourceTypes.News,item.id,'confirm')];case 1:_a.sent();return [4/*yield*/,refreshStatistics(item.id,{confirmationCount:-1})];case 2:_a.sent();setChecked(false);return [3/*break*/,4];case 3:error_2=_a.sent();logger.error(error_2);showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var Host$f$1=_styled.div.withConfig({displayName:"ConfirmationSection__Host",componentId:"sc-1g2fxdb-0"})(templateObject_1$B||(templateObject_1$B=__makeTemplateObject(["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"],["\n width: 100%;\n\n opacity: ",";\n\n > p {\n margin: 0 0 5px ","px;\n font-style: italic;\n }\n\n @media (min-width: ","px) {\n > p {\n margin: 0 0 ","px 0;\n }\n }\n\n @media (max-width: ","px) {\n font-size: ","px;\n }\n"])),function(_a){var isLoading=_a.isLoading;return isLoading?0.4:1;},spacingM,minScreenSize.small,spacingS,maxScreenSize.medium,fontSizeSmall);var StyledGutterMarkerIcon=_styled(GutterMarkerIcon).withConfig({displayName:"ConfirmationSection__StyledGutterMarkerIcon",componentId:"sc-1g2fxdb-1"})(templateObject_2$s||(templateObject_2$s=__makeTemplateObject(["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"],["\n @media (max-width: ","px) {\n margin: 0 ","px 0;\n }\n"])),maxScreenSize.small,spacingM);var templateObject_1$B,templateObject_2$s;var DetailViewConfirmations=function DetailViewConfirmations(){var features=useFeatures();var _a=useDetailViewContext(),item=_a.item,isEditorPreview=_a.isEditorPreview;var formatMessage=useIntl().formatMessage;if(!showConfirmationBox()){return null;}return jsx$1(ConfirmationHost,__assign({"aria-label":formatMessage({id:'NewsArticle.confirmation'})},{children:jsx$1(ConfirmationSection,{item:item,showDescription:true,readOnly:isEditorPreview},void 0)}),void 0);function showConfirmationBox(){return features.confirmation&&item.metadata&&item.metadata.feedbackSettings&&item.metadata.feedbackSettings.feedbackOptions.indexOf('confirm')>=0;}};var ConfirmationHost=_styled.section.withConfig({displayName:"DetailViewConfirmations__ConfirmationHost",componentId:"sc-f8jogv-0"})(templateObject_1$A||(templateObject_1$A=__makeTemplateObject(["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"],["\n margin-bottom: ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"])),spacingL,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$A;var DetailViewPageViewTracker=function DetailViewPageViewTracker(){var _a=useDetailViewContext(),resourceType=_a.resourceType,itemId=_a.itemId;usePageViewTracker(resourceType,itemId);return null;};var FeedbackButtonBookmark=function FeedbackButtonBookmark(_a){var isReadOnly=_a.isReadOnly;var _b=useContext(FeedbackButtonContext),item=_b.item,bookmarkCount=_b.statistics.bookmarkCount;return jsxs(CountButtonHost,{children:[jsx$1(BookmarkButton,{item:item,isReadOnly:isReadOnly},void 0),jsx$1(CountLabel,__assign({isDisabled:isReadOnly},{children:bookmarkCount}),void 0)]},void 0);};var NewsDetailViewFeedbackSection=function NewsDetailViewFeedbackSection(_a){var _b;var hideLikes=_a.hideLikes,hideComments=_a.hideComments,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType,contentLanguage=_c.contentLanguage,isEditorPreview=_c.isEditorPreview;return jsxs(StyledFeedbackSection,__assign({item:item,language:contentLanguage,type:resourceType,feedbackSettings:(_b=item.metadata)===null||_b===void 0?void 0:_b.feedbackSettings,hideComments:hideComments,hideProfileUrl:hideProfileUrl,disableLoginForPublicUser:disableLoginForPublicUser,isReadOnly:isEditorPreview},{children:[!hideLikes&&jsx$1(FeedbackButtonLike,{isReadOnly:isEditorPreview},void 0),jsx$1(FeedbackButtonBookmark,{isReadOnly:isEditorPreview},void 0),!hideComments&&jsx$1(FeedbackButtonComments,{},void 0),jsx$1(FeedbackButtonViews,{},void 0),jsx$1(FeedbackButtonShare,{isReadOnly:isEditorPreview},void 0),jsx$1(FeedbackButtonConfirmations,{},void 0)]}),void 0);};var StyledFeedbackSection=_styled(FeedbackSection).withConfig({displayName:"NewsDetailViewFeedbackSection__StyledFeedbackSection",componentId:"sc-pjpy6x-0"})(templateObject_1$z||(templateObject_1$z=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),DetailViewSectionPadding);var templateObject_1$z;var DetailViewBodyExternalContent=function DetailViewBodyExternalContent(_a){var itemType=_a.itemType;var content=useDetailViewContext().content;var externalUrl=content&&content.externalUrl;return jsx$1(DetailBody,__assign({className:"lt-reach-detail-view-body"},{children:jsx$1(ItemBodyWrapper,{children:jsx$1(FormattedMessageWithStyle,{id:"ExternalLink."+itemType+".navigateTo",tagName:"p",values:{url:jsx$1(ExternalLink$2,__assign({href:externalUrl,className:"ms-fontColor-accent",target:"_blank",rel:"noopener noreferrer"},{children:externalUrl}),void 0)}},void 0)},void 0)}),void 0);};var DetailBody=_styled.div.withConfig({displayName:"DetailViewBodyExternalContent__DetailBody",componentId:"sc-1xjgw89-0"})(templateObject_1$y||(templateObject_1$y=__makeTemplateObject(["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"],["\n flex: 1 0 auto;\n box-sizing: border-box;\n min-width: 100%;\n width: 100px;\n margin-top: 35px;\n"])));var templateObject_1$y;var DetailViewHeadline=function DetailViewHeadline(){var content=useDetailViewContext().content;var features=useFeatures();if(!features.contentHeadline||!content.headline){return null;}return jsx$1(Headline$1$1,__assign({"data-detail-view-headline":true},{children:content.headline}),void 0);};var Headline$1$1=_styled.p.withConfig({displayName:"DetailViewHeadline__Headline",componentId:"sc-wsid06-0"})(templateObject_1$x||(templateObject_1$x=__makeTemplateObject(["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"],["\n width: 100%;\n font-weight: bold;\n font-size: ","px;\n line-height: 26px;\n margin: 0;\n\n @media (min-width: ","px) {\n line-height: 22px;\n font-size: ","px;\n margin-bottom: ","px;\n }\n"])),fontSizeNormal,minScreenSize.small,fontSizeMedium,spacingS);var templateObject_1$x;var StateIcon=function StateIcon(_a){var status=_a.status,isActive=_a.isActive,_b=_a.width,width=_b===void 0?16:_b,activeColor=_a.activeColor;var textColors=useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsx$1(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsx$1(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsx$1(Ready,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}return null;};var Draft=function Draft(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?16.25:_b;var ratio=20/16.25;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 16.25 20",enableBackground:"new 0 0 16.25 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25V0h0.89l5.36,5.361V6.25H10z M11.25,5h2.861L11.25,2.139V5z M10,0H9.25v1.25H10V0z M7.675,1.25H6.1\n\tV0h1.575V1.25z M4.525,1.25H2.95V0h1.575V1.25z M1.25,17.057H0v-1.567h1.25V17.057z M1.25,13.921H0v-1.568h1.25V13.921z\n\t M1.25,10.784H0V9.216h1.25V10.784z M1.25,7.647H0V6.08h1.25V7.647z M1.25,4.512H0V2.943h1.25V4.512z M13.375,\n\t 20h-1.5v-1.25h1.5V20z\n\t M10.375,20h-1.5v-1.25h1.5V20z M7.375,20h-1.5v-1.25h1.5V20z M4.375,20h-1.5v-1.25h1.5V20z M16.25,\n\t 16.964H15v-1.661h1.25V16.964z\n\t M16.25,13.643H15v-1.661h1.25V13.643z M16.25,10.321H15V8.66h1.25V10.321z M16.25,6.25H15V7h1.25V6.25z\n\t M1.25,18.75H0V20h1.25\n\tV18.75z M1.25,0H0v1.25h1.25V0z M16.25,18.75H15V20h1.25V18.75z"},void 0)}),void 0);};var Ready=function Ready(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?18.564:_b;var ratio=20/18.564;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 18.564 20",enableBackground:"new 0 0 18.564 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25v-5H1.25v17.5H10V20H0V0h10.889l5.361,5.361V12.5L15,13.75v-7.5H10z M18.564,14.551L13.125,20\n \tl-2.627-2.637l0.879-0.879l1.748,1.738l4.561-4.551L18.564,14.551z M11.25,5h2.861L11.25,2.139V5z"},void 0)}),void 0);};function useCommonEditorApi(){var api=useApi();return useMemo(function(){return {list:list,getTaskViewCounts:getTaskViewCounts};function list(type,filter,token,sortDefinition){var params=Object.assign({},__assign(__assign(__assign({},filter),getCommaSeparatedChannelsString(filter===null||filter===void 0?void 0:filter.channels)),getCommaSeparatedKeywordsString(filter===null||filter===void 0?void 0:filter.keywords)),{token:token},sortDefinition);return api.custom("editor/"+type+"?"+queryString.stringify(params)).get().then(function(res){return res.body().data();});}function getTaskViewCounts(type,groupId){return __awaiter(this,void 0,void 0,function(){var response;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,api.custom("editor/"+type+"/taskcounts?"+queryString.stringify({groupId:groupId})).get(groupId)];case 1:response=_a.sent();return [4/*yield*/,response.body().data()];case 2:return [2/*return*/,_a.sent()];}});});}},[api]);}var SortFieldsDefinitionBuilder=/** @class */function(){function SortFieldsDefinitionBuilder(){this.sort=[];}SortFieldsDefinitionBuilder.prototype.addSortField=function(field,direction){this.sort.push(field+":"+SortFieldsDefinitionBuilder.getSortDirectionAsString(direction));return this;};SortFieldsDefinitionBuilder.getSortDirectionAsString=function(direction){return direction===SortDirection.asc?'asc':'desc';};return SortFieldsDefinitionBuilder;}();var EventSortFieldsDefinitionBuilder=/** @class */function(_super){__extends(EventSortFieldsDefinitionBuilder,_super);function EventSortFieldsDefinitionBuilder(){return _super!==null&&_super.apply(this,arguments)||this;}EventSortFieldsDefinitionBuilder.create=function(){return new EventSortFieldsDefinitionBuilder();};return EventSortFieldsDefinitionBuilder;}(SortFieldsDefinitionBuilder);EventSortFieldsDefinitionBuilder.create().addSortField('startDate',SortDirection.desc);EventSortFieldsDefinitionBuilder.create().addSortField('publishingDate',SortDirection.desc);var ItemType;(function(ItemType){ItemType[ItemType["None"]=0]="None";ItemType[ItemType["News"]=1]="News";ItemType[ItemType["Post"]=2]="Post";ItemType[ItemType["Page"]=4]="Page";ItemType[ItemType["Event"]=8]="Event";})(ItemType||(ItemType={}));var BaseFilterDefinitionImpl=/** @class */function(){function BaseFilterDefinitionImpl(){}return BaseFilterDefinitionImpl;}();__spreadArray(__spreadArray([],Object.keys(new BaseFilterDefinitionImpl())),['hideChrome','teams']);var KeywordPickerGroup=function KeywordPickerGroup(_a){var group=_a.group,keywords=_a.keywords,expanded=_a.expanded,selectedKeywords=_a.selectedKeywords,onChange=_a.onChange,mandatoryKeywordIds=_a.mandatoryKeywordIds;var _b=useState$2(null),isExpanded=_b[0],setIsExpanded=_b[1];var isSelected=!!selectedKeywords.find(function(k){return k.groupId===group.id;});var isCollapsed=!(isExpanded===true||expanded);return jsxs(Host$e$1,{children:[jsxs(GroupButton,__assign({onClick:toggle,iconProps:{iconName:isCollapsed?'CaretRightSolid8':'CaretDownSolid8'},"aria-expanded":!isCollapsed,"aria-controls":group.name+"-list"},{children:[isSelected&&jsx$1(CheckMarkIcon,{iconName:"CheckMark"},void 0),jsx$1(ButtonLabel,__assign({"data-keyword-group":group.name,isSelected:isSelected},{children:jsx$1(KeywordTitle,{groupName:group.name},void 0)}),void 0)]}),void 0),jsx$1(KeywordsList,__assign({id:group.name+"-list","data-keyword-picker-group-list":true,isCollapsed:isCollapsed},{children:keywords.map(function(k){var checked=isKeywordSelected(k);var disabled=isKeywordDisabled(k);return jsx$1(KeywordItem,__assign({"data-keyword":k.name,"data-is-checked":checked,"data-is-disabled":disabled},{children:jsx$1(Checkbox,{label:k.name,onRenderLabel:function(){return jsx$1(KeywordTitle,{groupName:group.name,keywordName:k.name},void 0);},checked:checked,onChange:function(_e,isChecked){return handleChange(isChecked,k);},disabled:disabled},k.id)}),k.name);})}),void 0)]},void 0);function toggle(){setIsExpanded(!isExpanded);}function isKeywordSelected(keyword){return !!selectedKeywords.find(function(k){return k.id===keyword.id;});}function isKeywordDisabled(keyword){return mandatoryKeywordIds===null||mandatoryKeywordIds===void 0?void 0:mandatoryKeywordIds.some(function(id){return id===keyword.id;});}function handleChange(add,keyword){if(onChange){var result=selectedKeywords.filter(function(k){return keyword.id!==k.id;});if(add){result.push(keyword);}onChange(result);}}};var Host$e$1=_styled.div.withConfig({displayName:"KeywordPickerGroup__Host",componentId:"sc-pu16jm-0"})(templateObject_1$w||(templateObject_1$w=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);var GroupButton=_styled(ActionButton).withConfig({displayName:"KeywordPickerGroup__GroupButton",componentId:"sc-pu16jm-1"})(templateObject_2$r||(templateObject_2$r=__makeTemplateObject(["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"],["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"])),fontSizeNormal,fontSizeSmall);var CheckMarkIcon=_styled(Icon).withConfig({displayName:"KeywordPickerGroup__CheckMarkIcon",componentId:"sc-pu16jm-2"})(templateObject_3$k||(templateObject_3$k=__makeTemplateObject(["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"],["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"])));var ButtonLabel=_styled.span.withConfig({displayName:"KeywordPickerGroup__ButtonLabel",componentId:"sc-pu16jm-3"})(templateObject_5$a$1||(templateObject_5$a$1=__makeTemplateObject(["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"],["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"])),function(p){return !p.isSelected&&css$2(templateObject_4$c$1||(templateObject_4$c$1=__makeTemplateObject(["\n margin-left: 33px; // checkmark icon space\n "],["\n margin-left: 33px; // checkmark icon space\n "])));});var KeywordsList=_styled.ul.withConfig({displayName:"KeywordPickerGroup__KeywordsList",componentId:"sc-pu16jm-4"})(templateObject_7$3$1||(templateObject_7$3$1=__makeTemplateObject(["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"],["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"])),function(p){return p.isCollapsed&&css$2(templateObject_6$4$1||(templateObject_6$4$1=__makeTemplateObject(["\n display: none;\n "],["\n display: none;\n "])));},spacingX+10);var KeywordItem=_styled.li.withConfig({displayName:"KeywordPickerGroup__KeywordItem",componentId:"sc-pu16jm-5"})(templateObject_8$3$1||(templateObject_8$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"],["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"])));var templateObject_1$w,templateObject_2$r,templateObject_3$k,templateObject_4$c$1,templateObject_5$a$1,templateObject_6$4$1,templateObject_7$3$1,templateObject_8$3$1;var KeywordPicker=function KeywordPicker(_a){var _b;var value=_a.value,onChange=_a.onChange,showSelectionToggle=_a.showSelectionToggle,incomingAvailableKeywords=_a.availableKeywords,mandatoryKeywordIds=_a.mandatoryKeywordIds,className=_a.className;var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var _c=useContext(LazySubscriptionContext),allKeywords=_c.allKeywords,selectedKeywordGroups=_c.selectedKeywordGroups;var _d=useState$2(null),searchedKeywords=_d[0],setSearchedKeywords=_d[1];var _e=useState$2(null),searchText=_e[0],setSearchText=_e[1];var selectedKeywords=getSelectedKeywords();var availableKeywords=incomingAvailableKeywords!==null&&incomingAvailableKeywords!==void 0?incomingAvailableKeywords:allKeywords;var visibleKeywords=(_b=searchedKeywords!==null&&searchedKeywords!==void 0?searchedKeywords:availableKeywords)!==null&&_b!==void 0?_b:[];var mandatoryKeywords=mandatoryKeywordIds?availableKeywords.filter(function(k){return mandatoryKeywordIds.includes(k.id);}):[];var noKeywordGroups=(selectedKeywordGroups===null||selectedKeywordGroups===void 0?void 0:selectedKeywordGroups.length)===0;var noAvailableKeywords=!noKeywordGroups&&(availableKeywords===null||availableKeywords===void 0?void 0:availableKeywords.length)===0;var isEmpty=visibleKeywords.length===0;return jsxs(Host$d$1,__assign({className:classNames('keyword-picker',className)},{children:[(noKeywordGroups||noAvailableKeywords)&&jsx$1("span",__assign({className:"keyword-picker-empty"},{children:jsx$1(FormattedMessage$1,{id:noKeywordGroups?'KeywordPicker.noGroupsDefined':'KeywordPicker.noAvailableKeywordsForGroup'},void 0)}),void 0),!noKeywordGroups&&!noAvailableKeywords&&jsxs("div",{children:[jsxs(SearchHost,__assign({className:"keyword-picker-search","data-keyword-picker-search":true},{children:[jsx$1(TextField,{onChange:handleSearch,value:searchText||'',placeholder:formatMessage({id:'KeywordPicker.search'})},void 0),searchText&&jsx$1(SearchCancelButton,{iconProps:{iconName:'Cancel'},onClick:function(){return handleSearch(null,null);},"aria-hidden":"true"},void 0)]}),void 0),showSelectionToggle&&jsx$1(StyledToggleAllButtons,{toggleAll:handleToggleAll},void 0),jsxs(KeywordPickerTree,__assign({className:"keyword-picker-tree"},{children:[isEmpty&&jsx$1(FormattedMessage$1,{id:"KeywordPicker.emptySearch"},void 0),!isEmpty&&selectedKeywordGroups&&selectedKeywordGroups.sort(function(a,b){return a.name.localeCompare(b.name);}).map(function(g){var keywords=visibleKeywords.filter(function(k){return k.groupId===g.id;});return keywords.length===0?null:jsx$1(KeywordPickerGroup,{expanded:!!searchText,group:g,keywords:keywords,selectedKeywords:selectedKeywords,onChange:onChange,mandatoryKeywordIds:mandatoryKeywordIds},g.id);})]}),void 0)]},void 0)]}),void 0);function getSelectedKeywords(){if(value==null||allKeywords==null){return [];}return value.map(function(k){return typeof k==='string'?allKeywords.find(function(a){return a.id===k;}):k;}).filter(function(k){return k;});}function handleSearch(_,text){var hasSearch=text&&text.length;var keywords=hasSearch?availableKeywords.filter(function(k){return getKeywordTitle(user,k.translations,k.name).toLocaleLowerCase().indexOf(text.toLocaleLowerCase())>=0;}):availableKeywords;setSearchedKeywords(keywords);setSearchText(hasSearch?text:null);}function handleToggleAll(checkAll){onChange(checkAll?availableKeywords:mandatoryKeywords);}};var KeywordPickerTree=_styled.div.withConfig({displayName:"KeywordPicker__KeywordPickerTree",componentId:"sc-1ejjfwa-0"})(templateObject_1$v||(templateObject_1$v=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));var StyledToggleAllButtons=_styled(ToggleAllButtons).withConfig({displayName:"KeywordPicker__StyledToggleAllButtons",componentId:"sc-1ejjfwa-1"})(templateObject_2$q||(templateObject_2$q=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));var Host$d$1=_styled.div.withConfig({displayName:"KeywordPicker__Host",componentId:"sc-1ejjfwa-2"})(templateObject_3$j||(templateObject_3$j=__makeTemplateObject(["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"],["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"])));var SearchHost=_styled.div.withConfig({displayName:"KeywordPicker__SearchHost",componentId:"sc-1ejjfwa-3"})(templateObject_4$b$1||(templateObject_4$b$1=__makeTemplateObject(["\n position: relative;\n margin-bottom: 8px;\n"],["\n position: relative;\n margin-bottom: 8px;\n"])));var SearchCancelButton=_styled(IconButton).withConfig({displayName:"KeywordPicker__SearchCancelButton",componentId:"sc-1ejjfwa-4"})(templateObject_5$9$1||(templateObject_5$9$1=__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"],["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"])));var templateObject_1$v,templateObject_2$q,templateObject_3$j,templateObject_4$b$1,templateObject_5$9$1;var $$2=_export;var requireObjectCoercible$1$1=requireObjectCoercible$c;var isRegExp=isRegexp;var getRegExpFlags=regexpFlags$1$1;var wellKnownSymbol$1=wellKnownSymbol$l;var REPLACE$2=wellKnownSymbol$1('replace');var RegExpPrototype$3=RegExp.prototype;// `String.prototype.replaceAll` method
|
|
131844
131844
|
// https://github.com/tc39/proposal-string-replace-all
|
|
131845
131845
|
$$2({target:'String',proto:true},{replaceAll:function replaceAll(searchValue,replaceValue){var O=requireObjectCoercible$1$1(this);var IS_REG_EXP,flags,replacer,string,searchString,template,result,position,index;if(searchValue!=null){IS_REG_EXP=isRegExp(searchValue);if(IS_REG_EXP){flags=String(requireObjectCoercible$1$1('flags'in RegExpPrototype$3?searchValue.flags:getRegExpFlags.call(searchValue)));if(!~flags.indexOf('g'))throw TypeError('`.replaceAll` does not allow non-global regexes');}replacer=searchValue[REPLACE$2];if(replacer!==undefined){return replacer.call(searchValue,O,replaceValue);}}string=String(O);searchString=String(searchValue);if(searchString==='')return replaceAll.call(string,/(?:)/g,replaceValue);template=string.split(searchString);if(typeof replaceValue!=='function'){return template.join(String(replaceValue));}result=template[0];position=result.length;for(index=1;index<template.length;index++){result+=String(replaceValue(searchString,position,string));position+=searchString.length+template[index].length;result+=template[index];}return result;}});_styled.div.withConfig({displayName:"Textarea__Host",componentId:"sc-170lrb4-0"})(templateObject_1$u||(templateObject_1$u=__makeTemplateObject(["\n display: flex;\n align-items: flex-end;\n position: relative;\n"],["\n display: flex;\n align-items: flex-end;\n position: relative;\n"])));_styled.textarea.withConfig({displayName:"Textarea__StyledTextarea",componentId:"sc-170lrb4-1"})(templateObject_2$p||(templateObject_2$p=__makeTemplateObject(["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"],["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"])),InputPlaceholder('font-style: italic'));_styled(IconButton$1).withConfig({displayName:"Textarea__StyledIconButton",componentId:"sc-170lrb4-2"})(templateObject_3$i||(templateObject_3$i=__makeTemplateObject(["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"],["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"])));var templateObject_1$u,templateObject_2$p,templateObject_3$i;var InsertFilesDialogHost=_styled.div.withConfig({displayName:"InsertFilesButton__InsertFilesDialogHost",componentId:"sc-1q7gx3n-0"})(templateObject_2$o||(templateObject_2$o=__makeTemplateObject(["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"],["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"])),function(p){return p.isActive&&css$2(templateObject_1$t||(templateObject_1$t=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "])));},spacingM);_styled.p.withConfig({displayName:"InsertFilesButton__DragAndDropText",componentId:"sc-1q7gx3n-1"})(templateObject_3$h||(templateObject_3$h=__makeTemplateObject(["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"],["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"])),fontSizeSmall,spacingS);_styled(DefaultButton).withConfig({displayName:"InsertFilesButton__SelectFileButton",componentId:"sc-1q7gx3n-2"})(templateObject_4$a$1||(templateObject_4$a$1=__makeTemplateObject(["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"],["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"])),spacingM);_styled.div.withConfig({displayName:"InsertFilesButton__ButtonsContainer",componentId:"sc-1q7gx3n-3"})(templateObject_5$8$1||(templateObject_5$8$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"])));var templateObject_1$t,templateObject_2$o,templateObject_3$h,templateObject_4$a$1,templateObject_5$8$1;_styled(InsertFilesDialogHost).withConfig({displayName:"InsertImagesButton__Host",componentId:"sc-63tjy6-0"})(templateObject_1$s||(templateObject_1$s=__makeTemplateObject(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"])));_styled(PrimaryButton).withConfig({displayName:"InsertImagesButton__StyledButton",componentId:"sc-63tjy6-1"})(templateObject_2$n||(templateObject_2$n=__makeTemplateObject(["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"],["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"])));_styled.div.withConfig({displayName:"InsertImagesButton__Text",componentId:"sc-63tjy6-2"})(templateObject_3$g||(templateObject_3$g=__makeTemplateObject(["\n max-width: 100%;\n font-size: large;\n"],["\n max-width: 100%;\n font-size: large;\n"])));var templateObject_1$s,templateObject_2$n,templateObject_3$g;_styled.div.withConfig({displayName:"InsertVideoDialog__VideoHost",componentId:"sc-12gp7sa-0"})(templateObject_1$r||(templateObject_1$r=__makeTemplateObject(["\n width: 100%;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"],["\n width: 100%;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"])),spacingS);_styled(TextField).withConfig({displayName:"InsertVideoDialog__StyledTextField",componentId:"sc-12gp7sa-1"})(templateObject_2$m||(templateObject_2$m=__makeTemplateObject(["\n width: 510px;\n\n label {\n font-weight: normal;\n }\n"],["\n width: 510px;\n\n label {\n font-weight: normal;\n }\n"])));var templateObject_1$r,templateObject_2$m;var DateTimePicker=function DateTimePicker(props){var timeField=useRef$1();var formatMessage=useIntl().formatMessage;var _a=useState$2(getTime(props.date)),time=_a[0],setTime=_a[1];var _b=useState$2(false),timeHasFocus=_b[0],setTimeHasFocus=_b[1];var _c=useState$2(null),timeErrorMessageResourceKey=_c[0],setTimeErrorMessageResourceKey=_c[1];var momentMonths=['January','February','March','April','May','June','July','August','September','October','November','December'];var momentWeekdays=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];useEffect$1(function(){// do not update if the user is typing time
|
|
131846
131846
|
if(!timeHasFocus){// We might not know that the time field has the focus after an onBlur from the date field.
|
|
@@ -131854,10 +131854,10 @@ if(!triggerEvenIfUnchanged&&(!newDate&&!props.date||newDate&&newDate.isSame(prop
|
|
|
131854
131854
|
props.onChanged(newDate.toISOString(),validationResult.isInRange);}function handleDateChange(newDate){if(timeField.current){// note: focus event is ignored/not propagated without setTimeout
|
|
131855
131855
|
setTimeout(function(){return timeField.current.focus();},0);}if(!newDate){handleChange(null);}else {// include the current time component when triggering a change.
|
|
131856
131856
|
// newDate is only a Date without time.
|
|
131857
|
-
var newDateOnly=moment(newDate);var timeInMilliseconds=0;if(props.date){var oldDateWithTime=moment(props.date);timeInMilliseconds=oldDateWithTime.diff(oldDateWithTime.clone().startOf('day'));}handleChange(newDateOnly.startOf('day').add(timeInMilliseconds,'ms'));}}function handleTimeBlur(timeString){var newTime=timeString||'00:00';var initialTime=getTime(props.date);if(newTime===initialTime){return;}setTimeHasFocus(false);var timeToday=moment(newTime,'HH:mm');if(!timeToday.isValid()){setTimeErrorMessageResourceKey('DateTimePicker.invalidTime');return;}setTime(timeToday.format('HH:mm'));if(props.date==null){handleChange(timeToday);}else {var timeInMilliseconds=timeToday.diff(moment().startOf('day'));var newValue=moment(props.date).startOf('day').add(timeInMilliseconds,'ms');handleChange(newValue);}}function setTimeError(result){if(result.isInRange||!result.isSameDay){setTimeErrorMessageResourceKey(null);return;}setTimeErrorMessageResourceKey(props.timeValidationResourceKey||props.dateValidationResourceKey);}function isDateTimeInRange(newValue){if(!newValue||!props.minDate&&!props.maxDate){return {isInRange:true,isSameDay:true};}return {isInRange:(!props.minDate||moment(props.minDate).unix()<newValue.unix())&&(!props.maxDate||newValue.unix()<moment(props.maxDate).unix()),isSameDay:isSameDay(newValue,props.minDate||props.maxDate)};}function isSameDay(momentDateTime,otherTime){return momentDateTime&&otherTime&&momentDateTime.isSame(otherTime,'day');}};var IEButtonFix=createGlobalStyle(templateObject_1$q||(templateObject_1$q=__makeTemplateObject(["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"],["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"])));var GlobalDatePickerStyle=createGlobalStyle(templateObject_2$l||(templateObject_2$l=__makeTemplateObject(["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"],["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"])),function(p){return p.theme.palette.accent;});var Host$a$1=_styled.div.withConfig({displayName:"DateTimePicker__Host",componentId:"sc-zzs3p0-0"})(templateObject_3$f||(templateObject_3$f=__makeTemplateObject(["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"],["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"])),InputPlaceholder("\n color: inherit;\n font-style: italic;\n "));var templateObject_1$q,templateObject_2$l,templateObject_3$f;var DateRange;(function(DateRange){DateRange[DateRange["TwoYears"]=0]="TwoYears";DateRange[DateRange["OneYear"]=1]="OneYear";DateRange[DateRange["SixMonths"]=2]="SixMonths";DateRange[DateRange["TwoMonths"]=3]="TwoMonths";DateRange[DateRange["OneMonth"]=4]="OneMonth";DateRange[DateRange["SevenDays"]=5]="SevenDays";DateRange[DateRange["YesterDay"]=6]="YesterDay";DateRange[DateRange["Today"]=7]="Today";})(DateRange||(DateRange={}));Object.keys(DateRange).length/2-1;_styled.div.withConfig({displayName:"DateRangeSlider__Host",componentId:"sc-1o5vacm-0"})(templateObject_1$p||(templateObject_1$p=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Value",componentId:"sc-1o5vacm-1"})(templateObject_2$k||(templateObject_2$k=__makeTemplateObject(["\n align-self: flex-end;\n margin-right: 10px;\n"],["\n align-self: flex-end;\n margin-right: 10px;\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Labels",componentId:"sc-1o5vacm-2"})(templateObject_3$e||(templateObject_3$e=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"],["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"])));var templateObject_1$p,templateObject_2$k,templateObject_3$e;_styled(IconButton).withConfig({displayName:"ExternalNewsLinkButton__StyledIconButton",componentId:"sc-txzoyq-0"})(templateObject_1$o$1||(templateObject_1$o$1=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$o$1;_styled.div.withConfig({displayName:"CardStyles__Host",componentId:"sc-ovm8js-0"})(templateObject_1$n$1||(templateObject_1$n$1=__makeTemplateObject(["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"],["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"])),spacingM,spacingM,spacingM);var Intro$3=_styled.p.withConfig({displayName:"CardStyles__Intro",componentId:"sc-ovm8js-1"})(templateObject_2$j||(templateObject_2$j=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"])),fontSizeSmall,spacingM-3);var templateObject_1$n$1,templateObject_2$j;_styled.p.withConfig({displayName:"NewsCard__Headline",componentId:"sc-rf9b9y-0"})(templateObject_1$m$1||(templateObject_1$m$1=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n"],["\n font-size: ","px;\n font-weight: bold;\n"])),fontSizeSmall);_styled.h2.withConfig({displayName:"NewsCard__Title",componentId:"sc-rf9b9y-1"})(templateObject_2$i||(templateObject_2$i=__makeTemplateObject(["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"],["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"])),spacingS);_styled(NavLink).withConfig({displayName:"NewsCard__StyledNavLink",componentId:"sc-rf9b9y-2"})(templateObject_3$d$1||(templateObject_3$d$1=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});_styled.div.withConfig({displayName:"NewsCard__MetaInfo",componentId:"sc-rf9b9y-3"})(templateObject_4$9$1||(templateObject_4$9$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"])));_styled(ClickableChannelTitles).withConfig({displayName:"NewsCard__Channels",componentId:"sc-rf9b9y-4"})(templateObject_5$7$1||(templateObject_5$7$1=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$m$1,templateObject_2$i,templateObject_3$d$1,templateObject_4$9$1,templateObject_5$7$1;_styled.div.withConfig({displayName:"EmptyChannelsView__Host",componentId:"sc-b5s0oy-0"})(templateObject_1$l$1||(templateObject_1$l$1=__makeTemplateObject(["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"],["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"])),function(p){return p.theme.palette.neutralTertiary;});_styled(Icon).withConfig({displayName:"EmptyChannelsView__StyledIcon",componentId:"sc-b5s0oy-1"})(templateObject_2$h||(templateObject_2$h=__makeTemplateObject(["\n font-size: 100px;\n padding: 30px 0;\n"],["\n font-size: 100px;\n padding: 30px 0;\n"])));var templateObject_1$l$1,templateObject_2$h;_styled.div.withConfig({displayName:"PromotedNewsItem__Host",componentId:"sc-drndfq-0"})(templateObject_1$k$1||(templateObject_1$k$1=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__Alert",componentId:"sc-drndfq-1"})(templateObject_2$g||(templateObject_2$g=__makeTemplateObject(["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"],["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__AlertIconOuterContainer",componentId:"sc-drndfq-2"})(templateObject_3$c$1||(templateObject_3$c$1=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__IconContainer",componentId:"sc-drndfq-3"})(templateObject_4$8$1||(templateObject_4$8$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"])));_styled(Icon).withConfig({displayName:"PromotedNewsItem__StyledIcon",componentId:"sc-drndfq-4"})(templateObject_5$6$1||(templateObject_5$6$1=__makeTemplateObject(["\n font-size: 25px;\n color: white;\n"],["\n font-size: 25px;\n color: white;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__ContentContainer",componentId:"sc-drndfq-5"})(templateObject_6$3$1||(templateObject_6$3$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n"],["\n display: flex;\n width: 100%;\n"])));_styled(DateTime).withConfig({displayName:"PromotedNewsItem__StyledDate",componentId:"sc-drndfq-6"})(templateObject_7$2$1||(templateObject_7$2$1=__makeTemplateObject(["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.small);_styled.h2.withConfig({displayName:"PromotedNewsItem__Title",componentId:"sc-drndfq-7"})(templateObject_8$2$1||(templateObject_8$2$1=__makeTemplateObject(["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"],["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"])),maxScreenSize.xLarge,maxScreenSize.large,maxScreenSize.medium,maxScreenSize.small);_styled.div.withConfig({displayName:"PromotedNewsItem__BookmarkContainer",componentId:"sc-drndfq-8"})(templateObject_9$2$1||(templateObject_9$2$1=__makeTemplateObject(["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"],["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__TextContainer",componentId:"sc-drndfq-9"})(templateObject_10$1$1||(templateObject_10$1$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"],["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"])));var templateObject_1$k$1,templateObject_2$g,templateObject_3$c$1,templateObject_4$8$1,templateObject_5$6$1,templateObject_6$3$1,templateObject_7$2$1,templateObject_8$2$1,templateObject_9$2$1,templateObject_10$1$1;function useTranslateApi(){var api=useApi();return useMemo(function(){return {translateContents:translateContents};function translateContents(type,itemId,language){return api.custom(type+"/"+itemId+"/contents/"+language).get().then(function(res){return res.body().data();});}},[api]);}var $$1$1=_export;var getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f;var toLength$2=toLength$b;var notARegExp=notARegexp;var requireObjectCoercible$d=requireObjectCoercible$c;var correctIsRegExpLogic=correctIsRegexpLogic;var nativeEndsWith=''.endsWith;var min=Math.min;var CORRECT_IS_REGEXP_LOGIC=correctIsRegExpLogic('endsWith');// https://github.com/zloirock/core-js/pull/702
|
|
131857
|
+
var newDateOnly=moment(newDate);var timeInMilliseconds=0;if(props.date){var oldDateWithTime=moment(props.date);timeInMilliseconds=oldDateWithTime.diff(oldDateWithTime.clone().startOf('day'));}handleChange(newDateOnly.startOf('day').add(timeInMilliseconds,'ms'));}}function handleTimeBlur(timeString){var newTime=timeString||'00:00';var initialTime=getTime(props.date);if(newTime===initialTime){return;}setTimeHasFocus(false);var timeToday=moment(newTime,'HH:mm');if(!timeToday.isValid()){setTimeErrorMessageResourceKey('DateTimePicker.invalidTime');return;}setTime(timeToday.format('HH:mm'));if(props.date==null){handleChange(timeToday);}else {var timeInMilliseconds=timeToday.diff(moment().startOf('day'));var newValue=moment(props.date).startOf('day').add(timeInMilliseconds,'ms');handleChange(newValue);}}function setTimeError(result){if(result.isInRange||!result.isSameDay){setTimeErrorMessageResourceKey(null);return;}setTimeErrorMessageResourceKey(props.timeValidationResourceKey||props.dateValidationResourceKey);}function isDateTimeInRange(newValue){if(!newValue||!props.minDate&&!props.maxDate){return {isInRange:true,isSameDay:true};}return {isInRange:(!props.minDate||moment(props.minDate).unix()<newValue.unix())&&(!props.maxDate||newValue.unix()<moment(props.maxDate).unix()),isSameDay:isSameDay(newValue,props.minDate||props.maxDate)};}function isSameDay(momentDateTime,otherTime){return momentDateTime&&otherTime&&momentDateTime.isSame(otherTime,'day');}};var IEButtonFix=createGlobalStyle(templateObject_1$q$1||(templateObject_1$q$1=__makeTemplateObject(["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"],["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"])));var GlobalDatePickerStyle=createGlobalStyle(templateObject_2$l||(templateObject_2$l=__makeTemplateObject(["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"],["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"])),function(p){return p.theme.palette.accent;});var Host$a$1=_styled.div.withConfig({displayName:"DateTimePicker__Host",componentId:"sc-zzs3p0-0"})(templateObject_3$f||(templateObject_3$f=__makeTemplateObject(["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"],["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"])),InputPlaceholder("\n color: inherit;\n font-style: italic;\n "));var templateObject_1$q$1,templateObject_2$l,templateObject_3$f;var DateRange;(function(DateRange){DateRange[DateRange["TwoYears"]=0]="TwoYears";DateRange[DateRange["OneYear"]=1]="OneYear";DateRange[DateRange["SixMonths"]=2]="SixMonths";DateRange[DateRange["TwoMonths"]=3]="TwoMonths";DateRange[DateRange["OneMonth"]=4]="OneMonth";DateRange[DateRange["SevenDays"]=5]="SevenDays";DateRange[DateRange["YesterDay"]=6]="YesterDay";DateRange[DateRange["Today"]=7]="Today";})(DateRange||(DateRange={}));Object.keys(DateRange).length/2-1;_styled.div.withConfig({displayName:"DateRangeSlider__Host",componentId:"sc-1o5vacm-0"})(templateObject_1$p$1||(templateObject_1$p$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Value",componentId:"sc-1o5vacm-1"})(templateObject_2$k||(templateObject_2$k=__makeTemplateObject(["\n align-self: flex-end;\n margin-right: 10px;\n"],["\n align-self: flex-end;\n margin-right: 10px;\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Labels",componentId:"sc-1o5vacm-2"})(templateObject_3$e$1||(templateObject_3$e$1=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"],["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"])));var templateObject_1$p$1,templateObject_2$k,templateObject_3$e$1;_styled(IconButton).withConfig({displayName:"ExternalNewsLinkButton__StyledIconButton",componentId:"sc-txzoyq-0"})(templateObject_1$o$1||(templateObject_1$o$1=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$o$1;_styled.div.withConfig({displayName:"CardStyles__Host",componentId:"sc-ovm8js-0"})(templateObject_1$n$1||(templateObject_1$n$1=__makeTemplateObject(["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"],["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"])),spacingM,spacingM,spacingM);var Intro$3=_styled.p.withConfig({displayName:"CardStyles__Intro",componentId:"sc-ovm8js-1"})(templateObject_2$j||(templateObject_2$j=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"])),fontSizeSmall,spacingM-3);var templateObject_1$n$1,templateObject_2$j;_styled.p.withConfig({displayName:"NewsCard__Headline",componentId:"sc-rf9b9y-0"})(templateObject_1$m$1||(templateObject_1$m$1=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n"],["\n font-size: ","px;\n font-weight: bold;\n"])),fontSizeSmall);_styled.h2.withConfig({displayName:"NewsCard__Title",componentId:"sc-rf9b9y-1"})(templateObject_2$i||(templateObject_2$i=__makeTemplateObject(["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"],["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"])),spacingS);_styled(NavLink).withConfig({displayName:"NewsCard__StyledNavLink",componentId:"sc-rf9b9y-2"})(templateObject_3$d$1||(templateObject_3$d$1=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});_styled.div.withConfig({displayName:"NewsCard__MetaInfo",componentId:"sc-rf9b9y-3"})(templateObject_4$9$1||(templateObject_4$9$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"])));_styled(ClickableChannelTitles).withConfig({displayName:"NewsCard__Channels",componentId:"sc-rf9b9y-4"})(templateObject_5$7$1||(templateObject_5$7$1=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$m$1,templateObject_2$i,templateObject_3$d$1,templateObject_4$9$1,templateObject_5$7$1;_styled.div.withConfig({displayName:"EmptyChannelsView__Host",componentId:"sc-b5s0oy-0"})(templateObject_1$l$1||(templateObject_1$l$1=__makeTemplateObject(["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"],["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"])),function(p){return p.theme.palette.neutralTertiary;});_styled(Icon).withConfig({displayName:"EmptyChannelsView__StyledIcon",componentId:"sc-b5s0oy-1"})(templateObject_2$h||(templateObject_2$h=__makeTemplateObject(["\n font-size: 100px;\n padding: 30px 0;\n"],["\n font-size: 100px;\n padding: 30px 0;\n"])));var templateObject_1$l$1,templateObject_2$h;_styled.div.withConfig({displayName:"PromotedNewsItem__Host",componentId:"sc-drndfq-0"})(templateObject_1$k$1||(templateObject_1$k$1=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__Alert",componentId:"sc-drndfq-1"})(templateObject_2$g||(templateObject_2$g=__makeTemplateObject(["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"],["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__AlertIconOuterContainer",componentId:"sc-drndfq-2"})(templateObject_3$c$1||(templateObject_3$c$1=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__IconContainer",componentId:"sc-drndfq-3"})(templateObject_4$8$1||(templateObject_4$8$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"])));_styled(Icon).withConfig({displayName:"PromotedNewsItem__StyledIcon",componentId:"sc-drndfq-4"})(templateObject_5$6$1||(templateObject_5$6$1=__makeTemplateObject(["\n font-size: 25px;\n color: white;\n"],["\n font-size: 25px;\n color: white;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__ContentContainer",componentId:"sc-drndfq-5"})(templateObject_6$3$1||(templateObject_6$3$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n"],["\n display: flex;\n width: 100%;\n"])));_styled(DateTime).withConfig({displayName:"PromotedNewsItem__StyledDate",componentId:"sc-drndfq-6"})(templateObject_7$2$1||(templateObject_7$2$1=__makeTemplateObject(["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.small);_styled.h2.withConfig({displayName:"PromotedNewsItem__Title",componentId:"sc-drndfq-7"})(templateObject_8$2$1||(templateObject_8$2$1=__makeTemplateObject(["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"],["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"])),maxScreenSize.xLarge,maxScreenSize.large,maxScreenSize.medium,maxScreenSize.small);_styled.div.withConfig({displayName:"PromotedNewsItem__BookmarkContainer",componentId:"sc-drndfq-8"})(templateObject_9$2$1||(templateObject_9$2$1=__makeTemplateObject(["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"],["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__TextContainer",componentId:"sc-drndfq-9"})(templateObject_10$1$1||(templateObject_10$1$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"],["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"])));var templateObject_1$k$1,templateObject_2$g,templateObject_3$c$1,templateObject_4$8$1,templateObject_5$6$1,templateObject_6$3$1,templateObject_7$2$1,templateObject_8$2$1,templateObject_9$2$1,templateObject_10$1$1;function useTranslateApi(){var api=useApi();return useMemo(function(){return {translateContents:translateContents};function translateContents(type,itemId,language){return api.custom(type+"/"+itemId+"/contents/"+language).get().then(function(res){return res.body().data();});}},[api]);}var $$1$1=_export;var getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f;var toLength$2=toLength$b;var notARegExp=notARegexp;var requireObjectCoercible$d=requireObjectCoercible$c;var correctIsRegExpLogic=correctIsRegexpLogic;var nativeEndsWith=''.endsWith;var min=Math.min;var CORRECT_IS_REGEXP_LOGIC=correctIsRegExpLogic('endsWith');// https://github.com/zloirock/core-js/pull/702
|
|
131858
131858
|
var MDN_POLYFILL_BUG=!CORRECT_IS_REGEXP_LOGIC&&!!function(){var descriptor=getOwnPropertyDescriptor(String.prototype,'endsWith');return descriptor&&!descriptor.writable;}();// `String.prototype.endsWith` method
|
|
131859
131859
|
// https://tc39.github.io/ecma262/#sec-string.prototype.endswith
|
|
131860
|
-
$$1$1({target:'String',proto:true,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{endsWith:function endsWith(searchString/* , endPosition = @length */){var that=String(requireObjectCoercible$d(this));notARegExp(searchString);var endPosition=arguments.length>1?arguments[1]:undefined;var len=toLength$2(that.length);var end=endPosition===undefined?len:min(toLength$2(endPosition),len);var search=String(searchString);return nativeEndsWith?nativeEndsWith.call(that,search,end):that.slice(end-search.length,end)===search;}});var SearchHighlighter=function SearchHighlighter(_a){var highlight=_a.highlight;if(!highlight){return null;}return jsx$1(Fragment,{children:highlight.texts.map(function(t){return jsxs(TextEntry,__assign({highlight:t.type==='hit'},{children:[t.value.startsWith(' ')?jsx$1(Fragment,{children:"\u00A0"},void 0):null,t.value.trim(),t.value.endsWith(' ')?jsx$1(Fragment,{children:"\u00A0"},void 0):null]}),void 0);})},void 0);};var TextEntry=_styled.span.withConfig({displayName:"SearchHighlighter__TextEntry",componentId:"sc-1a25f6p-0"})(templateObject_2$f||(templateObject_2$f=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.highlight&&css$2(templateObject_1$j$1||(templateObject_1$j$1=__makeTemplateObject(["\n background-color: yellow;\n "],["\n background-color: yellow;\n "])));});function tryGetHighlight(highlights,preferredLanguage){var _a;if(!highlights){return null;}return (_a=tryGetAllHighlights(highlights,preferredLanguage))===null||_a===void 0?void 0:_a[0];}function tryGetAllHighlights(highlights,preferredLanguage){if(!highlights){return null;}var preferredHighlights=highlights.filter(function(h){return h.language===preferredLanguage;});if(preferredHighlights.length){return preferredHighlights;}var firstHighlight=highlights[0];return highlights.filter(function(h){return h.language===firstHighlight.language;});}var templateObject_1$j$1,templateObject_2$f;var PageTitle=function PageTitle(_a){var page=_a.page,title=_a.title,search=_a.search,className=_a.className;var user=useCurrentUser();var isDocument=page.pageType===PageType.Document;var language=getLanguageForPage(page,user);var buildPath=useSubscriptionHandlePathBuilder().buildPath;var handleExternalContentClick=useExternalContentClickHandler();var pageTitle=jsx$1(Fragment,{children:search?jsx$1(TitleHighlight,{search:search,title:title,page:page},void 0):title},void 0);if(page.useExternalContent){var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(page,preferredContentLanguage);var targetRoute=NewsService.getNewsRoute(buildPath('/pages'),page.id,title);return jsx$1(Title$1$1,{children:jsxs(StyledNavLink,__assign({to:targetRoute,onClick:function(e){return handleExternalContentClick(e,page,ItemResourceTypes.Pages);}},{children:[pageTitle,jsx$1(ExternalContentIcon,{tooltipResourceKey:'ExternalLinkButton.pages.navigateTo',tooltipResourceValues:url},void 0)]}),void 0)},void 0);}return jsxs(Title$1$1,__assign({className:className},{children:[isDocument&&jsx$1(FileIcon,{iconName:getFileIconByExtension(page.contents[language].fileInfo.extension)},void 0),pageTitle]}),void 0);};var TitleHighlight=function TitleHighlight(_a){var _b;var search=_a.search,title=_a.title,page=_a.page;var user=useCurrentUser();var preferredLanguage=NewsService.getLanguageForContent(page.contents,user);var titleHighlight=tryGetHighlight((_b=page.searchHighlights)===null||_b===void 0?void 0:_b.title,preferredLanguage);if(titleHighlight){return jsx$1(SearchHighlighter,{highlight:titleHighlight},void 0);}return jsx$1(Highlighter,{searchWords:[search],autoEscape:true,textToHighlight:title},void 0);};var Title$1$1=_styled.h2.withConfig({displayName:"PageTitle__Title",componentId:"sc-gsx6ad-0"})(templateObject_1$i$1||(templateObject_1$i$1=__makeTemplateObject(["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"],["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"])),spacingS+5,spacingS,fontSizeMedium);var FileIcon=_styled(Icon).withConfig({displayName:"PageTitle__FileIcon",componentId:"sc-gsx6ad-1"})(templateObject_2$e$1||(templateObject_2$e$1=__makeTemplateObject(["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"],["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"])),fontSizeMedium+4,spacingS);var StyledNavLink=_styled(NavLink).withConfig({displayName:"PageTitle__StyledNavLink",componentId:"sc-gsx6ad-2"})(templateObject_3$b$1||(templateObject_3$b$1=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$i$1,templateObject_2$e$1,templateObject_3$b$1;_styled.div.withConfig({displayName:"PageCard__PageModifiedInfo",componentId:"sc-13xtreq-0"})(templateObject_1$h$1||(templateObject_1$h$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled(PageTitle).withConfig({displayName:"PageCard__StyledPageTitle",componentId:"sc-13xtreq-1"})(templateObject_2$d$1||(templateObject_2$d$1=__makeTemplateObject(["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"],["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"])));_styled(Intro$3).withConfig({displayName:"PageCard__StyledIntro",componentId:"sc-13xtreq-2"})(templateObject_3$a$1||(templateObject_3$a$1=__makeTemplateObject(["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"])),spacingS,spacingS);_styled.div.withConfig({displayName:"PageCard__Keywords",componentId:"sc-13xtreq-3"})(templateObject_4$7$1||(templateObject_4$7$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"],["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled.div.withConfig({displayName:"PageCard__Inner",componentId:"sc-13xtreq-4"})(templateObject_5$5$1||(templateObject_5$5$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"],["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"])),spacingM,spacingS);_styled(DocumentDownloadButton).withConfig({displayName:"PageCard__StyledDocumentDownloadButton",componentId:"sc-13xtreq-5"})(templateObject_6$2$1||(templateObject_6$2$1=__makeTemplateObject(["\n align-self: flex-start;\n z-index: 1;\n"],["\n align-self: flex-start;\n z-index: 1;\n"])));var templateObject_1$h$1,templateObject_2$d$1,templateObject_3$a$1,templateObject_4$7$1,templateObject_5$5$1,templateObject_6$2$1;_styled.p.withConfig({displayName:"PageListItemBody__FullContent",componentId:"sc-7voum-0"})(templateObject_1$g$1||(templateObject_1$g$1=__makeTemplateObject(["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"],["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"])),spacingM-5,fontSizeSmall);_styled.div.withConfig({displayName:"PageListItemBody__CutContentContainer",componentId:"sc-7voum-1"})(templateObject_2$c$1||(templateObject_2$c$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"],["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"])),spacingM-5);_styled.p.withConfig({displayName:"PageListItemBody__CutContent",componentId:"sc-7voum-2"})(templateObject_3$9$1||(templateObject_3$9$1=__makeTemplateObject(["\n padding: 0;\n margin: 0;\n ","\n"],["\n padding: 0;\n margin: 0;\n ","\n"])),LineClamp(5,fontSizeSmall,1.5));_styled(ActionButton).withConfig({displayName:"PageListItemBody__StyledActionButton",componentId:"sc-7voum-3"})(templateObject_4$6$1||(templateObject_4$6$1=__makeTemplateObject(["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"],["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"])),spacingXs,spacingXs,spacingXs,fontSizeSmaller);var templateObject_1$g$1,templateObject_2$c$1,templateObject_3$9$1,templateObject_4$6$1;_styled.div.withConfig({displayName:"PageListItem__Host",componentId:"sc-lz5d51-0"})(templateObject_1$f$1||(templateObject_1$f$1=__makeTemplateObject(["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"],["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"])),CardBorderInline(2,2),spacingM);_styled.div.withConfig({displayName:"PageListItem__Keywords",componentId:"sc-lz5d51-1"})(templateObject_2$b$1||(templateObject_2$b$1=__makeTemplateObject(["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"],["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled.div.withConfig({displayName:"PageListItem__LastUpdated",componentId:"sc-lz5d51-2"})(templateObject_3$8$1||(templateObject_3$8$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled(PageBreadcrumb).withConfig({displayName:"PageListItem__StyledPageBreadcrumb",componentId:"sc-lz5d51-3"})(templateObject_4$5$1||(templateObject_4$5$1=__makeTemplateObject(["\n flex: 1 1 auto;\n width: ","%;\n"],["\n flex: 1 1 auto;\n width: ","%;\n"])),function(p){return p.maxWidth;});_styled.div.withConfig({displayName:"PageListItem__Inner",componentId:"sc-lz5d51-4"})(templateObject_5$4$1||(templateObject_5$4$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var templateObject_1$f$1,templateObject_2$b$1,templateObject_3$8$1,templateObject_4$5$1,templateObject_5$4$1;var PagesDetailViewNavigation=function PagesDetailViewNavigation(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,className=_a.className;var features=useFeatures();var user=useCurrentUser();if(!features.inPageNavigation){return null;}var currentPage=navigationContext.siblings.find(function(s){return s.id===activePageId;});if(currentPage==null){return null;}// sort by group and position only the root pages
|
|
131860
|
+
$$1$1({target:'String',proto:true,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{endsWith:function endsWith(searchString/* , endPosition = @length */){var that=String(requireObjectCoercible$d(this));notARegExp(searchString);var endPosition=arguments.length>1?arguments[1]:undefined;var len=toLength$2(that.length);var end=endPosition===undefined?len:min(toLength$2(endPosition),len);var search=String(searchString);return nativeEndsWith?nativeEndsWith.call(that,search,end):that.slice(end-search.length,end)===search;}});var SearchHighlighter=function SearchHighlighter(_a){var highlight=_a.highlight;if(!highlight){return null;}return jsx$1(Fragment,{children:highlight.texts.map(function(t){return jsxs(TextEntry,__assign({highlight:t.type==='hit'},{children:[t.value.startsWith(' ')?jsx$1(Fragment,{children:"\u00A0"},void 0):null,t.value.trim(),t.value.endsWith(' ')?jsx$1(Fragment,{children:"\u00A0"},void 0):null]}),void 0);})},void 0);};var TextEntry=_styled.span.withConfig({displayName:"SearchHighlighter__TextEntry",componentId:"sc-1a25f6p-0"})(templateObject_2$f$1||(templateObject_2$f$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.highlight&&css$2(templateObject_1$j$1||(templateObject_1$j$1=__makeTemplateObject(["\n background-color: yellow;\n "],["\n background-color: yellow;\n "])));});function tryGetHighlight(highlights,preferredLanguage){var _a;if(!highlights){return null;}return (_a=tryGetAllHighlights(highlights,preferredLanguage))===null||_a===void 0?void 0:_a[0];}function tryGetAllHighlights(highlights,preferredLanguage){if(!highlights){return null;}var preferredHighlights=highlights.filter(function(h){return h.language===preferredLanguage;});if(preferredHighlights.length){return preferredHighlights;}var firstHighlight=highlights[0];return highlights.filter(function(h){return h.language===firstHighlight.language;});}var templateObject_1$j$1,templateObject_2$f$1;var PageTitle=function PageTitle(_a){var page=_a.page,title=_a.title,search=_a.search,className=_a.className;var user=useCurrentUser();var isDocument=page.pageType===PageType.Document;var language=getLanguageForPage(page,user);var buildPath=useSubscriptionHandlePathBuilder().buildPath;var handleExternalContentClick=useExternalContentClickHandler();var pageTitle=jsx$1(Fragment,{children:search?jsx$1(TitleHighlight,{search:search,title:title,page:page},void 0):title},void 0);if(page.useExternalContent){var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(page,preferredContentLanguage);var targetRoute=NewsService.getNewsRoute(buildPath('/pages'),page.id,title);return jsx$1(Title$1$1,{children:jsxs(StyledNavLink,__assign({to:targetRoute,onClick:function(e){return handleExternalContentClick(e,page,ItemResourceTypes.Pages);}},{children:[pageTitle,jsx$1(ExternalContentIcon,{tooltipResourceKey:'ExternalLinkButton.pages.navigateTo',tooltipResourceValues:url},void 0)]}),void 0)},void 0);}return jsxs(Title$1$1,__assign({className:className},{children:[isDocument&&jsx$1(FileIcon,{iconName:getFileIconByExtension(page.contents[language].fileInfo.extension)},void 0),pageTitle]}),void 0);};var TitleHighlight=function TitleHighlight(_a){var _b;var search=_a.search,title=_a.title,page=_a.page;var user=useCurrentUser();var preferredLanguage=NewsService.getLanguageForContent(page.contents,user);var titleHighlight=tryGetHighlight((_b=page.searchHighlights)===null||_b===void 0?void 0:_b.title,preferredLanguage);if(titleHighlight){return jsx$1(SearchHighlighter,{highlight:titleHighlight},void 0);}return jsx$1(Highlighter,{searchWords:[search],autoEscape:true,textToHighlight:title},void 0);};var Title$1$1=_styled.h2.withConfig({displayName:"PageTitle__Title",componentId:"sc-gsx6ad-0"})(templateObject_1$i$1||(templateObject_1$i$1=__makeTemplateObject(["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"],["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"])),spacingS+5,spacingS,fontSizeMedium);var FileIcon=_styled(Icon).withConfig({displayName:"PageTitle__FileIcon",componentId:"sc-gsx6ad-1"})(templateObject_2$e$1||(templateObject_2$e$1=__makeTemplateObject(["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"],["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"])),fontSizeMedium+4,spacingS);var StyledNavLink=_styled(NavLink).withConfig({displayName:"PageTitle__StyledNavLink",componentId:"sc-gsx6ad-2"})(templateObject_3$b$1||(templateObject_3$b$1=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$i$1,templateObject_2$e$1,templateObject_3$b$1;_styled.div.withConfig({displayName:"PageCard__PageModifiedInfo",componentId:"sc-13xtreq-0"})(templateObject_1$h$1||(templateObject_1$h$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled(PageTitle).withConfig({displayName:"PageCard__StyledPageTitle",componentId:"sc-13xtreq-1"})(templateObject_2$d$1||(templateObject_2$d$1=__makeTemplateObject(["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"],["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"])));_styled(Intro$3).withConfig({displayName:"PageCard__StyledIntro",componentId:"sc-13xtreq-2"})(templateObject_3$a$1||(templateObject_3$a$1=__makeTemplateObject(["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"])),spacingS,spacingS);_styled.div.withConfig({displayName:"PageCard__Keywords",componentId:"sc-13xtreq-3"})(templateObject_4$7$1||(templateObject_4$7$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"],["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled.div.withConfig({displayName:"PageCard__Inner",componentId:"sc-13xtreq-4"})(templateObject_5$5$1||(templateObject_5$5$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"],["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"])),spacingM,spacingS);_styled(DocumentDownloadButton).withConfig({displayName:"PageCard__StyledDocumentDownloadButton",componentId:"sc-13xtreq-5"})(templateObject_6$2$1||(templateObject_6$2$1=__makeTemplateObject(["\n align-self: flex-start;\n z-index: 1;\n"],["\n align-self: flex-start;\n z-index: 1;\n"])));var templateObject_1$h$1,templateObject_2$d$1,templateObject_3$a$1,templateObject_4$7$1,templateObject_5$5$1,templateObject_6$2$1;_styled.p.withConfig({displayName:"PageListItemBody__FullContent",componentId:"sc-7voum-0"})(templateObject_1$g$1||(templateObject_1$g$1=__makeTemplateObject(["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"],["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"])),spacingM-5,fontSizeSmall);_styled.div.withConfig({displayName:"PageListItemBody__CutContentContainer",componentId:"sc-7voum-1"})(templateObject_2$c$1||(templateObject_2$c$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"],["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"])),spacingM-5);_styled.p.withConfig({displayName:"PageListItemBody__CutContent",componentId:"sc-7voum-2"})(templateObject_3$9$1||(templateObject_3$9$1=__makeTemplateObject(["\n padding: 0;\n margin: 0;\n ","\n"],["\n padding: 0;\n margin: 0;\n ","\n"])),LineClamp(5,fontSizeSmall,1.5));_styled(ActionButton).withConfig({displayName:"PageListItemBody__StyledActionButton",componentId:"sc-7voum-3"})(templateObject_4$6$1||(templateObject_4$6$1=__makeTemplateObject(["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"],["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"])),spacingXs,spacingXs,spacingXs,fontSizeSmaller);var templateObject_1$g$1,templateObject_2$c$1,templateObject_3$9$1,templateObject_4$6$1;_styled.div.withConfig({displayName:"PageListItem__Host",componentId:"sc-lz5d51-0"})(templateObject_1$f$1||(templateObject_1$f$1=__makeTemplateObject(["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"],["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"])),CardBorderInline(2,2),spacingM);_styled.div.withConfig({displayName:"PageListItem__Keywords",componentId:"sc-lz5d51-1"})(templateObject_2$b$1||(templateObject_2$b$1=__makeTemplateObject(["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"],["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled.div.withConfig({displayName:"PageListItem__LastUpdated",componentId:"sc-lz5d51-2"})(templateObject_3$8$1||(templateObject_3$8$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled(PageBreadcrumb).withConfig({displayName:"PageListItem__StyledPageBreadcrumb",componentId:"sc-lz5d51-3"})(templateObject_4$5$1||(templateObject_4$5$1=__makeTemplateObject(["\n flex: 1 1 auto;\n width: ","%;\n"],["\n flex: 1 1 auto;\n width: ","%;\n"])),function(p){return p.maxWidth;});_styled.div.withConfig({displayName:"PageListItem__Inner",componentId:"sc-lz5d51-4"})(templateObject_5$4$1||(templateObject_5$4$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var templateObject_1$f$1,templateObject_2$b$1,templateObject_3$8$1,templateObject_4$5$1,templateObject_5$4$1;var PagesDetailViewNavigation=function PagesDetailViewNavigation(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,className=_a.className;var features=useFeatures();var user=useCurrentUser();if(!features.inPageNavigation){return null;}var currentPage=navigationContext.siblings.find(function(s){return s.id===activePageId;});if(currentPage==null){return null;}// sort by group and position only the root pages
|
|
131861
131861
|
var pages=!navigationContext.parent||!navigationContext.parent.id?sortPageNodesByGroupAndPosition(user.groups,navigationContext.siblings):navigationContext.siblings;var previousPage=getSibling(-1);var nextPage=getSibling(1);return jsxs(Host$4$1,__assign({className:className,"data-detail-page-navigation":activePageId},{children:[previousPage&&jsx$1(PageLinkButton,{isNextNode:false,basePath:basePath,page:previousPage,icon:"ChevronLeftSmall","data-detail-page-navigation-previous-node":previousPage.id,"data-detail-page-navigation-node":previousPage.id},void 0),nextPage&&jsx$1(PageLinkButton,{isNextNode:true,className:"next-page-link-button",basePath:basePath,page:nextPage,icon:"ChevronRightSmall","data-detail-page-navigation-next-node":nextPage.id,"data-detail-page-navigation-node":nextPage.id},void 0)]}),void 0);function getSibling(offset){var index=pages.findIndex(function(s){return s.id===activePageId;});return pages[index+offset];}};var Host$4$1=_styled.div.withConfig({displayName:"PagesDetailViewNavigation__Host",componentId:"sc-19ae9g3-0"})(templateObject_1$e$1||(templateObject_1$e$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n"],["\n display: flex;\n flex-wrap: wrap;\n"])));var PageLinkButton=function PageLinkButton(_a){var basePath=_a.basePath,page=_a.page,icon=_a.icon,isNextNode=_a.isNextNode,className=_a.className,props=__rest(_a,["basePath","page","icon","isNextNode","className"]);var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var title=getTitle(page,user,formatMessage);return jsxs(Link,__assign({to:getUrl(),className:className},{children:[!isNextNode&&jsx$1(LinkIcon,{iconName:icon},void 0),jsx$1(Content$2$1,__assign({},props,{isNextNode:isNextNode},{children:jsx$1("div",__assign({title:title},{children:title}),void 0)}),void 0),isNextNode&&jsx$1(LinkIcon,{iconName:icon},void 0)]}),void 0);function getUrl(){var baseUrl=NewsService.getNewsRoute(basePath,page.id,title);return page.useExternalContent?baseUrl+"?"+queryString.stringify({noRedirect:true}):baseUrl;}};var Link=_styled(NavLink).withConfig({displayName:"PagesDetailViewNavigation__Link",componentId:"sc-19ae9g3-1"})(templateObject_2$a$1||(templateObject_2$a$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"],["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"])),spacingS,spacingS,maxScreenSize.small,spacingS,function(p){return p.theme.palette.neutralLight;},function(p){return p.theme.textColors.default;});var LinkIcon=_styled(Icon).withConfig({displayName:"PagesDetailViewNavigation__LinkIcon",componentId:"sc-19ae9g3-2"})(templateObject_3$7$1||(templateObject_3$7$1=__makeTemplateObject(["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"],["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"])),fontSizeNormal,spacingM);var Content$2$1=_styled.div.withConfig({displayName:"PagesDetailViewNavigation__Content",componentId:"sc-19ae9g3-3"})(templateObject_5$3$1||(templateObject_5$3$1=__makeTemplateObject(["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"],["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"])),function(p){return p.isNextNode&&css$2(templateObject_4$4$1||(templateObject_4$4$1=__makeTemplateObject(["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "],["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "])));});var templateObject_1$e$1,templateObject_2$a$1,templateObject_3$7$1,templateObject_4$4$1,templateObject_5$3$1;_styled(Dropdown).withConfig({displayName:"PagesGroupsSelector__StyledDropdown",componentId:"sc-13yd888-0"})(templateObject_1$d$1||(templateObject_1$d$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled(NavLink).withConfig({displayName:"PagesGroupsSelector__DropdownOption",componentId:"sc-13yd888-1"})(templateObject_2$9$1||(templateObject_2$9$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);createGlobalStyle(templateObject_3$6$1||(templateObject_3$6$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$d$1,templateObject_2$9$1,templateObject_3$6$1;_styled.div.withConfig({displayName:"GroupNotificationsSettings__Host",componentId:"sc-1z0rxrb-0"})(templateObject_1$c$1||(templateObject_1$c$1=__makeTemplateObject(["\n width: 400px;\n\n @media (max-width: ","px) {\n width: 100%;\n }\n"],["\n width: 400px;\n\n @media (max-width: ","px) {\n width: 100%;\n }\n"])),maxScreenSize.small);_styled.h2.withConfig({displayName:"GroupNotificationsSettings__Title",componentId:"sc-1z0rxrb-1"})(templateObject_2$8$1||(templateObject_2$8$1=__makeTemplateObject(["\n margin-top: 0;\n"],["\n margin-top: 0;\n"])));_styled.div.withConfig({displayName:"GroupNotificationsSettings__Infos",componentId:"sc-1z0rxrb-2"})(templateObject_3$5$1||(templateObject_3$5$1=__makeTemplateObject(["\n color: ",";\n padding-left: 55px;\n"],["\n color: ",";\n padding-left: 55px;\n"])),function(p){return p.theme.palette.neutralTertiaryAlt;});var templateObject_1$c$1,templateObject_2$8$1,templateObject_3$5$1;function getPostGroups(user){return getGroupsWithExplicitMinRole(GroupRoles.LimitedReader,user,function(g){return g.allowPosts;});}function getPostsBaseRoute(post,user){var _a;var postGroups=getPostGroups(user);var subscriptionHandle=(_a=user.subscription.subscriptionHandle)!==null&&_a!==void 0?_a:user.subscription.id;return postGroups.length>1?"/"+subscriptionHandle+"/posts/groups/"+((post===null||post===void 0?void 0:post.groupId)||''):"/"+subscriptionHandle+"/posts";}function getPostsHashtagFilterRoute(post,user,hashtag){return getPostsBaseRoute(post,user)+"?"+queryString.stringify({search:""+hashtag});}var PostReplies=function PostReplies(_a){var className=_a.className,post=_a.post,comments=_a.comments,initialPageSize=_a.initialPageSize,autoFocusReplyField=_a.autoFocusReplyField,onReplyAdded=_a.onReplyAdded,onReplyDeleted=_a.onReplyDeleted,onThreadReply=_a.onThreadReply;var user=useCurrentUser();var searchPostMentionUsers=usePostsApi().searchPostMentionUsers;if(!post||!post.id){return null;}return jsx$1(StyledPagedCommentsSection,{className:className,mentionSearchHandler:function(text){return searchPostMentionUsers(text,post.groupId);},type:ItemResourceTypes.Posts,scope:ConversationScope.Posts,itemId:post.id,groupIds:[post.groupId],readOnly:false,pageSize:5,initialPageSize:initialPageSize,initialComments:comments,onCommentAdded:onReplyAdded,onCommentDeleted:onReplyDeleted,noItemsYetStringResourceKey:"Posts.replies.empty",autoFocusReplyField:autoFocusReplyField,baseAttachmentPath:"/posts/"+post.id+"/comments",getHashtagFilterRoute:function(hashtag){return getPostsHashtagFilterRoute(post,user,hashtag);},onThreadReply:onThreadReply},post.id);};var StyledPagedCommentsSection=_styled(PagedCommentsSection).withConfig({displayName:"PostReplies__StyledPagedCommentsSection",componentId:"sc-8mrgcg-0"})(templateObject_1$b$1||(templateObject_1$b$1=__makeTemplateObject(["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n > div {\n width: 100%;\n }\n"],["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n > div {\n width: 100%;\n }\n"])));var templateObject_1$b$1;var PostEditor=function PostEditor(_a){var className=_a.className,post=_a.post,onBeforeSave=_a.onBeforeSave,onSaved=_a.onSaved,onCancel=_a.onCancel,keywordSettings=_a.keywordSettings;var features=useFeatures();var _b=usePostsApi(),searchPostMentionUsers=_b.searchPostMentionUsers,updatePost=_b.updatePost;var _c=useContext(LazySubscriptionContext),allKeywords=_c.allKeywords,keywordsByGroupId=_c.keywordsByGroupId;var _d=useNotificationContext(),showToast=_d.showToast,showError=_d.showError;if(allKeywords==null||keywordsByGroupId==null){return null;}return jsx$1(EditCommentWithAttachments,{className:className,onCancel:onCancel,content:post.content,onSave:handleSavePost,mentionSearchHandler:function(text){return searchPostMentionUsers(text,post.groupId);},inputTheme:"dark",item:post,basePath:'/posts',allowKeywords:features.keywords&&features.postKeywords,availableKeywords:keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.availableKeywords,mandatoryKeywords:keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.mandatoryKeywords,keywords:post.keywords,saveOnCtrlEnter:true},void 0);function handleSavePost(newContent,attachments,keywords){return __awaiter(this,void 0,void 0,function(){var updatedPost,error_1;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);onBeforeSave(__assign(__assign({},post),{content:newContent,attachments:attachments,keywords:keywords}));return [4/*yield*/,updatePost(post.id,newContent,attachments,keywords)];case 1:updatedPost=_a.sent();onSaved(updatedPost);showToast('Posts.successfullyUpdated');return [3/*break*/,3];case 2:error_1=_a.sent();logger.error(error_1);showError('Generic.error');return [3/*break*/,3];case 3:return [2/*return*/];}});});}};_styled(IconButton).withConfig({displayName:"PostFollowButton__StyledIconButton",componentId:"sc-1i97syp-0"})(templateObject_1$a$1||(templateObject_1$a$1=__makeTemplateObject(["\n && {\n margin: 0;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 20px;\n }\n user-select: none;\n"],["\n && {\n margin: 0;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 20px;\n }\n user-select: none;\n"])));var templateObject_1$a$1;var PostGroup=function PostGroup(_a){var groupId=_a.groupId,to=_a.to,className=_a.className;var intl=useIntl();var user=useCurrentUser();var group=user.groups.find(function(g){return g.id===groupId;});var groupName=getGroupName(group,user,intl);return jsx$1(Group,__assign({"data-post-group":groupId,title:groupName,to:to,className:className},{children:jsx$1("span",{children:groupName},void 0)}),void 0);};var Group=_styled(NavLink).withConfig({displayName:"PostGroup__Group",componentId:"sc-182l34m-0"})(templateObject_1$9$1||(templateObject_1$9$1=__makeTemplateObject(["\n font-size: ","px;\n height: 100%;\n\n span {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ","\n"],["\n font-size: ","px;\n height: 100%;\n\n span {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ","\n"])),fontSizeSmall,function(){return HighlightBubble();});var templateObject_1$9$1;_styled.div.withConfig({displayName:"PostDisplay__Host",componentId:"sc-1tope3b-0"})(templateObject_1$8$1||(templateObject_1$8$1=__makeTemplateObject(["\n ",";\n\n position: relative;\n\n // TODO: The font-sizes should be cleaned up as well,\n // there are too many different places where these are set\n // We set it here to 14px in order to have the same font-size as in the comment editor / comment input\n font-size: ","px;\n line-height: ","px;\n\n display: flex;\n flex-direction: column;\n .ms-layer {\n display: none;\n }\n"],["\n ",";\n\n position: relative;\n\n // TODO: The font-sizes should be cleaned up as well,\n // there are too many different places where these are set\n // We set it here to 14px in order to have the same font-size as in the comment editor / comment input\n font-size: ","px;\n line-height: ","px;\n\n display: flex;\n flex-direction: column;\n .ms-layer {\n display: none;\n }\n"])),CardBorderInline(2,2),fontSizeSmall,spacingM);_styled.div.withConfig({displayName:"PostDisplay__Header",componentId:"sc-1tope3b-1"})(templateObject_2$7$1||(templateObject_2$7$1=__makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n"],["\n display: flex;\n align-items: flex-start;\n"])));var avatarWidth=40;var maxButtonsWidth=120;// max 4 buttons at 30 px each (translate, notifications, like and context menu)
|
|
131862
131862
|
var paddingLeft=spacingS;var postGroupWidth=250;var postGroupWidthSmall=215;_styled.div.withConfig({displayName:"PostDisplay__HeaderMetadata",componentId:"sc-1tope3b-2"})(templateObject_3$4$1||(templateObject_3$4$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(\n 100% - ","px - ","px - ","px -\n ","px\n );\n\n @media (max-width: ","px) {\n flex-direction: column;\n max-width: calc(\n 100% - ","px - ","px - ","px\n );\n }\n"],["\n display: flex;\n align-items: center;\n\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(\n 100% - ","px - ","px - ","px -\n ","px\n );\n\n @media (max-width: ","px) {\n flex-direction: column;\n max-width: calc(\n 100% - ","px - ","px - ","px\n );\n }\n"])),fontSizeSmall,paddingLeft,avatarWidth,maxButtonsWidth,paddingLeft,function(p){return p.addSafetySpace?postGroupWidth:0;},maxScreenSize.medium,avatarWidth,maxButtonsWidth,paddingLeft);_styled.div.withConfig({displayName:"PostDisplay__Content",componentId:"sc-1tope3b-3"})(templateObject_4$3$1||(templateObject_4$3$1=__makeTemplateObject(["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n"],["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n"])));_styled.div.withConfig({displayName:"PostDisplay__ActionButtons",componentId:"sc-1tope3b-4"})(templateObject_5$2$1||(templateObject_5$2$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: auto;\n"],["\n display: flex;\n align-items: center;\n margin-left: auto;\n"])));_styled.div.withConfig({displayName:"PostDisplay__PostDisplayName",componentId:"sc-1tope3b-5"})(templateObject_6$1$1||(templateObject_6$1$1=__makeTemplateObject(["\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"],["\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));_styled(DateTime).withConfig({displayName:"PostDisplay__PostDateTime",componentId:"sc-1tope3b-6"})(templateObject_7$1$1||(templateObject_7$1$1=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeSmaller);_styled(ActionButton).withConfig({displayName:"PostDisplay__AddReplyButton",componentId:"sc-1tope3b-7"})(templateObject_8$1$1||(templateObject_8$1$1=__makeTemplateObject(["\n margin-top: ","px;\n\n && {\n height: auto;\n min-height: 20px;\n border: none;\n padding: 0;\n color: ",";\n align-self: flex-start;\n }\n"],["\n margin-top: ","px;\n\n && {\n height: auto;\n min-height: 20px;\n border: none;\n padding: 0;\n color: ",";\n align-self: flex-start;\n }\n"])),spacingM,function(p){return p.theme.palette.accent;});_styled.div.withConfig({displayName:"PostDisplay__InnerHost",componentId:"sc-1tope3b-8"})(templateObject_10$d||(templateObject_10$d=__makeTemplateObject(["\n position: relative;\n padding: ","px;\n display: flex;\n flex-direction: column;\n\n ","\n"],["\n position: relative;\n padding: ","px;\n display: flex;\n flex-direction: column;\n\n ","\n"])),postsSectionPadding,function(p){return p.highlight&&css$2(templateObject_9$1$1||(templateObject_9$1$1=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 6px;\n display: block;\n background-color: ",";\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 6px;\n display: block;\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.accent;});});_styled(PostReplies).withConfig({displayName:"PostDisplay__StyledPostComments",componentId:"sc-1tope3b-9"})(templateObject_11$8||(templateObject_11$8=__makeTemplateObject(["\n padding: ","px;\n background-color: ",";\n"],["\n padding: ","px;\n background-color: ",";\n"])),postsSectionPadding,function(p){return p.theme.palette.neutralLight;});_styled(PostEditor).withConfig({displayName:"PostDisplay__StyledPostEditor",componentId:"sc-1tope3b-10"})(templateObject_12$7||(templateObject_12$7=__makeTemplateObject(["\n margin-top: 7px;\n position: relative;\n"],["\n margin-top: 7px;\n position: relative;\n"])));_styled(NavLink).withConfig({displayName:"PostDisplay__PostLink",componentId:"sc-1tope3b-11"})(templateObject_13$6||(templateObject_13$6=__makeTemplateObject(["\n display: block;\n width: 100%;\n"],["\n display: block;\n width: 100%;\n"])));_styled(PostGroup).withConfig({displayName:"PostDisplay__StyledPostGroup",componentId:"sc-1tope3b-12"})(templateObject_14$6||(templateObject_14$6=__makeTemplateObject(["\n margin-left: ","px;\n max-width: ","px;\n\n @media (max-width: ","px) {\n margin-left: 0;\n margin-top: ","px;\n max-width: ","px;\n align-self: flex-start;\n }\n"],["\n margin-left: ","px;\n max-width: ","px;\n\n @media (max-width: ","px) {\n margin-left: 0;\n margin-top: ","px;\n max-width: ","px;\n align-self: flex-start;\n }\n"])),spacingM,postGroupWidth,maxScreenSize.medium,spacingS,postGroupWidthSmall);_styled(LikeButton).withConfig({displayName:"PostDisplay__StyledLikeButton",componentId:"sc-1tope3b-13"})(templateObject_15$6||(templateObject_15$6=__makeTemplateObject(["\n min-width: 1px;\n margin: 0;\n margin-right: 0 !important; /* IE fix */\n padding: 0 4px;\n i {\n font-size: 20px;\n }\n"],["\n min-width: 1px;\n margin: 0;\n margin-right: 0 !important; /* IE fix */\n padding: 0 4px;\n i {\n font-size: 20px;\n }\n"])));_styled(ImagesAndFilesList).withConfig({displayName:"PostDisplay__StyledImagesAndFilesList",componentId:"sc-1tope3b-14"})(templateObject_16$6||(templateObject_16$6=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);_styled(IconButton).withConfig({displayName:"PostDisplay__MenuButton",componentId:"sc-1tope3b-15"})(templateObject_17$5||(templateObject_17$5=__makeTemplateObject(["\n && {\n padding: 0;\n i {\n margin: 0;\n font-size: 20px;\n }\n }\n"],["\n && {\n padding: 0;\n i {\n margin: 0;\n font-size: 20px;\n }\n }\n"])));_styled(KeywordsInfo).withConfig({displayName:"PostDisplay__StyledKeywordsInfo",componentId:"sc-1tope3b-16"})(templateObject_18$4||(templateObject_18$4=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);_styled(ThreadView).withConfig({displayName:"PostDisplay__StyledThreadView",componentId:"sc-1tope3b-17"})(templateObject_19$4||(templateObject_19$4=__makeTemplateObject(["\n padding: ","px;\n background-color: ",";\n"],["\n padding: ","px;\n background-color: ",";\n"])),postsSectionPadding,function(p){return p.theme.palette.neutralLight;});var templateObject_1$8$1,templateObject_2$7$1,templateObject_3$4$1,templateObject_4$3$1,templateObject_5$2$1,templateObject_6$1$1,templateObject_7$1$1,templateObject_8$1$1,templateObject_9$1$1,templateObject_10$d,templateObject_11$8,templateObject_12$7,templateObject_13$6,templateObject_14$6,templateObject_15$6,templateObject_16$6,templateObject_17$5,templateObject_18$4,templateObject_19$4;_styled(Dropdown).withConfig({displayName:"PostGroupsSelector__StyledDropdown",componentId:"sc-g6rhck-0"})(templateObject_1$7$1||(templateObject_1$7$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled(NavLink).withConfig({displayName:"PostGroupsSelector__DropdownOption",componentId:"sc-g6rhck-1"})(templateObject_2$6$1||(templateObject_2$6$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);createGlobalStyle(templateObject_3$3$1||(templateObject_3$3$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$7$1,templateObject_2$6$1,templateObject_3$3$1;var isArray$1=isArray$3;var toLength$1=toLength$b;var bind=functionBindContext;// `FlattenIntoArray` abstract operation
|
|
131863
131863
|
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
@@ -131927,9 +131927,9 @@ var NewsDetailViewMetaInfo = function NewsDetailViewMetaInfo() {
|
|
|
131927
131927
|
var DetailMetaInfo = _styled(ItemMetaInfo).withConfig({
|
|
131928
131928
|
displayName: "NewsDetailViewMetaInfo__DetailMetaInfo",
|
|
131929
131929
|
componentId: "sc-1v9a7tf-0"
|
|
131930
|
-
})(templateObject_1$
|
|
131930
|
+
})(templateObject_1$q || (templateObject_1$q = __makeTemplateObject$l(["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ", "px) {\n font-size: 14px;\n }\n"], ["\n display: flex;\n font-size: 12px;\n margin-top: 12px;\n\n @media (min-width: ", "px) {\n font-size: 14px;\n }\n"])), minScreenSize.small);
|
|
131931
131931
|
|
|
131932
|
-
var templateObject_1$
|
|
131932
|
+
var templateObject_1$q;
|
|
131933
131933
|
|
|
131934
131934
|
var NewsItemContextProvider = function NewsItemContextProvider(_a) {
|
|
131935
131935
|
var itemId = _a.itemId,
|
|
@@ -131965,7 +131965,7 @@ var NewsDetail = function NewsDetail(_a) {
|
|
|
131965
131965
|
}
|
|
131966
131966
|
|
|
131967
131967
|
if (!itemContext) {
|
|
131968
|
-
return jsx$1(Host$
|
|
131968
|
+
return jsx$1(Host$h, __assign$g({
|
|
131969
131969
|
className: className
|
|
131970
131970
|
}, {
|
|
131971
131971
|
children: jsx$1(NewsItemContextProvider, __assign$g({
|
|
@@ -131980,7 +131980,7 @@ var NewsDetail = function NewsDetail(_a) {
|
|
|
131980
131980
|
}), void 0);
|
|
131981
131981
|
}
|
|
131982
131982
|
|
|
131983
|
-
return jsx$1(Host$
|
|
131983
|
+
return jsx$1(Host$h, __assign$g({
|
|
131984
131984
|
className: className
|
|
131985
131985
|
}, {
|
|
131986
131986
|
children: jsx$1(NewsDetailInternal, {
|
|
@@ -132032,12 +132032,12 @@ var NewsDetailMainContent = function NewsDetailMainContent(_a) {
|
|
|
132032
132032
|
}, void 0);
|
|
132033
132033
|
};
|
|
132034
132034
|
|
|
132035
|
-
var Host$
|
|
132035
|
+
var Host$h = _styled.div.withConfig({
|
|
132036
132036
|
displayName: "NewsDetail__Host",
|
|
132037
132037
|
componentId: "sc-6rz5th-0"
|
|
132038
|
-
})(templateObject_1$
|
|
132038
|
+
})(templateObject_1$p || (templateObject_1$p = __makeTemplateObject$l([""], [""])));
|
|
132039
132039
|
|
|
132040
|
-
var templateObject_1$
|
|
132040
|
+
var templateObject_1$p;
|
|
132041
132041
|
|
|
132042
132042
|
var anObject$2 = anObject$v;
|
|
132043
132043
|
|
|
@@ -132411,7 +132411,7 @@ var PageTableOfContents = function PageTableOfContents(_a) {
|
|
|
132411
132411
|
showDialog = _b[0],
|
|
132412
132412
|
setShowDialog = _b[1];
|
|
132413
132413
|
|
|
132414
|
-
return jsxs(Host$
|
|
132414
|
+
return jsxs(Host$g, {
|
|
132415
132415
|
children: [jsx$1(Tooltip, __assign$g({
|
|
132416
132416
|
resourceKey: "Pages.pagesTableOfContents"
|
|
132417
132417
|
}, {
|
|
@@ -132436,11 +132436,11 @@ var PageTableOfContents = function PageTableOfContents(_a) {
|
|
|
132436
132436
|
}, void 0)]
|
|
132437
132437
|
}, void 0);
|
|
132438
132438
|
};
|
|
132439
|
-
var Host$
|
|
132440
|
-
var PageTableOfContentsButton = _styled(IconButton$1)(templateObject_2$
|
|
132439
|
+
var Host$g = _styled.div(templateObject_1$o || (templateObject_1$o = __makeTemplateObject$l(["\n && {\n margin-top: ", "px;\n }\n"], ["\n && {\n margin-top: ", "px;\n }\n"])), spacingXs);
|
|
132440
|
+
var PageTableOfContentsButton = _styled(IconButton$1)(templateObject_2$f || (templateObject_2$f = __makeTemplateObject$l(["\n && {\n padding: 0;\n margin: 0;\n width: 22px;\n height: 22px;\n\n i {\n font-size: 20px;\n color: ", ";\n }\n }\n"], ["\n && {\n padding: 0;\n margin: 0;\n width: 22px;\n height: 22px;\n\n i {\n font-size: 20px;\n color: ", ";\n }\n }\n"])), function (p) {
|
|
132441
132441
|
return p.theme.textColors.default;
|
|
132442
132442
|
});
|
|
132443
|
-
var templateObject_1$
|
|
132443
|
+
var templateObject_1$o, templateObject_2$f;
|
|
132444
132444
|
|
|
132445
132445
|
var PageDetail = function PageDetail(props) {
|
|
132446
132446
|
var routeMatch = useRouteMatch();
|
|
@@ -132473,7 +132473,7 @@ var PageDetailInner = function PageDetailInner(_a) {
|
|
|
132473
132473
|
return null;
|
|
132474
132474
|
}
|
|
132475
132475
|
|
|
132476
|
-
return jsx$1(Host$
|
|
132476
|
+
return jsx$1(Host$f, __assign$g({
|
|
132477
132477
|
className: className
|
|
132478
132478
|
}, {
|
|
132479
132479
|
children: jsx$1(DetailViewContextProvider, __assign$g({
|
|
@@ -132531,15 +132531,15 @@ var PageDetailInternal = function PageDetailInternal(_a) {
|
|
|
132531
132531
|
}, void 0);
|
|
132532
132532
|
};
|
|
132533
132533
|
|
|
132534
|
-
var Host$
|
|
132534
|
+
var Host$f = _styled.div.withConfig({
|
|
132535
132535
|
displayName: "PageDetail__Host",
|
|
132536
132536
|
componentId: "sc-22rpk8-0"
|
|
132537
|
-
})(templateObject_1$
|
|
132537
|
+
})(templateObject_1$n || (templateObject_1$n = __makeTemplateObject$l([""], [""])));
|
|
132538
132538
|
|
|
132539
132539
|
var PageHeader = _styled.div.withConfig({
|
|
132540
132540
|
displayName: "PageDetail__PageHeader",
|
|
132541
132541
|
componentId: "sc-22rpk8-1"
|
|
132542
|
-
})(templateObject_2$
|
|
132542
|
+
})(templateObject_2$e || (templateObject_2$e = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n margin-bottom: ", "px;\n"], ["\n display: flex;\n align-items: center;\n margin-bottom: ", "px;\n"])), spacingM);
|
|
132543
132543
|
|
|
132544
132544
|
var ConsumerBreadcrumbWrapper = function ConsumerBreadcrumbWrapper() {
|
|
132545
132545
|
var item = useDetailViewContext().item;
|
|
@@ -132554,7 +132554,7 @@ var ConsumerBreadcrumbWrapper = function ConsumerBreadcrumbWrapper() {
|
|
|
132554
132554
|
var StyledPageBreadcrumb = _styled(PageBreadcrumb).withConfig({
|
|
132555
132555
|
displayName: "PageDetail__StyledPageBreadcrumb",
|
|
132556
132556
|
componentId: "sc-22rpk8-2"
|
|
132557
|
-
})(templateObject_3$
|
|
132557
|
+
})(templateObject_3$e || (templateObject_3$e = __makeTemplateObject$l(["\n flex-grow: 1;\n box-sizing: border-box;\n max-width: calc(100% - 22px); /* 22px is for the ToC button */\n padding-right: ", "px;\n"], ["\n flex-grow: 1;\n box-sizing: border-box;\n max-width: calc(100% - 22px); /* 22px is for the ToC button */\n padding-right: ", "px;\n"])), spacingS);
|
|
132558
132558
|
|
|
132559
132559
|
var PageTableOfContentsWrapper = function PageTableOfContentsWrapper() {
|
|
132560
132560
|
var item = useDetailViewContext().item;
|
|
@@ -132594,7 +132594,7 @@ var StyledPagesDetailViewNavigation = _styled(PagesDetailViewNavigation).withCon
|
|
|
132594
132594
|
displayName: "PageDetail__StyledPagesDetailViewNavigation",
|
|
132595
132595
|
componentId: "sc-22rpk8-3"
|
|
132596
132596
|
})(templateObject_5$a || (templateObject_5$a = __makeTemplateObject$l(["\n ", "\n"], ["\n ", "\n"])), function (p) {
|
|
132597
|
-
return p.applyMarginTop && css$2(templateObject_4$
|
|
132597
|
+
return p.applyMarginTop && css$2(templateObject_4$d || (templateObject_4$d = __makeTemplateObject$l(["\n margin-top: ", "px;\n "], ["\n margin-top: ", "px;\n "])), spacingL);
|
|
132598
132598
|
});
|
|
132599
132599
|
|
|
132600
132600
|
var InlinePageListWrapper = function InlinePageListWrapper() {
|
|
@@ -132611,7 +132611,7 @@ var InlinePageListWrapper = function InlinePageListWrapper() {
|
|
|
132611
132611
|
return jsx$1(InlinePageList, {}, void 0);
|
|
132612
132612
|
};
|
|
132613
132613
|
|
|
132614
|
-
var templateObject_1$
|
|
132614
|
+
var templateObject_1$n, templateObject_2$e, templateObject_3$e, templateObject_4$d, templateObject_5$a;
|
|
132615
132615
|
|
|
132616
132616
|
var EventDetail = function EventDetail(_a) {
|
|
132617
132617
|
var itemId = _a.itemId,
|
|
@@ -132626,7 +132626,7 @@ var EventDetail = function EventDetail(_a) {
|
|
|
132626
132626
|
return null;
|
|
132627
132627
|
}
|
|
132628
132628
|
|
|
132629
|
-
return jsx$1(Host$
|
|
132629
|
+
return jsx$1(Host$e, __assign$g({
|
|
132630
132630
|
className: className
|
|
132631
132631
|
}, {
|
|
132632
132632
|
children: jsx$1(DetailViewContextProvider, __assign$g({
|
|
@@ -132676,29 +132676,29 @@ var EventDetail = function EventDetail(_a) {
|
|
|
132676
132676
|
}), void 0);
|
|
132677
132677
|
};
|
|
132678
132678
|
|
|
132679
|
-
var Host$
|
|
132679
|
+
var Host$e = _styled.div.withConfig({
|
|
132680
132680
|
displayName: "EventDetail__Host",
|
|
132681
132681
|
componentId: "sc-hrm4yl-0"
|
|
132682
|
-
})(templateObject_1$
|
|
132682
|
+
})(templateObject_1$m || (templateObject_1$m = __makeTemplateObject$l([""], [""])));
|
|
132683
132683
|
|
|
132684
132684
|
var EventDateAndRecurrenceInfo = _styled.div.withConfig({
|
|
132685
132685
|
displayName: "EventDetail__EventDateAndRecurrenceInfo",
|
|
132686
132686
|
componentId: "sc-hrm4yl-1"
|
|
132687
|
-
})(templateObject_2$
|
|
132687
|
+
})(templateObject_2$d || (templateObject_2$d = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"], ["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"])));
|
|
132688
132688
|
|
|
132689
132689
|
var DatesInfo = _styled(EventDetailViewDatesInfo).withConfig({
|
|
132690
132690
|
displayName: "EventDetail__DatesInfo",
|
|
132691
132691
|
componentId: "sc-hrm4yl-2"
|
|
132692
|
-
})(templateObject_3$
|
|
132692
|
+
})(templateObject_3$d || (templateObject_3$d = __makeTemplateObject$l(["\n margin-right: ", "px;\n"], ["\n margin-right: ", "px;\n"])), spacingM);
|
|
132693
132693
|
|
|
132694
132694
|
var EventRecurrenceSeriesInfoLink = _styled.a.withConfig({
|
|
132695
132695
|
displayName: "EventDetail__EventRecurrenceSeriesInfoLink",
|
|
132696
132696
|
componentId: "sc-hrm4yl-3"
|
|
132697
|
-
})(templateObject_4$
|
|
132697
|
+
})(templateObject_4$c || (templateObject_4$c = __makeTemplateObject$l(["\n color: ", ";\n margin-bottom: ", "px;\n"], ["\n color: ", ";\n margin-bottom: ", "px;\n"])), function (p) {
|
|
132698
132698
|
return p.theme.textColors.default;
|
|
132699
132699
|
}, spacingM);
|
|
132700
132700
|
|
|
132701
|
-
var templateObject_1$
|
|
132701
|
+
var templateObject_1$m, templateObject_2$d, templateObject_3$d, templateObject_4$c;
|
|
132702
132702
|
|
|
132703
132703
|
function useNewsItemClickHandler() {
|
|
132704
132704
|
var user = useCurrentUserContext().user;
|
|
@@ -132843,7 +132843,7 @@ var NewsCompactCard = function NewsCompactCard(_a) {
|
|
|
132843
132843
|
var icon = getNewsCardIcon(item, intl);
|
|
132844
132844
|
var preferredContentLanguage = getPreferredContentLanguage(user);
|
|
132845
132845
|
var url = getExternalContentUrl(item, preferredContentLanguage);
|
|
132846
|
-
return jsxs(Host$
|
|
132846
|
+
return jsxs(Host$d, __assign$g({
|
|
132847
132847
|
className: className
|
|
132848
132848
|
}, {
|
|
132849
132849
|
children: [jsx$1(Overlay, {
|
|
@@ -132906,24 +132906,24 @@ var NewsCompactCard = function NewsCompactCard(_a) {
|
|
|
132906
132906
|
return NewsService.getNewsRoute(baseRoute, item.id, title, item.useExternalContent);
|
|
132907
132907
|
}
|
|
132908
132908
|
};
|
|
132909
|
-
var Host$
|
|
132909
|
+
var Host$d = _styled.div.withConfig({
|
|
132910
132910
|
displayName: "NewsCompactCard__Host",
|
|
132911
132911
|
componentId: "sc-16ovog0-0"
|
|
132912
|
-
})(templateObject_1$
|
|
132912
|
+
})(templateObject_1$l || (templateObject_1$l = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: ", "px;\n background-color: ", ";\n"], ["\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n height: ", "px;\n background-color: ", ";\n"])), BannerSize, function (p) {
|
|
132913
132913
|
return p.theme.palette.white;
|
|
132914
132914
|
});
|
|
132915
132915
|
|
|
132916
|
-
var TextStyle = css$2(templateObject_2$
|
|
132916
|
+
var TextStyle = css$2(templateObject_2$c || (templateObject_2$c = __makeTemplateObject$l(["\n font-size: ", "px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n"], ["\n font-size: ", "px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n"])), fontSizeSmall);
|
|
132917
132917
|
|
|
132918
132918
|
var Inner$2 = _styled.div.withConfig({
|
|
132919
132919
|
displayName: "NewsCompactCard__Inner",
|
|
132920
132920
|
componentId: "sc-16ovog0-1"
|
|
132921
|
-
})(templateObject_3$
|
|
132921
|
+
})(templateObject_3$c || (templateObject_3$c = __makeTemplateObject$l(["\n max-width: calc(100% - ", "px);\n width: 100%;\n display: flex;\n align-items: center;\n"], ["\n max-width: calc(100% - ", "px);\n width: 100%;\n display: flex;\n align-items: center;\n"])), BannerSize);
|
|
132922
132922
|
|
|
132923
132923
|
var Content$2 = _styled.div.withConfig({
|
|
132924
132924
|
displayName: "NewsCompactCard__Content",
|
|
132925
132925
|
componentId: "sc-16ovog0-2"
|
|
132926
|
-
})(templateObject_4$
|
|
132926
|
+
})(templateObject_4$b || (templateObject_4$b = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n box-sizing: border-box;\n padding: ", "px ", "px;\n\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n box-sizing: border-box;\n padding: ", "px ", "px;\n\n ", "\n"])), spacingXs, spacingS + 5, TextStyle);
|
|
132927
132927
|
|
|
132928
132928
|
var Date$1 = _styled(DateTime).withConfig({
|
|
132929
132929
|
displayName: "NewsCompactCard__Date",
|
|
@@ -133007,10 +133007,10 @@ var BannerHost = _styled.div.withConfig({
|
|
|
133007
133007
|
});
|
|
133008
133008
|
});
|
|
133009
133009
|
|
|
133010
|
-
var templateObject_1$
|
|
133010
|
+
var templateObject_1$l, templateObject_2$c, templateObject_3$c, templateObject_4$b, templateObject_5$9, templateObject_6$8, templateObject_7$5, templateObject_8$4, templateObject_9$2, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$2, templateObject_14$2, templateObject_15$2, templateObject_16$1;
|
|
133011
133011
|
|
|
133012
133012
|
var EmptyNewsList = function EmptyNewsList() {
|
|
133013
|
-
return jsxs(Host$
|
|
133013
|
+
return jsxs(Host$c, {
|
|
133014
133014
|
children: [jsx$1(StyledIcon$3, {
|
|
133015
133015
|
iconName: "News"
|
|
133016
133016
|
}, void 0), jsx$1(Message, {
|
|
@@ -133021,22 +133021,22 @@ var EmptyNewsList = function EmptyNewsList() {
|
|
|
133021
133021
|
}, void 0);
|
|
133022
133022
|
};
|
|
133023
133023
|
|
|
133024
|
-
var Host$
|
|
133024
|
+
var Host$c = _styled.div.withConfig({
|
|
133025
133025
|
displayName: "EmptyNewsList__Host",
|
|
133026
133026
|
componentId: "sc-11ktr8s-0"
|
|
133027
|
-
})(templateObject_1$
|
|
133027
|
+
})(templateObject_1$k || (templateObject_1$k = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: auto 0;\n padding: ", "px 0;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n margin: auto 0;\n padding: ", "px 0;\n"])), spacingM);
|
|
133028
133028
|
|
|
133029
133029
|
var StyledIcon$3 = _styled(Icon).withConfig({
|
|
133030
133030
|
displayName: "EmptyNewsList__StyledIcon",
|
|
133031
133031
|
componentId: "sc-11ktr8s-1"
|
|
133032
|
-
})(templateObject_2$
|
|
133032
|
+
})(templateObject_2$b || (templateObject_2$b = __makeTemplateObject$l(["\n font-size: ", "px;\n opacity: 0.8;\n margin-bottom: ", "px;\n"], ["\n font-size: ", "px;\n opacity: 0.8;\n margin-bottom: ", "px;\n"])), fontSizeLarger, spacingM);
|
|
133033
133033
|
|
|
133034
133034
|
var Message = _styled.p.withConfig({
|
|
133035
133035
|
displayName: "EmptyNewsList__Message",
|
|
133036
133036
|
componentId: "sc-11ktr8s-2"
|
|
133037
|
-
})(templateObject_3$
|
|
133037
|
+
})(templateObject_3$b || (templateObject_3$b = __makeTemplateObject$l(["\n text-align: center;\n padding: 0;\n margin: 0;\n"], ["\n text-align: center;\n padding: 0;\n margin: 0;\n"])));
|
|
133038
133038
|
|
|
133039
|
-
var templateObject_1$
|
|
133039
|
+
var templateObject_1$k, templateObject_2$b, templateObject_3$b;
|
|
133040
133040
|
|
|
133041
133041
|
var ItemLayoutMode;
|
|
133042
133042
|
|
|
@@ -133134,7 +133134,7 @@ var NewsListInternal = function NewsListInternal(_a) {
|
|
|
133134
133134
|
var formatMessage = useIntl().formatMessage;
|
|
133135
133135
|
var webAppUrl = useSubscriptionWebAppUrl();
|
|
133136
133136
|
var handleClick = useNewsItemClickHandler();
|
|
133137
|
-
return jsx$1(Host$
|
|
133137
|
+
return jsx$1(Host$b, __assign$g({
|
|
133138
133138
|
className: className
|
|
133139
133139
|
}, {
|
|
133140
133140
|
children: items.map(function (item) {
|
|
@@ -133199,21 +133199,21 @@ var NewsListInternal = function NewsListInternal(_a) {
|
|
|
133199
133199
|
}), void 0);
|
|
133200
133200
|
};
|
|
133201
133201
|
|
|
133202
|
-
var Host$
|
|
133202
|
+
var Host$b = _styled.div.withConfig({
|
|
133203
133203
|
displayName: "NewsList__Host",
|
|
133204
133204
|
componentId: "sc-1d0bzx1-0"
|
|
133205
|
-
})(templateObject_1$
|
|
133205
|
+
})(templateObject_1$j || (templateObject_1$j = __makeTemplateObject$l([""], [""])));
|
|
133206
133206
|
|
|
133207
133207
|
var CompactList = _styled.ul.withConfig({
|
|
133208
133208
|
displayName: "NewsList__CompactList",
|
|
133209
133209
|
componentId: "sc-1d0bzx1-1"
|
|
133210
|
-
})(templateObject_2$
|
|
133210
|
+
})(templateObject_2$a || (templateObject_2$a = __makeTemplateObject$l(["\n margin: 0;\n padding: 0;\n list-style: none;\n\n > li:not(:first-child) {\n margin-top: ", "px;\n }\n"], ["\n margin: 0;\n padding: 0;\n list-style: none;\n\n > li:not(:first-child) {\n margin-top: ", "px;\n }\n"])), spacingS);
|
|
133211
133211
|
|
|
133212
133212
|
var StyledNewsItemTile = _styled(NewsItemTile).withConfig({
|
|
133213
133213
|
displayName: "NewsList__StyledNewsItemTile",
|
|
133214
133214
|
componentId: "sc-1d0bzx1-2"
|
|
133215
|
-
})(templateObject_4$
|
|
133216
|
-
return p.showHighlight && css$2(templateObject_3$
|
|
133215
|
+
})(templateObject_4$a || (templateObject_4$a = __makeTemplateObject$l(["\n :not(:last-child) {\n margin-bottom: ", "px;\n }\n\n ", ";\n"], ["\n :not(:last-child) {\n margin-bottom: ", "px;\n }\n\n ", ";\n"])), spacingM, function (p) {
|
|
133216
|
+
return p.showHighlight && css$2(templateObject_3$a || (templateObject_3$a = __makeTemplateObject$l(["\n position: relative;\n\n &::after {\n content: '';\n border-right-width: 6px;\n border-right-color: ", ";\n border-right-style: solid;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n }\n "], ["\n position: relative;\n\n &::after {\n content: '';\n border-right-width: 6px;\n border-right-color: ", ";\n border-right-style: solid;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n }\n "])), p.theme.palette.accent);
|
|
133217
133217
|
});
|
|
133218
133218
|
|
|
133219
133219
|
var Comments = _styled.a.withConfig({
|
|
@@ -133242,7 +133242,7 @@ var ErrorContainer$1 = _styled.p.withConfig({
|
|
|
133242
133242
|
return p.theme.palette.red;
|
|
133243
133243
|
}, spacingM);
|
|
133244
133244
|
|
|
133245
|
-
var templateObject_1$
|
|
133245
|
+
var templateObject_1$j, templateObject_2$a, templateObject_3$a, templateObject_4$a, templateObject_5$8, templateObject_6$7, templateObject_7$4, templateObject_8$3;
|
|
133246
133246
|
|
|
133247
133247
|
var ManageChannels = function ManageChannels(_a) {
|
|
133248
133248
|
var className = _a.className;
|
|
@@ -133266,7 +133266,7 @@ var ManageChannels = function ManageChannels(_a) {
|
|
|
133266
133266
|
}, void 0);
|
|
133267
133267
|
}
|
|
133268
133268
|
|
|
133269
|
-
return jsxs(Host$
|
|
133269
|
+
return jsxs(Host$a, __assign$g({
|
|
133270
133270
|
className: className
|
|
133271
133271
|
}, {
|
|
133272
133272
|
children: [jsx$1(Title$2, {
|
|
@@ -133405,25 +133405,25 @@ var ManageChannels = function ManageChannels(_a) {
|
|
|
133405
133405
|
}
|
|
133406
133406
|
};
|
|
133407
133407
|
|
|
133408
|
-
var Host$
|
|
133408
|
+
var Host$a = _styled.div.withConfig({
|
|
133409
133409
|
displayName: "ManageChannels__Host",
|
|
133410
133410
|
componentId: "sc-yyoxfw-0"
|
|
133411
|
-
})(templateObject_1$
|
|
133411
|
+
})(templateObject_1$i || (templateObject_1$i = __makeTemplateObject$l(["\n padding: ", "px ", "px;\n"], ["\n padding: ", "px ", "px;\n"])), spacingX, spacingM);
|
|
133412
133412
|
|
|
133413
133413
|
var Title$2 = _styled.h3.withConfig({
|
|
133414
133414
|
displayName: "ManageChannels__Title",
|
|
133415
133415
|
componentId: "sc-yyoxfw-1"
|
|
133416
|
-
})(templateObject_2$
|
|
133416
|
+
})(templateObject_2$9 || (templateObject_2$9 = __makeTemplateObject$l(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
|
|
133417
133417
|
|
|
133418
133418
|
var Description = _styled.span.withConfig({
|
|
133419
133419
|
displayName: "ManageChannels__Description",
|
|
133420
133420
|
componentId: "sc-yyoxfw-2"
|
|
133421
|
-
})(templateObject_3$
|
|
133421
|
+
})(templateObject_3$9 || (templateObject_3$9 = __makeTemplateObject$l(["\n font-size: ", "px;\n"], ["\n font-size: ", "px;\n"])), fontSizeSmall);
|
|
133422
133422
|
|
|
133423
133423
|
var ChannelList = _styled.ul.withConfig({
|
|
133424
133424
|
displayName: "ManageChannels__ChannelList",
|
|
133425
133425
|
componentId: "sc-yyoxfw-3"
|
|
133426
|
-
})(templateObject_4$
|
|
133426
|
+
})(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject$l(["\n list-style: none;\n\n && {\n margin-top: ", "px;\n padding-left: 0;\n }\n"], ["\n list-style: none;\n\n && {\n margin-top: ", "px;\n padding-left: 0;\n }\n"])), spacingS);
|
|
133427
133427
|
|
|
133428
133428
|
var ChannelItem = function ChannelItem(_a) {
|
|
133429
133429
|
var channel = _a.channel,
|
|
@@ -133481,7 +133481,7 @@ var StyledIconButton = _styled(IconButton$1).withConfig({
|
|
|
133481
133481
|
return p.theme.textColors.default;
|
|
133482
133482
|
});
|
|
133483
133483
|
|
|
133484
|
-
var templateObject_1$
|
|
133484
|
+
var templateObject_1$i, templateObject_2$9, templateObject_3$9, templateObject_4$9, templateObject_5$7, templateObject_6$6, templateObject_7$3, templateObject_8$2;
|
|
133485
133485
|
|
|
133486
133486
|
var NewsGridCard = function NewsGridCard(_a) {
|
|
133487
133487
|
var _b;
|
|
@@ -133512,7 +133512,7 @@ var NewsGridCard = function NewsGridCard(_a) {
|
|
|
133512
133512
|
var channels = newsItem.channels;
|
|
133513
133513
|
var userLanguage = getPreferredContentLanguage(user);
|
|
133514
133514
|
var icon = getNewsCardIcon(item, intl);
|
|
133515
|
-
return jsxs(Host$
|
|
133515
|
+
return jsxs(Host$9, __assign$g({
|
|
133516
133516
|
className: className,
|
|
133517
133517
|
showHighlight: !!user.unreadNews.find(function (n) {
|
|
133518
133518
|
return n.itemId === item.id;
|
|
@@ -133588,13 +133588,13 @@ var NewsGridCard = function NewsGridCard(_a) {
|
|
|
133588
133588
|
return NewsService.getNewsRoute(baseRoute, item.id, title);
|
|
133589
133589
|
}
|
|
133590
133590
|
};
|
|
133591
|
-
var Host$
|
|
133592
|
-
return p.showHighlight && css$2(templateObject_1$
|
|
133591
|
+
var Host$9 = _styled.div(templateObject_2$8 || (templateObject_2$8 = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n width: 100%;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n position: relative;\n\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n width: 100%;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n position: relative;\n\n ", "\n"])), function (p) {
|
|
133592
|
+
return p.showHighlight && css$2(templateObject_1$h || (templateObject_1$h = __makeTemplateObject$l(["\n position: relative;\n &::after {\n ", ";\n }\n "], ["\n position: relative;\n &::after {\n ", ";\n }\n "])), BannerHighlightStyle);
|
|
133593
133593
|
});
|
|
133594
|
-
var BannerHighlightStyle = css$2(templateObject_3$
|
|
133594
|
+
var BannerHighlightStyle = css$2(templateObject_3$8 || (templateObject_3$8 = __makeTemplateObject$l(["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ", "px;\n display: block;\n background-color: ", ";\n"], ["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ", "px;\n display: block;\n background-color: ", ";\n"])), spacingXs, function (p) {
|
|
133595
133595
|
return p.theme.palette.accent;
|
|
133596
133596
|
});
|
|
133597
|
-
var Content$1 = _styled.div(templateObject_4$
|
|
133597
|
+
var Content$1 = _styled.div(templateObject_4$8 || (templateObject_4$8 = __makeTemplateObject$l(["\n position: relative;\n display: flex;\n flex-direction: column;\n width: auto;\n min-height: ", "px;\n padding: ", "px;\n box-sizing: border-box;\n background-color: ", ";\n"], ["\n position: relative;\n display: flex;\n flex-direction: column;\n width: auto;\n min-height: ", "px;\n padding: ", "px;\n box-sizing: border-box;\n background-color: ", ";\n"])), function (p) {
|
|
133598
133598
|
return p.contentHeight;
|
|
133599
133599
|
}, spacingM, function (p) {
|
|
133600
133600
|
return p.theme.palette.white;
|
|
@@ -133616,24 +133616,24 @@ var KeywordsWrapper = _styled.div(templateObject_14$1 || (templateObject_14$1 =
|
|
|
133616
133616
|
return p.theme.palette.neutralTertiary;
|
|
133617
133617
|
});
|
|
133618
133618
|
var StyledChannels$1 = _styled(ChannelList$1)(templateObject_15$1 || (templateObject_15$1 = __makeTemplateObject$l(["\n margin-top: ", "px;\n margin-bottom: ", "px;\n"], ["\n margin-top: ", "px;\n margin-bottom: ", "px;\n"])), spacingS, spacingM);
|
|
133619
|
-
var templateObject_1$
|
|
133619
|
+
var templateObject_1$h, templateObject_2$8, templateObject_3$8, templateObject_4$8, templateObject_5$6, templateObject_6$5, templateObject_7$2, templateObject_8$1, templateObject_9$1, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14$1, templateObject_15$1;
|
|
133620
133620
|
|
|
133621
133621
|
var ErrorContainer = function ErrorContainer() {
|
|
133622
|
-
return jsx$1(Host$
|
|
133622
|
+
return jsx$1(Host$8, {
|
|
133623
133623
|
children: jsx$1(FormattedMessage$1, {
|
|
133624
133624
|
id: "NewsList.error"
|
|
133625
133625
|
}, void 0)
|
|
133626
133626
|
}, void 0);
|
|
133627
133627
|
};
|
|
133628
133628
|
|
|
133629
|
-
var Host$
|
|
133629
|
+
var Host$8 = _styled.p.withConfig({
|
|
133630
133630
|
displayName: "ErrorContainer__Host",
|
|
133631
133631
|
componentId: "sc-499uwc-0"
|
|
133632
|
-
})(templateObject_1$
|
|
133632
|
+
})(templateObject_1$g || (templateObject_1$g = __makeTemplateObject$l(["\n color: ", ";\n padding: ", "px 0;\n text-align: center;\n"], ["\n color: ", ";\n padding: ", "px 0;\n text-align: center;\n"])), function (p) {
|
|
133633
133633
|
return p.theme.palette.red;
|
|
133634
133634
|
}, spacingM);
|
|
133635
133635
|
|
|
133636
|
-
var templateObject_1$
|
|
133636
|
+
var templateObject_1$g;
|
|
133637
133637
|
|
|
133638
133638
|
var NewsGrid = function NewsGrid(_a) {
|
|
133639
133639
|
var filter = _a.filter,
|
|
@@ -133676,7 +133676,7 @@ var NewsGrid = function NewsGrid(_a) {
|
|
|
133676
133676
|
return jsx$1(EmptyNewsList, {}, void 0);
|
|
133677
133677
|
}
|
|
133678
133678
|
|
|
133679
|
-
return jsxs(Host$
|
|
133679
|
+
return jsxs(Host$7, {
|
|
133680
133680
|
children: [jsx$1(Inner$1, __assign$g({
|
|
133681
133681
|
className: className,
|
|
133682
133682
|
columnCount: columnCount
|
|
@@ -133717,26 +133717,26 @@ var NewsGrid = function NewsGrid(_a) {
|
|
|
133717
133717
|
}
|
|
133718
133718
|
};
|
|
133719
133719
|
|
|
133720
|
-
var Host$
|
|
133720
|
+
var Host$7 = _styled.div.withConfig({
|
|
133721
133721
|
displayName: "NewsGrid__Host",
|
|
133722
133722
|
componentId: "sc-8ugpfz-0"
|
|
133723
|
-
})(templateObject_1$
|
|
133723
|
+
})(templateObject_1$f || (templateObject_1$f = __makeTemplateObject$l([""], [""])));
|
|
133724
133724
|
|
|
133725
133725
|
var Inner$1 = _styled.div.withConfig({
|
|
133726
133726
|
displayName: "NewsGrid__Inner",
|
|
133727
133727
|
componentId: "sc-8ugpfz-1"
|
|
133728
|
-
})(templateObject_3$
|
|
133729
|
-
return css$2(templateObject_2$
|
|
133728
|
+
})(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject$l(["\n display: flex; // IE fallback\n flex-wrap: wrap;\n\n display: grid;\n gap: ", "px;\n ", "\n"], ["\n display: flex; // IE fallback\n flex-wrap: wrap;\n\n display: grid;\n gap: ", "px;\n ", "\n"])), spacingM, function (p) {
|
|
133729
|
+
return css$2(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject$l(["\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n "], ["\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n "])), p.columnCount);
|
|
133730
133730
|
});
|
|
133731
133731
|
|
|
133732
133732
|
_styled(NewsGridCard).withConfig({
|
|
133733
133733
|
displayName: "NewsGrid__IELegacyGridCard",
|
|
133734
133734
|
componentId: "sc-8ugpfz-2"
|
|
133735
133735
|
})(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject$l(["\n margin: ", "px;\n ", ";\n"], ["\n margin: ", "px;\n ", ";\n"])), spacingM / 2, function (p) {
|
|
133736
|
-
return css$2(templateObject_4$
|
|
133736
|
+
return css$2(templateObject_4$7 || (templateObject_4$7 = __makeTemplateObject$l(["\n width: calc(100% / ", " - ", "px);\n "], ["\n width: calc(100% / ", " - ", "px);\n "])), p.columnCount, spacingM);
|
|
133737
133737
|
});
|
|
133738
133738
|
|
|
133739
|
-
var templateObject_1$
|
|
133739
|
+
var templateObject_1$f, templateObject_2$7, templateObject_3$7, templateObject_4$7, templateObject_5$5;
|
|
133740
133740
|
|
|
133741
133741
|
var HeroSlide = function HeroSlide(_a) {
|
|
133742
133742
|
var item = _a.item,
|
|
@@ -133772,7 +133772,7 @@ var HeroSlide = function HeroSlide(_a) {
|
|
|
133772
133772
|
var showHeadline = features.contentHeadline && headline != null;
|
|
133773
133773
|
var hostWidth = typeof width === 'number' ? width + "px" : width;
|
|
133774
133774
|
var hostHeight = typeof height === 'number' ? height + "px" : height;
|
|
133775
|
-
return jsxs(Host$
|
|
133775
|
+
return jsxs(Host$6, __assign$g({
|
|
133776
133776
|
showBorder: !hasBanner,
|
|
133777
133777
|
applyOverlay: hasImageBanner,
|
|
133778
133778
|
width: hostWidth,
|
|
@@ -133877,13 +133877,13 @@ var HeroSlide = function HeroSlide(_a) {
|
|
|
133877
133877
|
}
|
|
133878
133878
|
};
|
|
133879
133879
|
|
|
133880
|
-
var Host$
|
|
133880
|
+
var Host$6 = _styled.div.withConfig({
|
|
133881
133881
|
displayName: "HeroSlide__Host",
|
|
133882
133882
|
componentId: "sc-3yofth-0"
|
|
133883
133883
|
})(templateObject_7$1 || (templateObject_7$1 = __makeTemplateObject$l(["\n position: relative;\n\n ", "\n\n ", "\n \n ", "\n \n ", "\n"], ["\n position: relative;\n\n ", "\n\n ", "\n \n ", "\n \n ", "\n"])), function (p) {
|
|
133884
|
-
return p.width ? css$2(templateObject_1$
|
|
133884
|
+
return p.width ? css$2(templateObject_1$e || (templateObject_1$e = __makeTemplateObject$l(["\n width: ", ";\n "], ["\n width: ", ";\n "])), p.width) : css$2(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject$l(["\n width: 100%;\n "], ["\n width: 100%;\n "])));
|
|
133885
133885
|
}, function (p) {
|
|
133886
|
-
return p.height ? css$2(templateObject_3$
|
|
133886
|
+
return p.height ? css$2(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject$l(["\n height: ", ";\n "], ["\n height: ", ";\n "])), p.height) : css$2(templateObject_4$6 || (templateObject_4$6 = __makeTemplateObject$l(["\n height: 100%;\n "], ["\n height: 100%;\n "])));
|
|
133887
133887
|
}, function (p) {
|
|
133888
133888
|
return p.showBorder && css$2(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject$l(["\n border: 1px solid ", ";\n box-sizing: border-box;\n "], ["\n border: 1px solid ", ";\n box-sizing: border-box;\n "])), p.theme.palette.neutralTertiaryAlt);
|
|
133889
133889
|
}, function (p) {
|
|
@@ -134001,7 +134001,7 @@ var StyledDateTime = _styled(DateTime).withConfig({
|
|
|
134001
134001
|
return p.color ? css$2(templateObject_31 || (templateObject_31 = __makeTemplateObject$l(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.color) : css$2(templateObject_32 || (templateObject_32 = __makeTemplateObject$l(["\n color: ", ";\n "], ["\n color: ", ";\n "])), p.theme.textColors.default);
|
|
134002
134002
|
});
|
|
134003
134003
|
|
|
134004
|
-
var templateObject_1$
|
|
134004
|
+
var templateObject_1$e, templateObject_2$6, templateObject_3$6, templateObject_4$6, templateObject_5$4, templateObject_6$4, templateObject_7$1, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33;
|
|
134005
134005
|
|
|
134006
134006
|
var HeroPaging = function HeroPaging(_a) {
|
|
134007
134007
|
var items = _a.items,
|
|
@@ -134125,18 +134125,18 @@ var HeroPaging = function HeroPaging(_a) {
|
|
|
134125
134125
|
var PagingHost = _styled.div.withConfig({
|
|
134126
134126
|
displayName: "HeroPaging__PagingHost",
|
|
134127
134127
|
componentId: "sc-1y3j8qb-0"
|
|
134128
|
-
})(templateObject_1$
|
|
134128
|
+
})(templateObject_1$d || (templateObject_1$d = __makeTemplateObject$l(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
|
134129
134129
|
|
|
134130
134130
|
var Paging = _styled.ul.withConfig({
|
|
134131
134131
|
displayName: "HeroPaging__Paging",
|
|
134132
134132
|
componentId: "sc-1y3j8qb-1"
|
|
134133
|
-
})(templateObject_2$
|
|
134133
|
+
})(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject$l(["\n display: flex;\n width: 100%;\n list-style: none;\n margin: 0 0 ", "px 0;\n padding: 0;\n"], ["\n display: flex;\n width: 100%;\n list-style: none;\n margin: 0 0 ", "px 0;\n padding: 0;\n"])), spacingM);
|
|
134134
134134
|
|
|
134135
134135
|
var PagingItem = _styled.li.withConfig({
|
|
134136
134136
|
displayName: "HeroPaging__PagingItem",
|
|
134137
134137
|
componentId: "sc-1y3j8qb-2"
|
|
134138
|
-
})(templateObject_4$
|
|
134139
|
-
return p.visibleItemsLength && css$2(templateObject_3$
|
|
134138
|
+
})(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject$l(["\n display: none;\n flex: 1;\n min-width: 140px;\n margin: 0 5px;\n\n ", "\n\n &:not(.paging-item--active) {\n opacity: 0.6;\n }\n\n &.paging-item--visible {\n display: block;\n }\n"], ["\n display: none;\n flex: 1;\n min-width: 140px;\n margin: 0 5px;\n\n ", "\n\n &:not(.paging-item--active) {\n opacity: 0.6;\n }\n\n &.paging-item--visible {\n display: block;\n }\n"])), function (p) {
|
|
134139
|
+
return p.visibleItemsLength && css$2(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject$l(["\n max-width: calc(100% / ", " - 10px);\n "], ["\n max-width: calc(100% / ", " - 10px);\n "])), p.visibleItemsLength);
|
|
134140
134140
|
});
|
|
134141
134141
|
|
|
134142
134142
|
var PagingButton = _styled(ActionButton).withConfig({
|
|
@@ -134151,7 +134151,7 @@ var PagingArrow = _styled(IconButton).withConfig({
|
|
|
134151
134151
|
componentId: "sc-1y3j8qb-4"
|
|
134152
134152
|
})(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject$l(["\n position: absolute;\n top: 50%;\n\n && {\n padding: 0;\n }\n\n &[data-paging-next] {\n left: 100%;\n transform: translate(-5px, -50%);\n }\n\n &[data-paging-back] {\n right: 100%;\n transform: translate(5px, -50%);\n }\n"], ["\n position: absolute;\n top: 50%;\n\n && {\n padding: 0;\n }\n\n &[data-paging-next] {\n left: 100%;\n transform: translate(-5px, -50%);\n }\n\n &[data-paging-back] {\n right: 100%;\n transform: translate(5px, -50%);\n }\n"])));
|
|
134153
134153
|
|
|
134154
|
-
var templateObject_1$
|
|
134154
|
+
var templateObject_1$d, templateObject_2$5, templateObject_3$5, templateObject_4$5, templateObject_5$3, templateObject_6$3;
|
|
134155
134155
|
|
|
134156
134156
|
var Hero = function Hero(_a) {
|
|
134157
134157
|
var items = _a.items,
|
|
@@ -134218,9 +134218,9 @@ var Hero = function Hero(_a) {
|
|
|
134218
134218
|
var StyledCarousel = _styled(Carousel).withConfig({
|
|
134219
134219
|
displayName: "Hero__StyledCarousel",
|
|
134220
134220
|
componentId: "sc-55ys37-0"
|
|
134221
|
-
})(templateObject_1$
|
|
134221
|
+
})(templateObject_1$c || (templateObject_1$c = __makeTemplateObject$l(["\n .slider-list {\n height: 100% !important;\n\n > li {\n height: 100% !important;\n }\n }\n\n .slider-control-bottomcenter {\n left: ", "px !important;\n right: ", "px !important;\n transform: none !important;\n }\n\n .hero-paging--hidden {\n display: none;\n }\n"], ["\n .slider-list {\n height: 100% !important;\n\n > li {\n height: 100% !important;\n }\n }\n\n .slider-control-bottomcenter {\n left: ", "px !important;\n right: ", "px !important;\n transform: none !important;\n }\n\n .hero-paging--hidden {\n display: none;\n }\n"])), spacingL, spacingL);
|
|
134222
134222
|
|
|
134223
|
-
var templateObject_1$
|
|
134223
|
+
var templateObject_1$c;
|
|
134224
134224
|
|
|
134225
134225
|
var NewsHero = function NewsHero(_a) {
|
|
134226
134226
|
var _b;
|
|
@@ -134345,9 +134345,9 @@ var NewsHero = function NewsHero(_a) {
|
|
|
134345
134345
|
var StyledChannels = _styled(ChannelList$1).withConfig({
|
|
134346
134346
|
displayName: "NewsHero__StyledChannels",
|
|
134347
134347
|
componentId: "sc-i9ar0j-0"
|
|
134348
|
-
})(templateObject_1$
|
|
134348
|
+
})(templateObject_1$b || (templateObject_1$b = __makeTemplateObject$l(["\n [data-channels] {\n justify-content: flex-end;\n }\n"], ["\n [data-channels] {\n justify-content: flex-end;\n }\n"])));
|
|
134349
134349
|
|
|
134350
|
-
var templateObject_1$
|
|
134350
|
+
var templateObject_1$b;
|
|
134351
134351
|
|
|
134352
134352
|
// a string of all valid unicode whitespaces
|
|
134353
134353
|
// eslint-disable-next-line max-len
|
|
@@ -134515,7 +134515,7 @@ var GroupsDropdown = function GroupsDropdown(_a) {
|
|
|
134515
134515
|
var StyledDropdown = _styled(Dropdown).withConfig({
|
|
134516
134516
|
displayName: "GroupsDropdown__StyledDropdown",
|
|
134517
134517
|
componentId: "sc-cmsnyu-0"
|
|
134518
|
-
})(templateObject_1$
|
|
134518
|
+
})(templateObject_1$a || (templateObject_1$a = __makeTemplateObject$l(["\n ", "\n\n margin-bottom: ", "px;\n width: 200px;\n min-width: 200px;\n padding: 0;\n\n &&&,\n &&&:hover,\n .ms-Dropdown,\n .ms-Dropdown-title,\n .ms-Dropdown-caretDownWrapper {\n color: ", " !important;\n }\n\n .ms-Dropdown-title {\n background-color: ", ";\n i {\n font-size: ", "px;\n margin: 0 ", "px 0 0;\n }\n }\n\n .ms-Dropdown-caretDownWrapper {\n top: 0;\n\n & > i {\n color: ", " !important;\n }\n }\n"], ["\n ", "\n\n margin-bottom: ", "px;\n width: 200px;\n min-width: 200px;\n padding: 0;\n\n &&&,\n &&&:hover,\n .ms-Dropdown,\n .ms-Dropdown-title,\n .ms-Dropdown-caretDownWrapper {\n color: ", " !important;\n }\n\n .ms-Dropdown-title {\n background-color: ", ";\n i {\n font-size: ", "px;\n margin: 0 ", "px 0 0;\n }\n }\n\n .ms-Dropdown-caretDownWrapper {\n top: 0;\n\n & > i {\n color: ", " !important;\n }\n }\n"])), ToolbarNoBorderDropdownStyles, spacingXs, function (p) {
|
|
134519
134519
|
return p.theme.textColors.onAccent;
|
|
134520
134520
|
}, function (p) {
|
|
134521
134521
|
return p.theme.palette.accent;
|
|
@@ -134526,16 +134526,16 @@ var StyledDropdown = _styled(Dropdown).withConfig({
|
|
|
134526
134526
|
var DropdownOption = _styled.div.withConfig({
|
|
134527
134527
|
displayName: "GroupsDropdown__DropdownOption",
|
|
134528
134528
|
componentId: "sc-cmsnyu-1"
|
|
134529
|
-
})(templateObject_2$
|
|
134529
|
+
})(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject$l(["\n ", "\n"], ["\n ", "\n"])), ToolbarOptionStyles);
|
|
134530
134530
|
|
|
134531
134531
|
var Title = _styled.div.withConfig({
|
|
134532
134532
|
displayName: "GroupsDropdown__Title",
|
|
134533
134533
|
componentId: "sc-cmsnyu-2"
|
|
134534
|
-
})(templateObject_3$
|
|
134534
|
+
})(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject$l(["\n display: inline-flex;\n width: 100%;\n\n > i {\n margin-left: ", "px;\n margin-right: ", "px;\n }\n\n > span {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n"], ["\n display: inline-flex;\n width: 100%;\n\n > i {\n margin-left: ", "px;\n margin-right: ", "px;\n }\n\n > span {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n"])), spacingS, spacingS + 8);
|
|
134535
134535
|
|
|
134536
|
-
var GlobalDropdownStyles = createGlobalStyle(templateObject_4$
|
|
134536
|
+
var GlobalDropdownStyles = createGlobalStyle(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject$l(["\n .ms-Dropdown-item {\n i {\n width: auto;\n margin: 0 ", "px 0 0;\n }\n }\n"], ["\n .ms-Dropdown-item {\n i {\n width: auto;\n margin: 0 ", "px 0 0;\n }\n }\n"])), spacingS);
|
|
134537
134537
|
|
|
134538
|
-
var templateObject_1$
|
|
134538
|
+
var templateObject_1$a, templateObject_2$4, templateObject_3$4, templateObject_4$4;
|
|
134539
134539
|
|
|
134540
134540
|
var TaskButton = function TaskButton(_a) {
|
|
134541
134541
|
var count = _a.count,
|
|
@@ -134577,9 +134577,9 @@ var TaskButton = function TaskButton(_a) {
|
|
|
134577
134577
|
var ToggleButton = _styled(DefaultButton).withConfig({
|
|
134578
134578
|
displayName: "TaskButton__ToggleButton",
|
|
134579
134579
|
componentId: "sc-8eylsw-0"
|
|
134580
|
-
})(templateObject_1$
|
|
134580
|
+
})(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject$l(["\n border-radius: 0;\n padding: 0 ", "px;\n margin-bottom: ", "px;\n font-size: ", "px;\n user-select: none;\n height: ", "px;\n\n display: flex;\n align-items: center;\n\n svg {\n margin-right: ", "px;\n }\n"], ["\n border-radius: 0;\n padding: 0 ", "px;\n margin-bottom: ", "px;\n font-size: ", "px;\n user-select: none;\n height: ", "px;\n\n display: flex;\n align-items: center;\n\n svg {\n margin-right: ", "px;\n }\n"])), spacingS, spacingXs, fontSizeSmall, spacingL + 2, spacingS);
|
|
134581
134581
|
|
|
134582
|
-
var templateObject_1$
|
|
134582
|
+
var templateObject_1$9;
|
|
134583
134583
|
|
|
134584
134584
|
var TaskButtons = function TaskButtons(_a) {
|
|
134585
134585
|
var type = _a.type,
|
|
@@ -134597,7 +134597,7 @@ var TaskButtons = function TaskButtons(_a) {
|
|
|
134597
134597
|
return null;
|
|
134598
134598
|
}
|
|
134599
134599
|
|
|
134600
|
-
return jsxs(Host$
|
|
134600
|
+
return jsxs(Host$5, __assign$g({
|
|
134601
134601
|
className: className
|
|
134602
134602
|
}, {
|
|
134603
134603
|
children: [jsx$1(TaskButton, {
|
|
@@ -134642,12 +134642,12 @@ var TaskButtons = function TaskButtons(_a) {
|
|
|
134642
134642
|
}), void 0);
|
|
134643
134643
|
};
|
|
134644
134644
|
|
|
134645
|
-
var Host$
|
|
134645
|
+
var Host$5 = _styled.div.withConfig({
|
|
134646
134646
|
displayName: "TaskButtons__Host",
|
|
134647
134647
|
componentId: "sc-sw0zei-0"
|
|
134648
|
-
})(templateObject_1$
|
|
134648
|
+
})(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject$l(["\n display: flex;\n flex-wrap: wrap;\n\n button {\n border: 1px solid #808080;\n\n &:not(:first-child) {\n border-left: none;\n }\n }\n"], ["\n display: flex;\n flex-wrap: wrap;\n\n button {\n border: 1px solid #808080;\n\n &:not(:first-child) {\n border-left: none;\n }\n }\n"])));
|
|
134649
134649
|
|
|
134650
|
-
var templateObject_1$
|
|
134650
|
+
var templateObject_1$8;
|
|
134651
134651
|
|
|
134652
134652
|
var NewArticleButton = function NewArticleButton(_a) {
|
|
134653
134653
|
var groupId = _a.groupId,
|
|
@@ -134789,22 +134789,22 @@ var NewsEditorDashboard = function NewsEditorDashboard(_a) {
|
|
|
134789
134789
|
}).length;
|
|
134790
134790
|
}
|
|
134791
134791
|
};
|
|
134792
|
-
var MessageBarStyle = createGlobalStyle(templateObject_1$
|
|
134792
|
+
var MessageBarStyle = createGlobalStyle(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject$l(["\n .ms-MessageBar {\n margin-bottom: ", "px;\n }\n .ms-MessageBar-text {\n flex: 1 1 0%;\n }\n"], ["\n .ms-MessageBar {\n margin-bottom: ", "px;\n }\n .ms-MessageBar-text {\n flex: 1 1 0%;\n }\n"])), spacingXs);
|
|
134793
134793
|
|
|
134794
134794
|
var StyledEditorListItem = _styled(EditorListItem).withConfig({
|
|
134795
134795
|
displayName: "NewsEditorDashboard__StyledEditorListItem",
|
|
134796
134796
|
componentId: "sc-vv9dzu-0"
|
|
134797
|
-
})(templateObject_2$
|
|
134797
|
+
})(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject$l(["\n :not(:first-child) {\n margin-top: ", "px;\n }\n"], ["\n :not(:first-child) {\n margin-top: ", "px;\n }\n"])), spacingS + 5);
|
|
134798
134798
|
|
|
134799
134799
|
var FiltersAndButtons = _styled.div.withConfig({
|
|
134800
134800
|
displayName: "NewsEditorDashboard__FiltersAndButtons",
|
|
134801
134801
|
componentId: "sc-vv9dzu-1"
|
|
134802
|
-
})(templateObject_3$
|
|
134802
|
+
})(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n"], ["\n margin-bottom: ", "px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n"])), spacingX);
|
|
134803
134803
|
|
|
134804
134804
|
var EditorList = _styled.div.withConfig({
|
|
134805
134805
|
displayName: "NewsEditorDashboard__EditorList",
|
|
134806
134806
|
componentId: "sc-vv9dzu-2"
|
|
134807
|
-
})(templateObject_4$
|
|
134807
|
+
})(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject$l([""], [""])));
|
|
134808
134808
|
|
|
134809
134809
|
var Filters = _styled.div.withConfig({
|
|
134810
134810
|
displayName: "NewsEditorDashboard__Filters",
|
|
@@ -134816,7 +134816,7 @@ var StyledNewArticleButton = _styled(NewArticleButton).withConfig({
|
|
|
134816
134816
|
componentId: "sc-vv9dzu-4"
|
|
134817
134817
|
})(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n align-self: flex-start;\n"], ["\n margin-bottom: ", "px;\n align-self: flex-start;\n"])), spacingXs);
|
|
134818
134818
|
|
|
134819
|
-
var templateObject_1$
|
|
134819
|
+
var templateObject_1$7, templateObject_2$3, templateObject_3$3, templateObject_4$3, templateObject_5$2, templateObject_6$2;
|
|
134820
134820
|
|
|
134821
134821
|
// NOTE: This component exists in this project and not in the ui/common/toolbar because it uses DetailViewContext placed in feature/content/
|
|
134822
134822
|
// Also a generic component `ToolbarLanguageSelector` in ui/common/toolbar complicates the flow and requires some code duplication
|
|
@@ -134857,9 +134857,9 @@ var ToolbarNewsLanguageSelector = function ToolbarNewsLanguageSelector(_a) {
|
|
|
134857
134857
|
var LanguageMenuButton = _styled(LanguageSelector).withConfig({
|
|
134858
134858
|
displayName: "ToolbarNewsLanguageSelector__LanguageMenuButton",
|
|
134859
134859
|
componentId: "sc-1xe5l19-0"
|
|
134860
|
-
})(templateObject_1$
|
|
134860
|
+
})(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject$l(["\n && {\n i {\n font-size: ", "px;\n }\n }\n"], ["\n && {\n i {\n font-size: ", "px;\n }\n }\n"])), fontSizeNormal);
|
|
134861
134861
|
|
|
134862
|
-
var templateObject_1$
|
|
134862
|
+
var templateObject_1$6;
|
|
134863
134863
|
|
|
134864
134864
|
var ToolbarManageNewsItemButton = function ToolbarManageNewsItemButton(_a) {
|
|
134865
134865
|
var onClick = _a.onClick;
|
|
@@ -134955,7 +134955,7 @@ var NewsDetailPreview = function NewsDetailPreview(_a) {
|
|
|
134955
134955
|
}
|
|
134956
134956
|
|
|
134957
134957
|
if (!itemContext) {
|
|
134958
|
-
return jsx$1(Host$
|
|
134958
|
+
return jsx$1(Host$4, __assign$g({
|
|
134959
134959
|
className: className
|
|
134960
134960
|
}, {
|
|
134961
134961
|
children: jsx$1(NewsItemPreviewContextProvider, __assign$g({
|
|
@@ -134967,7 +134967,7 @@ var NewsDetailPreview = function NewsDetailPreview(_a) {
|
|
|
134967
134967
|
}), void 0);
|
|
134968
134968
|
}
|
|
134969
134969
|
|
|
134970
|
-
return jsx$1(Host$
|
|
134970
|
+
return jsx$1(Host$4, __assign$g({
|
|
134971
134971
|
className: className
|
|
134972
134972
|
}, {
|
|
134973
134973
|
children: jsx$1(NewsDetailPreviewInternal, {}, void 0)
|
|
@@ -134982,12 +134982,12 @@ var NewsDetailPreviewInternal = function NewsDetailPreviewInternal() {
|
|
|
134982
134982
|
}), void 0);
|
|
134983
134983
|
};
|
|
134984
134984
|
|
|
134985
|
-
var Host$
|
|
134985
|
+
var Host$4 = _styled.div.withConfig({
|
|
134986
134986
|
displayName: "NewsDetailPreview__Host",
|
|
134987
134987
|
componentId: "sc-17gmqax-0"
|
|
134988
|
-
})(templateObject_1$
|
|
134988
|
+
})(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject$l([""], [""])));
|
|
134989
134989
|
|
|
134990
|
-
var templateObject_1$
|
|
134990
|
+
var templateObject_1$5;
|
|
134991
134991
|
|
|
134992
134992
|
var FilterContext = /*#__PURE__*/createContext(null);
|
|
134993
134993
|
var FilterContextProvider = function FilterContextProvider(_a) {
|
|
@@ -135012,18 +135012,18 @@ var ToolbarFilterPanel = function ToolbarFilterPanel(_a) {
|
|
|
135012
135012
|
filter: filter,
|
|
135013
135013
|
onChange: onChange
|
|
135014
135014
|
}, {
|
|
135015
|
-
children: jsx$1(Host$
|
|
135015
|
+
children: jsx$1(Host$3, {
|
|
135016
135016
|
children: children
|
|
135017
135017
|
}, void 0)
|
|
135018
135018
|
}), void 0);
|
|
135019
135019
|
};
|
|
135020
135020
|
|
|
135021
|
-
var Host$
|
|
135021
|
+
var Host$3 = _styled.div.withConfig({
|
|
135022
135022
|
displayName: "ToolbarFilterPanel__Host",
|
|
135023
135023
|
componentId: "sc-118p488-0"
|
|
135024
|
-
})(templateObject_1$
|
|
135024
|
+
})(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject$l(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
|
|
135025
135025
|
|
|
135026
|
-
var templateObject_1$
|
|
135026
|
+
var templateObject_1$4;
|
|
135027
135027
|
|
|
135028
135028
|
var ChannelFilter = function ChannelFilter(_a) {
|
|
135029
135029
|
var _b, _c;
|
|
@@ -135087,7 +135087,7 @@ var ChannelFilter = function ChannelFilter(_a) {
|
|
|
135087
135087
|
}
|
|
135088
135088
|
}
|
|
135089
135089
|
}, {
|
|
135090
|
-
children: jsxs(Host$
|
|
135090
|
+
children: jsxs(Host$2, {
|
|
135091
135091
|
children: [jsx$1(StyledTextField, {
|
|
135092
135092
|
placeholder: formatMessage({
|
|
135093
135093
|
id: 'Generic.search'
|
|
@@ -135118,7 +135118,7 @@ var ChannelFilter = function ChannelFilter(_a) {
|
|
|
135118
135118
|
checked: checked
|
|
135119
135119
|
}, c.id);
|
|
135120
135120
|
})
|
|
135121
|
-
}, void 0), jsx$1(ClearFilterButton$
|
|
135121
|
+
}, void 0), jsx$1(ClearFilterButton$2, {
|
|
135122
135122
|
text: "Clear filter",
|
|
135123
135123
|
iconProps: {
|
|
135124
135124
|
iconName: 'ClearFilter'
|
|
@@ -135151,20 +135151,20 @@ var ChannelFilter = function ChannelFilter(_a) {
|
|
|
135151
135151
|
}
|
|
135152
135152
|
};
|
|
135153
135153
|
|
|
135154
|
-
var Host$
|
|
135154
|
+
var Host$2 = _styled.div.withConfig({
|
|
135155
135155
|
displayName: "ChannelFilter__Host",
|
|
135156
135156
|
componentId: "sc-1ju8xwz-0"
|
|
135157
|
-
})(templateObject_1$
|
|
135157
|
+
})(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
135158
135158
|
|
|
135159
135159
|
var ChannelsButton = _styled(ActionButton).withConfig({
|
|
135160
135160
|
displayName: "ChannelFilter__ChannelsButton",
|
|
135161
135161
|
componentId: "sc-1ju8xwz-1"
|
|
135162
|
-
})(templateObject_2$
|
|
135162
|
+
})(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject$l(["\n i {\n order: 1;\n }\n"], ["\n i {\n order: 1;\n }\n"])));
|
|
135163
135163
|
|
|
135164
135164
|
var SelectedChannelsLabel = _styled.span.withConfig({
|
|
135165
135165
|
displayName: "ChannelFilter__SelectedChannelsLabel",
|
|
135166
135166
|
componentId: "sc-1ju8xwz-2"
|
|
135167
|
-
})(templateObject_3$
|
|
135167
|
+
})(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject$l(["\n font-weight: bold;\n"], ["\n font-weight: bold;\n"])));
|
|
135168
135168
|
|
|
135169
135169
|
var channelRowHeight = 36;
|
|
135170
135170
|
var visibleChannels = 8;
|
|
@@ -135172,14 +135172,14 @@ var visibleChannels = 8;
|
|
|
135172
135172
|
var Channels = _styled.div.withConfig({
|
|
135173
135173
|
displayName: "ChannelFilter__Channels",
|
|
135174
135174
|
componentId: "sc-1ju8xwz-3"
|
|
135175
|
-
})(templateObject_4$
|
|
135175
|
+
})(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject$l(["\n margin-bottom: ", "px;\n max-height: ", "px;\n overflow-y: auto;\n"], ["\n margin-bottom: ", "px;\n max-height: ", "px;\n overflow-y: auto;\n"])), spacingM, channelRowHeight * visibleChannels);
|
|
135176
135176
|
|
|
135177
135177
|
var StyledCheckbox = _styled(Checkbox).withConfig({
|
|
135178
135178
|
displayName: "ChannelFilter__StyledCheckbox",
|
|
135179
135179
|
componentId: "sc-1ju8xwz-4"
|
|
135180
135180
|
})(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject$l(["\n padding: ", "px 0;\n\n &:first-child {\n padding-top: 0;\n }\n\n &:last-child {\n padding-bottom: 0;\n }\n"], ["\n padding: ", "px 0;\n\n &:first-child {\n padding-top: 0;\n }\n\n &:last-child {\n padding-bottom: 0;\n }\n"])), spacingS - 2);
|
|
135181
135181
|
|
|
135182
|
-
var ClearFilterButton$
|
|
135182
|
+
var ClearFilterButton$2 = _styled(DefaultButton).withConfig({
|
|
135183
135183
|
displayName: "ChannelFilter__ClearFilterButton",
|
|
135184
135184
|
componentId: "sc-1ju8xwz-5"
|
|
135185
135185
|
})(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject$l(["\n margin-left: auto;\n\n .ms-Button-label {\n font-weight: normal;\n }\n"], ["\n margin-left: auto;\n\n .ms-Button-label {\n font-weight: normal;\n }\n"])));
|
|
@@ -135189,7 +135189,7 @@ var StyledTextField = _styled(TextField).withConfig({
|
|
|
135189
135189
|
componentId: "sc-1ju8xwz-6"
|
|
135190
135190
|
})(templateObject_7 || (templateObject_7 = __makeTemplateObject$l(["\n padding-bottom: ", "px;\n"], ["\n padding-bottom: ", "px;\n"])), spacingS);
|
|
135191
135191
|
|
|
135192
|
-
var templateObject_1$
|
|
135192
|
+
var templateObject_1$3, templateObject_2$2, templateObject_3$2, templateObject_4$2, templateObject_5$1, templateObject_6$1, templateObject_7;
|
|
135193
135193
|
|
|
135194
135194
|
function toInteger(dirtyNumber) {
|
|
135195
135195
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
@@ -135371,6 +135371,36 @@ function addMonths(dirtyDate, dirtyAmount) {
|
|
|
135371
135371
|
}
|
|
135372
135372
|
}
|
|
135373
135373
|
|
|
135374
|
+
/**
|
|
135375
|
+
* @name addMilliseconds
|
|
135376
|
+
* @category Millisecond Helpers
|
|
135377
|
+
* @summary Add the specified number of milliseconds to the given date.
|
|
135378
|
+
*
|
|
135379
|
+
* @description
|
|
135380
|
+
* Add the specified number of milliseconds to the given date.
|
|
135381
|
+
*
|
|
135382
|
+
* ### v2.0.0 breaking changes:
|
|
135383
|
+
*
|
|
135384
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
135385
|
+
*
|
|
135386
|
+
* @param {Date|Number} date - the date to be changed
|
|
135387
|
+
* @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
135388
|
+
* @returns {Date} the new date with the milliseconds added
|
|
135389
|
+
* @throws {TypeError} 2 arguments required
|
|
135390
|
+
*
|
|
135391
|
+
* @example
|
|
135392
|
+
* // Add 750 milliseconds to 10 July 2014 12:45:30.000:
|
|
135393
|
+
* const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
135394
|
+
* //=> Thu Jul 10 2014 12:45:30.750
|
|
135395
|
+
*/
|
|
135396
|
+
|
|
135397
|
+
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
135398
|
+
requiredArgs(2, arguments);
|
|
135399
|
+
var timestamp = toDate(dirtyDate).getTime();
|
|
135400
|
+
var amount = toInteger(dirtyAmount);
|
|
135401
|
+
return new Date(timestamp + amount);
|
|
135402
|
+
}
|
|
135403
|
+
|
|
135374
135404
|
/**
|
|
135375
135405
|
* @name startOfWeek
|
|
135376
135406
|
* @category Week Helpers
|
|
@@ -135423,6 +135453,23 @@ function startOfWeek(dirtyDate, dirtyOptions) {
|
|
|
135423
135453
|
return date;
|
|
135424
135454
|
}
|
|
135425
135455
|
|
|
135456
|
+
/**
|
|
135457
|
+
* Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
|
|
135458
|
+
* They usually appear for dates that denote time before the timezones were introduced
|
|
135459
|
+
* (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
|
|
135460
|
+
* and GMT+01:00:00 after that date)
|
|
135461
|
+
*
|
|
135462
|
+
* Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
|
|
135463
|
+
* which would lead to incorrect calculations.
|
|
135464
|
+
*
|
|
135465
|
+
* This function returns the timezone offset in milliseconds that takes seconds in account.
|
|
135466
|
+
*/
|
|
135467
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
135468
|
+
var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
135469
|
+
utcDate.setUTCFullYear(date.getFullYear());
|
|
135470
|
+
return date.getTime() - utcDate.getTime();
|
|
135471
|
+
}
|
|
135472
|
+
|
|
135426
135473
|
/**
|
|
135427
135474
|
* @name startOfDay
|
|
135428
135475
|
* @category Day Helpers
|
|
@@ -135453,6 +135500,117 @@ function startOfDay(dirtyDate) {
|
|
|
135453
135500
|
return date;
|
|
135454
135501
|
}
|
|
135455
135502
|
|
|
135503
|
+
/**
|
|
135504
|
+
* @name isDate
|
|
135505
|
+
* @category Common Helpers
|
|
135506
|
+
* @summary Is the given value a date?
|
|
135507
|
+
*
|
|
135508
|
+
* @description
|
|
135509
|
+
* Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
|
|
135510
|
+
*
|
|
135511
|
+
* ### v2.0.0 breaking changes:
|
|
135512
|
+
*
|
|
135513
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
135514
|
+
*
|
|
135515
|
+
* @param {*} value - the value to check
|
|
135516
|
+
* @returns {boolean} true if the given value is a date
|
|
135517
|
+
* @throws {TypeError} 1 arguments required
|
|
135518
|
+
*
|
|
135519
|
+
* @example
|
|
135520
|
+
* // For a valid date:
|
|
135521
|
+
* const result = isDate(new Date())
|
|
135522
|
+
* //=> true
|
|
135523
|
+
*
|
|
135524
|
+
* @example
|
|
135525
|
+
* // For an invalid date:
|
|
135526
|
+
* const result = isDate(new Date(NaN))
|
|
135527
|
+
* //=> true
|
|
135528
|
+
*
|
|
135529
|
+
* @example
|
|
135530
|
+
* // For some value:
|
|
135531
|
+
* const result = isDate('2014-02-31')
|
|
135532
|
+
* //=> false
|
|
135533
|
+
*
|
|
135534
|
+
* @example
|
|
135535
|
+
* // For an object:
|
|
135536
|
+
* const result = isDate({})
|
|
135537
|
+
* //=> false
|
|
135538
|
+
*/
|
|
135539
|
+
|
|
135540
|
+
function isDate(value) {
|
|
135541
|
+
requiredArgs(1, arguments);
|
|
135542
|
+
return value instanceof Date || typeof value === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
135543
|
+
}
|
|
135544
|
+
|
|
135545
|
+
/**
|
|
135546
|
+
* @name isValid
|
|
135547
|
+
* @category Common Helpers
|
|
135548
|
+
* @summary Is the given date valid?
|
|
135549
|
+
*
|
|
135550
|
+
* @description
|
|
135551
|
+
* Returns false if argument is Invalid Date and true otherwise.
|
|
135552
|
+
* Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
|
|
135553
|
+
* Invalid Date is a Date, whose time value is NaN.
|
|
135554
|
+
*
|
|
135555
|
+
* Time value of Date: http://es5.github.io/#x15.9.1.1
|
|
135556
|
+
*
|
|
135557
|
+
* ### v2.0.0 breaking changes:
|
|
135558
|
+
*
|
|
135559
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
135560
|
+
*
|
|
135561
|
+
* - Now `isValid` doesn't throw an exception
|
|
135562
|
+
* if the first argument is not an instance of Date.
|
|
135563
|
+
* Instead, argument is converted beforehand using `toDate`.
|
|
135564
|
+
*
|
|
135565
|
+
* Examples:
|
|
135566
|
+
*
|
|
135567
|
+
* | `isValid` argument | Before v2.0.0 | v2.0.0 onward |
|
|
135568
|
+
* |---------------------------|---------------|---------------|
|
|
135569
|
+
* | `new Date()` | `true` | `true` |
|
|
135570
|
+
* | `new Date('2016-01-01')` | `true` | `true` |
|
|
135571
|
+
* | `new Date('')` | `false` | `false` |
|
|
135572
|
+
* | `new Date(1488370835081)` | `true` | `true` |
|
|
135573
|
+
* | `new Date(NaN)` | `false` | `false` |
|
|
135574
|
+
* | `'2016-01-01'` | `TypeError` | `false` |
|
|
135575
|
+
* | `''` | `TypeError` | `false` |
|
|
135576
|
+
* | `1488370835081` | `TypeError` | `true` |
|
|
135577
|
+
* | `NaN` | `TypeError` | `false` |
|
|
135578
|
+
*
|
|
135579
|
+
* We introduce this change to make *date-fns* consistent with ECMAScript behavior
|
|
135580
|
+
* that try to coerce arguments to the expected type
|
|
135581
|
+
* (which is also the case with other *date-fns* functions).
|
|
135582
|
+
*
|
|
135583
|
+
* @param {*} date - the date to check
|
|
135584
|
+
* @returns {Boolean} the date is valid
|
|
135585
|
+
* @throws {TypeError} 1 argument required
|
|
135586
|
+
*
|
|
135587
|
+
* @example
|
|
135588
|
+
* // For the valid date:
|
|
135589
|
+
* const result = isValid(new Date(2014, 1, 31))
|
|
135590
|
+
* //=> true
|
|
135591
|
+
*
|
|
135592
|
+
* @example
|
|
135593
|
+
* // For the value, convertable into a date:
|
|
135594
|
+
* const result = isValid(1393804800000)
|
|
135595
|
+
* //=> true
|
|
135596
|
+
*
|
|
135597
|
+
* @example
|
|
135598
|
+
* // For the invalid date:
|
|
135599
|
+
* const result = isValid(new Date(''))
|
|
135600
|
+
* //=> false
|
|
135601
|
+
*/
|
|
135602
|
+
|
|
135603
|
+
function isValid(dirtyDate) {
|
|
135604
|
+
requiredArgs(1, arguments);
|
|
135605
|
+
|
|
135606
|
+
if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
|
|
135607
|
+
return false;
|
|
135608
|
+
}
|
|
135609
|
+
|
|
135610
|
+
var date = toDate(dirtyDate);
|
|
135611
|
+
return !isNaN(Number(date));
|
|
135612
|
+
}
|
|
135613
|
+
|
|
135456
135614
|
/**
|
|
135457
135615
|
* @name endOfDay
|
|
135458
135616
|
* @category Day Helpers
|
|
@@ -135597,6 +135755,2200 @@ function endOfWeek(dirtyDate, dirtyOptions) {
|
|
|
135597
135755
|
return date;
|
|
135598
135756
|
}
|
|
135599
135757
|
|
|
135758
|
+
var formatDistanceLocale = {
|
|
135759
|
+
lessThanXSeconds: {
|
|
135760
|
+
one: 'less than a second',
|
|
135761
|
+
other: 'less than {{count}} seconds'
|
|
135762
|
+
},
|
|
135763
|
+
xSeconds: {
|
|
135764
|
+
one: '1 second',
|
|
135765
|
+
other: '{{count}} seconds'
|
|
135766
|
+
},
|
|
135767
|
+
halfAMinute: 'half a minute',
|
|
135768
|
+
lessThanXMinutes: {
|
|
135769
|
+
one: 'less than a minute',
|
|
135770
|
+
other: 'less than {{count}} minutes'
|
|
135771
|
+
},
|
|
135772
|
+
xMinutes: {
|
|
135773
|
+
one: '1 minute',
|
|
135774
|
+
other: '{{count}} minutes'
|
|
135775
|
+
},
|
|
135776
|
+
aboutXHours: {
|
|
135777
|
+
one: 'about 1 hour',
|
|
135778
|
+
other: 'about {{count}} hours'
|
|
135779
|
+
},
|
|
135780
|
+
xHours: {
|
|
135781
|
+
one: '1 hour',
|
|
135782
|
+
other: '{{count}} hours'
|
|
135783
|
+
},
|
|
135784
|
+
xDays: {
|
|
135785
|
+
one: '1 day',
|
|
135786
|
+
other: '{{count}} days'
|
|
135787
|
+
},
|
|
135788
|
+
aboutXWeeks: {
|
|
135789
|
+
one: 'about 1 week',
|
|
135790
|
+
other: 'about {{count}} weeks'
|
|
135791
|
+
},
|
|
135792
|
+
xWeeks: {
|
|
135793
|
+
one: '1 week',
|
|
135794
|
+
other: '{{count}} weeks'
|
|
135795
|
+
},
|
|
135796
|
+
aboutXMonths: {
|
|
135797
|
+
one: 'about 1 month',
|
|
135798
|
+
other: 'about {{count}} months'
|
|
135799
|
+
},
|
|
135800
|
+
xMonths: {
|
|
135801
|
+
one: '1 month',
|
|
135802
|
+
other: '{{count}} months'
|
|
135803
|
+
},
|
|
135804
|
+
aboutXYears: {
|
|
135805
|
+
one: 'about 1 year',
|
|
135806
|
+
other: 'about {{count}} years'
|
|
135807
|
+
},
|
|
135808
|
+
xYears: {
|
|
135809
|
+
one: '1 year',
|
|
135810
|
+
other: '{{count}} years'
|
|
135811
|
+
},
|
|
135812
|
+
overXYears: {
|
|
135813
|
+
one: 'over 1 year',
|
|
135814
|
+
other: 'over {{count}} years'
|
|
135815
|
+
},
|
|
135816
|
+
almostXYears: {
|
|
135817
|
+
one: 'almost 1 year',
|
|
135818
|
+
other: 'almost {{count}} years'
|
|
135819
|
+
}
|
|
135820
|
+
};
|
|
135821
|
+
|
|
135822
|
+
var formatDistance = function (token, count, options) {
|
|
135823
|
+
var result;
|
|
135824
|
+
var tokenValue = formatDistanceLocale[token];
|
|
135825
|
+
|
|
135826
|
+
if (typeof tokenValue === 'string') {
|
|
135827
|
+
result = tokenValue;
|
|
135828
|
+
} else if (count === 1) {
|
|
135829
|
+
result = tokenValue.one;
|
|
135830
|
+
} else {
|
|
135831
|
+
result = tokenValue.other.replace('{{count}}', count.toString());
|
|
135832
|
+
}
|
|
135833
|
+
|
|
135834
|
+
if (options !== null && options !== void 0 && options.addSuffix) {
|
|
135835
|
+
if (options.comparison && options.comparison > 0) {
|
|
135836
|
+
return 'in ' + result;
|
|
135837
|
+
} else {
|
|
135838
|
+
return result + ' ago';
|
|
135839
|
+
}
|
|
135840
|
+
}
|
|
135841
|
+
|
|
135842
|
+
return result;
|
|
135843
|
+
};
|
|
135844
|
+
|
|
135845
|
+
var formatDistance$1 = formatDistance;
|
|
135846
|
+
|
|
135847
|
+
function buildFormatLongFn(args) {
|
|
135848
|
+
return function () {
|
|
135849
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
135850
|
+
// TODO: Remove String()
|
|
135851
|
+
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
135852
|
+
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
135853
|
+
return format;
|
|
135854
|
+
};
|
|
135855
|
+
}
|
|
135856
|
+
|
|
135857
|
+
var dateFormats = {
|
|
135858
|
+
full: 'EEEE, MMMM do, y',
|
|
135859
|
+
long: 'MMMM do, y',
|
|
135860
|
+
medium: 'MMM d, y',
|
|
135861
|
+
short: 'MM/dd/yyyy'
|
|
135862
|
+
};
|
|
135863
|
+
var timeFormats = {
|
|
135864
|
+
full: 'h:mm:ss a zzzz',
|
|
135865
|
+
long: 'h:mm:ss a z',
|
|
135866
|
+
medium: 'h:mm:ss a',
|
|
135867
|
+
short: 'h:mm a'
|
|
135868
|
+
};
|
|
135869
|
+
var dateTimeFormats = {
|
|
135870
|
+
full: "{{date}} 'at' {{time}}",
|
|
135871
|
+
long: "{{date}} 'at' {{time}}",
|
|
135872
|
+
medium: '{{date}}, {{time}}',
|
|
135873
|
+
short: '{{date}}, {{time}}'
|
|
135874
|
+
};
|
|
135875
|
+
var formatLong = {
|
|
135876
|
+
date: buildFormatLongFn({
|
|
135877
|
+
formats: dateFormats,
|
|
135878
|
+
defaultWidth: 'full'
|
|
135879
|
+
}),
|
|
135880
|
+
time: buildFormatLongFn({
|
|
135881
|
+
formats: timeFormats,
|
|
135882
|
+
defaultWidth: 'full'
|
|
135883
|
+
}),
|
|
135884
|
+
dateTime: buildFormatLongFn({
|
|
135885
|
+
formats: dateTimeFormats,
|
|
135886
|
+
defaultWidth: 'full'
|
|
135887
|
+
})
|
|
135888
|
+
};
|
|
135889
|
+
var formatLong$1 = formatLong;
|
|
135890
|
+
|
|
135891
|
+
var formatRelativeLocale = {
|
|
135892
|
+
lastWeek: "'last' eeee 'at' p",
|
|
135893
|
+
yesterday: "'yesterday at' p",
|
|
135894
|
+
today: "'today at' p",
|
|
135895
|
+
tomorrow: "'tomorrow at' p",
|
|
135896
|
+
nextWeek: "eeee 'at' p",
|
|
135897
|
+
other: 'P'
|
|
135898
|
+
};
|
|
135899
|
+
|
|
135900
|
+
var formatRelative = function (token, _date, _baseDate, _options) {
|
|
135901
|
+
return formatRelativeLocale[token];
|
|
135902
|
+
};
|
|
135903
|
+
|
|
135904
|
+
var formatRelative$1 = formatRelative;
|
|
135905
|
+
|
|
135906
|
+
function buildLocalizeFn(args) {
|
|
135907
|
+
return function (dirtyIndex, dirtyOptions) {
|
|
135908
|
+
var options = dirtyOptions || {};
|
|
135909
|
+
var context = options.context ? String(options.context) : 'standalone';
|
|
135910
|
+
var valuesArray;
|
|
135911
|
+
|
|
135912
|
+
if (context === 'formatting' && args.formattingValues) {
|
|
135913
|
+
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
135914
|
+
var width = options.width ? String(options.width) : defaultWidth;
|
|
135915
|
+
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
135916
|
+
} else {
|
|
135917
|
+
var _defaultWidth = args.defaultWidth;
|
|
135918
|
+
|
|
135919
|
+
var _width = options.width ? String(options.width) : args.defaultWidth;
|
|
135920
|
+
|
|
135921
|
+
valuesArray = args.values[_width] || args.values[_defaultWidth];
|
|
135922
|
+
}
|
|
135923
|
+
|
|
135924
|
+
var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challange you to try to remove it!
|
|
135925
|
+
|
|
135926
|
+
return valuesArray[index];
|
|
135927
|
+
};
|
|
135928
|
+
}
|
|
135929
|
+
|
|
135930
|
+
var eraValues = {
|
|
135931
|
+
narrow: ['B', 'A'],
|
|
135932
|
+
abbreviated: ['BC', 'AD'],
|
|
135933
|
+
wide: ['Before Christ', 'Anno Domini']
|
|
135934
|
+
};
|
|
135935
|
+
var quarterValues = {
|
|
135936
|
+
narrow: ['1', '2', '3', '4'],
|
|
135937
|
+
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],
|
|
135938
|
+
wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']
|
|
135939
|
+
}; // Note: in English, the names of days of the week and months are capitalized.
|
|
135940
|
+
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
135941
|
+
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
135942
|
+
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
135943
|
+
|
|
135944
|
+
var monthValues = {
|
|
135945
|
+
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
135946
|
+
abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
135947
|
+
wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
|
135948
|
+
};
|
|
135949
|
+
var dayValues = {
|
|
135950
|
+
narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
|
|
135951
|
+
short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
|
135952
|
+
abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
135953
|
+
wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
|
135954
|
+
};
|
|
135955
|
+
var dayPeriodValues = {
|
|
135956
|
+
narrow: {
|
|
135957
|
+
am: 'a',
|
|
135958
|
+
pm: 'p',
|
|
135959
|
+
midnight: 'mi',
|
|
135960
|
+
noon: 'n',
|
|
135961
|
+
morning: 'morning',
|
|
135962
|
+
afternoon: 'afternoon',
|
|
135963
|
+
evening: 'evening',
|
|
135964
|
+
night: 'night'
|
|
135965
|
+
},
|
|
135966
|
+
abbreviated: {
|
|
135967
|
+
am: 'AM',
|
|
135968
|
+
pm: 'PM',
|
|
135969
|
+
midnight: 'midnight',
|
|
135970
|
+
noon: 'noon',
|
|
135971
|
+
morning: 'morning',
|
|
135972
|
+
afternoon: 'afternoon',
|
|
135973
|
+
evening: 'evening',
|
|
135974
|
+
night: 'night'
|
|
135975
|
+
},
|
|
135976
|
+
wide: {
|
|
135977
|
+
am: 'a.m.',
|
|
135978
|
+
pm: 'p.m.',
|
|
135979
|
+
midnight: 'midnight',
|
|
135980
|
+
noon: 'noon',
|
|
135981
|
+
morning: 'morning',
|
|
135982
|
+
afternoon: 'afternoon',
|
|
135983
|
+
evening: 'evening',
|
|
135984
|
+
night: 'night'
|
|
135985
|
+
}
|
|
135986
|
+
};
|
|
135987
|
+
var formattingDayPeriodValues = {
|
|
135988
|
+
narrow: {
|
|
135989
|
+
am: 'a',
|
|
135990
|
+
pm: 'p',
|
|
135991
|
+
midnight: 'mi',
|
|
135992
|
+
noon: 'n',
|
|
135993
|
+
morning: 'in the morning',
|
|
135994
|
+
afternoon: 'in the afternoon',
|
|
135995
|
+
evening: 'in the evening',
|
|
135996
|
+
night: 'at night'
|
|
135997
|
+
},
|
|
135998
|
+
abbreviated: {
|
|
135999
|
+
am: 'AM',
|
|
136000
|
+
pm: 'PM',
|
|
136001
|
+
midnight: 'midnight',
|
|
136002
|
+
noon: 'noon',
|
|
136003
|
+
morning: 'in the morning',
|
|
136004
|
+
afternoon: 'in the afternoon',
|
|
136005
|
+
evening: 'in the evening',
|
|
136006
|
+
night: 'at night'
|
|
136007
|
+
},
|
|
136008
|
+
wide: {
|
|
136009
|
+
am: 'a.m.',
|
|
136010
|
+
pm: 'p.m.',
|
|
136011
|
+
midnight: 'midnight',
|
|
136012
|
+
noon: 'noon',
|
|
136013
|
+
morning: 'in the morning',
|
|
136014
|
+
afternoon: 'in the afternoon',
|
|
136015
|
+
evening: 'in the evening',
|
|
136016
|
+
night: 'at night'
|
|
136017
|
+
}
|
|
136018
|
+
};
|
|
136019
|
+
|
|
136020
|
+
var ordinalNumber = function (dirtyNumber, _options) {
|
|
136021
|
+
var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,
|
|
136022
|
+
// if they are different for different grammatical genders,
|
|
136023
|
+
// use `options.unit`.
|
|
136024
|
+
//
|
|
136025
|
+
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
|
|
136026
|
+
// 'day', 'hour', 'minute', 'second'.
|
|
136027
|
+
|
|
136028
|
+
var rem100 = number % 100;
|
|
136029
|
+
|
|
136030
|
+
if (rem100 > 20 || rem100 < 10) {
|
|
136031
|
+
switch (rem100 % 10) {
|
|
136032
|
+
case 1:
|
|
136033
|
+
return number + 'st';
|
|
136034
|
+
|
|
136035
|
+
case 2:
|
|
136036
|
+
return number + 'nd';
|
|
136037
|
+
|
|
136038
|
+
case 3:
|
|
136039
|
+
return number + 'rd';
|
|
136040
|
+
}
|
|
136041
|
+
}
|
|
136042
|
+
|
|
136043
|
+
return number + 'th';
|
|
136044
|
+
};
|
|
136045
|
+
|
|
136046
|
+
var localize = {
|
|
136047
|
+
ordinalNumber: ordinalNumber,
|
|
136048
|
+
era: buildLocalizeFn({
|
|
136049
|
+
values: eraValues,
|
|
136050
|
+
defaultWidth: 'wide'
|
|
136051
|
+
}),
|
|
136052
|
+
quarter: buildLocalizeFn({
|
|
136053
|
+
values: quarterValues,
|
|
136054
|
+
defaultWidth: 'wide',
|
|
136055
|
+
argumentCallback: function (quarter) {
|
|
136056
|
+
return quarter - 1;
|
|
136057
|
+
}
|
|
136058
|
+
}),
|
|
136059
|
+
month: buildLocalizeFn({
|
|
136060
|
+
values: monthValues,
|
|
136061
|
+
defaultWidth: 'wide'
|
|
136062
|
+
}),
|
|
136063
|
+
day: buildLocalizeFn({
|
|
136064
|
+
values: dayValues,
|
|
136065
|
+
defaultWidth: 'wide'
|
|
136066
|
+
}),
|
|
136067
|
+
dayPeriod: buildLocalizeFn({
|
|
136068
|
+
values: dayPeriodValues,
|
|
136069
|
+
defaultWidth: 'wide',
|
|
136070
|
+
formattingValues: formattingDayPeriodValues,
|
|
136071
|
+
defaultFormattingWidth: 'wide'
|
|
136072
|
+
})
|
|
136073
|
+
};
|
|
136074
|
+
var localize$1 = localize;
|
|
136075
|
+
|
|
136076
|
+
function buildMatchFn(args) {
|
|
136077
|
+
return function (string) {
|
|
136078
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
136079
|
+
var width = options.width;
|
|
136080
|
+
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
136081
|
+
var matchResult = string.match(matchPattern);
|
|
136082
|
+
|
|
136083
|
+
if (!matchResult) {
|
|
136084
|
+
return null;
|
|
136085
|
+
}
|
|
136086
|
+
|
|
136087
|
+
var matchedString = matchResult[0];
|
|
136088
|
+
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
136089
|
+
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
|
|
136090
|
+
return pattern.test(matchedString);
|
|
136091
|
+
}) : findKey(parsePatterns, function (pattern) {
|
|
136092
|
+
return pattern.test(matchedString);
|
|
136093
|
+
});
|
|
136094
|
+
var value;
|
|
136095
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
136096
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
136097
|
+
var rest = string.slice(matchedString.length);
|
|
136098
|
+
return {
|
|
136099
|
+
value: value,
|
|
136100
|
+
rest: rest
|
|
136101
|
+
};
|
|
136102
|
+
};
|
|
136103
|
+
}
|
|
136104
|
+
|
|
136105
|
+
function findKey(object, predicate) {
|
|
136106
|
+
for (var key in object) {
|
|
136107
|
+
if (object.hasOwnProperty(key) && predicate(object[key])) {
|
|
136108
|
+
return key;
|
|
136109
|
+
}
|
|
136110
|
+
}
|
|
136111
|
+
|
|
136112
|
+
return undefined;
|
|
136113
|
+
}
|
|
136114
|
+
|
|
136115
|
+
function findIndex(array, predicate) {
|
|
136116
|
+
for (var key = 0; key < array.length; key++) {
|
|
136117
|
+
if (predicate(array[key])) {
|
|
136118
|
+
return key;
|
|
136119
|
+
}
|
|
136120
|
+
}
|
|
136121
|
+
|
|
136122
|
+
return undefined;
|
|
136123
|
+
}
|
|
136124
|
+
|
|
136125
|
+
function buildMatchPatternFn(args) {
|
|
136126
|
+
return function (string) {
|
|
136127
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
136128
|
+
var matchResult = string.match(args.matchPattern);
|
|
136129
|
+
if (!matchResult) return null;
|
|
136130
|
+
var matchedString = matchResult[0];
|
|
136131
|
+
var parseResult = string.match(args.parsePattern);
|
|
136132
|
+
if (!parseResult) return null;
|
|
136133
|
+
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
136134
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
136135
|
+
var rest = string.slice(matchedString.length);
|
|
136136
|
+
return {
|
|
136137
|
+
value: value,
|
|
136138
|
+
rest: rest
|
|
136139
|
+
};
|
|
136140
|
+
};
|
|
136141
|
+
}
|
|
136142
|
+
|
|
136143
|
+
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
136144
|
+
var parseOrdinalNumberPattern = /\d+/i;
|
|
136145
|
+
var matchEraPatterns = {
|
|
136146
|
+
narrow: /^(b|a)/i,
|
|
136147
|
+
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
136148
|
+
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
136149
|
+
};
|
|
136150
|
+
var parseEraPatterns = {
|
|
136151
|
+
any: [/^b/i, /^(a|c)/i]
|
|
136152
|
+
};
|
|
136153
|
+
var matchQuarterPatterns = {
|
|
136154
|
+
narrow: /^[1234]/i,
|
|
136155
|
+
abbreviated: /^q[1234]/i,
|
|
136156
|
+
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
136157
|
+
};
|
|
136158
|
+
var parseQuarterPatterns = {
|
|
136159
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
136160
|
+
};
|
|
136161
|
+
var matchMonthPatterns = {
|
|
136162
|
+
narrow: /^[jfmasond]/i,
|
|
136163
|
+
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
136164
|
+
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
136165
|
+
};
|
|
136166
|
+
var parseMonthPatterns = {
|
|
136167
|
+
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
136168
|
+
any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
136169
|
+
};
|
|
136170
|
+
var matchDayPatterns = {
|
|
136171
|
+
narrow: /^[smtwf]/i,
|
|
136172
|
+
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
136173
|
+
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
136174
|
+
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
136175
|
+
};
|
|
136176
|
+
var parseDayPatterns = {
|
|
136177
|
+
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
136178
|
+
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
136179
|
+
};
|
|
136180
|
+
var matchDayPeriodPatterns = {
|
|
136181
|
+
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
136182
|
+
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
136183
|
+
};
|
|
136184
|
+
var parseDayPeriodPatterns = {
|
|
136185
|
+
any: {
|
|
136186
|
+
am: /^a/i,
|
|
136187
|
+
pm: /^p/i,
|
|
136188
|
+
midnight: /^mi/i,
|
|
136189
|
+
noon: /^no/i,
|
|
136190
|
+
morning: /morning/i,
|
|
136191
|
+
afternoon: /afternoon/i,
|
|
136192
|
+
evening: /evening/i,
|
|
136193
|
+
night: /night/i
|
|
136194
|
+
}
|
|
136195
|
+
};
|
|
136196
|
+
var match = {
|
|
136197
|
+
ordinalNumber: buildMatchPatternFn({
|
|
136198
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
136199
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
136200
|
+
valueCallback: function (value) {
|
|
136201
|
+
return parseInt(value, 10);
|
|
136202
|
+
}
|
|
136203
|
+
}),
|
|
136204
|
+
era: buildMatchFn({
|
|
136205
|
+
matchPatterns: matchEraPatterns,
|
|
136206
|
+
defaultMatchWidth: 'wide',
|
|
136207
|
+
parsePatterns: parseEraPatterns,
|
|
136208
|
+
defaultParseWidth: 'any'
|
|
136209
|
+
}),
|
|
136210
|
+
quarter: buildMatchFn({
|
|
136211
|
+
matchPatterns: matchQuarterPatterns,
|
|
136212
|
+
defaultMatchWidth: 'wide',
|
|
136213
|
+
parsePatterns: parseQuarterPatterns,
|
|
136214
|
+
defaultParseWidth: 'any',
|
|
136215
|
+
valueCallback: function (index) {
|
|
136216
|
+
return index + 1;
|
|
136217
|
+
}
|
|
136218
|
+
}),
|
|
136219
|
+
month: buildMatchFn({
|
|
136220
|
+
matchPatterns: matchMonthPatterns,
|
|
136221
|
+
defaultMatchWidth: 'wide',
|
|
136222
|
+
parsePatterns: parseMonthPatterns,
|
|
136223
|
+
defaultParseWidth: 'any'
|
|
136224
|
+
}),
|
|
136225
|
+
day: buildMatchFn({
|
|
136226
|
+
matchPatterns: matchDayPatterns,
|
|
136227
|
+
defaultMatchWidth: 'wide',
|
|
136228
|
+
parsePatterns: parseDayPatterns,
|
|
136229
|
+
defaultParseWidth: 'any'
|
|
136230
|
+
}),
|
|
136231
|
+
dayPeriod: buildMatchFn({
|
|
136232
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
136233
|
+
defaultMatchWidth: 'any',
|
|
136234
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
136235
|
+
defaultParseWidth: 'any'
|
|
136236
|
+
})
|
|
136237
|
+
};
|
|
136238
|
+
var match$1 = match;
|
|
136239
|
+
|
|
136240
|
+
/**
|
|
136241
|
+
* @type {Locale}
|
|
136242
|
+
* @category Locales
|
|
136243
|
+
* @summary English locale (United States).
|
|
136244
|
+
* @language English
|
|
136245
|
+
* @iso-639-2 eng
|
|
136246
|
+
* @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
|
|
136247
|
+
* @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
|
|
136248
|
+
*/
|
|
136249
|
+
var locale = {
|
|
136250
|
+
code: 'en-US',
|
|
136251
|
+
formatDistance: formatDistance$1,
|
|
136252
|
+
formatLong: formatLong$1,
|
|
136253
|
+
formatRelative: formatRelative$1,
|
|
136254
|
+
localize: localize$1,
|
|
136255
|
+
match: match$1,
|
|
136256
|
+
options: {
|
|
136257
|
+
weekStartsOn: 0
|
|
136258
|
+
/* Sunday */
|
|
136259
|
+
,
|
|
136260
|
+
firstWeekContainsDate: 1
|
|
136261
|
+
}
|
|
136262
|
+
};
|
|
136263
|
+
var defaultLocale = locale;
|
|
136264
|
+
|
|
136265
|
+
/**
|
|
136266
|
+
* @name subMilliseconds
|
|
136267
|
+
* @category Millisecond Helpers
|
|
136268
|
+
* @summary Subtract the specified number of milliseconds from the given date.
|
|
136269
|
+
*
|
|
136270
|
+
* @description
|
|
136271
|
+
* Subtract the specified number of milliseconds from the given date.
|
|
136272
|
+
*
|
|
136273
|
+
* ### v2.0.0 breaking changes:
|
|
136274
|
+
*
|
|
136275
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
136276
|
+
*
|
|
136277
|
+
* @param {Date|Number} date - the date to be changed
|
|
136278
|
+
* @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
|
|
136279
|
+
* @returns {Date} the new date with the milliseconds subtracted
|
|
136280
|
+
* @throws {TypeError} 2 arguments required
|
|
136281
|
+
*
|
|
136282
|
+
* @example
|
|
136283
|
+
* // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
|
|
136284
|
+
* const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
136285
|
+
* //=> Thu Jul 10 2014 12:45:29.250
|
|
136286
|
+
*/
|
|
136287
|
+
|
|
136288
|
+
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
136289
|
+
requiredArgs(2, arguments);
|
|
136290
|
+
var amount = toInteger(dirtyAmount);
|
|
136291
|
+
return addMilliseconds(dirtyDate, -amount);
|
|
136292
|
+
}
|
|
136293
|
+
|
|
136294
|
+
function addLeadingZeros(number, targetLength) {
|
|
136295
|
+
var sign = number < 0 ? '-' : '';
|
|
136296
|
+
var output = Math.abs(number).toString();
|
|
136297
|
+
|
|
136298
|
+
while (output.length < targetLength) {
|
|
136299
|
+
output = '0' + output;
|
|
136300
|
+
}
|
|
136301
|
+
|
|
136302
|
+
return sign + output;
|
|
136303
|
+
}
|
|
136304
|
+
|
|
136305
|
+
/*
|
|
136306
|
+
* | | Unit | | Unit |
|
|
136307
|
+
* |-----|--------------------------------|-----|--------------------------------|
|
|
136308
|
+
* | a | AM, PM | A* | |
|
|
136309
|
+
* | d | Day of month | D | |
|
|
136310
|
+
* | h | Hour [1-12] | H | Hour [0-23] |
|
|
136311
|
+
* | m | Minute | M | Month |
|
|
136312
|
+
* | s | Second | S | Fraction of second |
|
|
136313
|
+
* | y | Year (abs) | Y | |
|
|
136314
|
+
*
|
|
136315
|
+
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
136316
|
+
*/
|
|
136317
|
+
|
|
136318
|
+
var formatters$2 = {
|
|
136319
|
+
// Year
|
|
136320
|
+
y: function (date, token) {
|
|
136321
|
+
// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
|
|
136322
|
+
// | Year | y | yy | yyy | yyyy | yyyyy |
|
|
136323
|
+
// |----------|-------|----|-------|-------|-------|
|
|
136324
|
+
// | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
|
|
136325
|
+
// | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
|
|
136326
|
+
// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
|
|
136327
|
+
// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
|
|
136328
|
+
// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
|
|
136329
|
+
var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
136330
|
+
|
|
136331
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
136332
|
+
return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
|
|
136333
|
+
},
|
|
136334
|
+
// Month
|
|
136335
|
+
M: function (date, token) {
|
|
136336
|
+
var month = date.getUTCMonth();
|
|
136337
|
+
return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
136338
|
+
},
|
|
136339
|
+
// Day of the month
|
|
136340
|
+
d: function (date, token) {
|
|
136341
|
+
return addLeadingZeros(date.getUTCDate(), token.length);
|
|
136342
|
+
},
|
|
136343
|
+
// AM or PM
|
|
136344
|
+
a: function (date, token) {
|
|
136345
|
+
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
|
|
136346
|
+
|
|
136347
|
+
switch (token) {
|
|
136348
|
+
case 'a':
|
|
136349
|
+
case 'aa':
|
|
136350
|
+
return dayPeriodEnumValue.toUpperCase();
|
|
136351
|
+
|
|
136352
|
+
case 'aaa':
|
|
136353
|
+
return dayPeriodEnumValue;
|
|
136354
|
+
|
|
136355
|
+
case 'aaaaa':
|
|
136356
|
+
return dayPeriodEnumValue[0];
|
|
136357
|
+
|
|
136358
|
+
case 'aaaa':
|
|
136359
|
+
default:
|
|
136360
|
+
return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
|
|
136361
|
+
}
|
|
136362
|
+
},
|
|
136363
|
+
// Hour [1-12]
|
|
136364
|
+
h: function (date, token) {
|
|
136365
|
+
return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
|
|
136366
|
+
},
|
|
136367
|
+
// Hour [0-23]
|
|
136368
|
+
H: function (date, token) {
|
|
136369
|
+
return addLeadingZeros(date.getUTCHours(), token.length);
|
|
136370
|
+
},
|
|
136371
|
+
// Minute
|
|
136372
|
+
m: function (date, token) {
|
|
136373
|
+
return addLeadingZeros(date.getUTCMinutes(), token.length);
|
|
136374
|
+
},
|
|
136375
|
+
// Second
|
|
136376
|
+
s: function (date, token) {
|
|
136377
|
+
return addLeadingZeros(date.getUTCSeconds(), token.length);
|
|
136378
|
+
},
|
|
136379
|
+
// Fraction of second
|
|
136380
|
+
S: function (date, token) {
|
|
136381
|
+
var numberOfDigits = token.length;
|
|
136382
|
+
var milliseconds = date.getUTCMilliseconds();
|
|
136383
|
+
var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
|
|
136384
|
+
return addLeadingZeros(fractionalSeconds, token.length);
|
|
136385
|
+
}
|
|
136386
|
+
};
|
|
136387
|
+
var formatters$3 = formatters$2;
|
|
136388
|
+
|
|
136389
|
+
var MILLISECONDS_IN_DAY = 86400000; // This function will be a part of public API when UTC function will be implemented.
|
|
136390
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136391
|
+
|
|
136392
|
+
function getUTCDayOfYear(dirtyDate) {
|
|
136393
|
+
requiredArgs(1, arguments);
|
|
136394
|
+
var date = toDate(dirtyDate);
|
|
136395
|
+
var timestamp = date.getTime();
|
|
136396
|
+
date.setUTCMonth(0, 1);
|
|
136397
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
136398
|
+
var startOfYearTimestamp = date.getTime();
|
|
136399
|
+
var difference = timestamp - startOfYearTimestamp;
|
|
136400
|
+
return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;
|
|
136401
|
+
}
|
|
136402
|
+
|
|
136403
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136404
|
+
|
|
136405
|
+
function startOfUTCISOWeek(dirtyDate) {
|
|
136406
|
+
requiredArgs(1, arguments);
|
|
136407
|
+
var weekStartsOn = 1;
|
|
136408
|
+
var date = toDate(dirtyDate);
|
|
136409
|
+
var day = date.getUTCDay();
|
|
136410
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
136411
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
|
136412
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
136413
|
+
return date;
|
|
136414
|
+
}
|
|
136415
|
+
|
|
136416
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136417
|
+
|
|
136418
|
+
function getUTCISOWeekYear(dirtyDate) {
|
|
136419
|
+
requiredArgs(1, arguments);
|
|
136420
|
+
var date = toDate(dirtyDate);
|
|
136421
|
+
var year = date.getUTCFullYear();
|
|
136422
|
+
var fourthOfJanuaryOfNextYear = new Date(0);
|
|
136423
|
+
fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);
|
|
136424
|
+
fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
136425
|
+
var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);
|
|
136426
|
+
var fourthOfJanuaryOfThisYear = new Date(0);
|
|
136427
|
+
fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
|
|
136428
|
+
fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
136429
|
+
var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
|
|
136430
|
+
|
|
136431
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
136432
|
+
return year + 1;
|
|
136433
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
136434
|
+
return year;
|
|
136435
|
+
} else {
|
|
136436
|
+
return year - 1;
|
|
136437
|
+
}
|
|
136438
|
+
}
|
|
136439
|
+
|
|
136440
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136441
|
+
|
|
136442
|
+
function startOfUTCISOWeekYear(dirtyDate) {
|
|
136443
|
+
requiredArgs(1, arguments);
|
|
136444
|
+
var year = getUTCISOWeekYear(dirtyDate);
|
|
136445
|
+
var fourthOfJanuary = new Date(0);
|
|
136446
|
+
fourthOfJanuary.setUTCFullYear(year, 0, 4);
|
|
136447
|
+
fourthOfJanuary.setUTCHours(0, 0, 0, 0);
|
|
136448
|
+
var date = startOfUTCISOWeek(fourthOfJanuary);
|
|
136449
|
+
return date;
|
|
136450
|
+
}
|
|
136451
|
+
|
|
136452
|
+
var MILLISECONDS_IN_WEEK$1 = 604800000; // This function will be a part of public API when UTC function will be implemented.
|
|
136453
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136454
|
+
|
|
136455
|
+
function getUTCISOWeek(dirtyDate) {
|
|
136456
|
+
requiredArgs(1, arguments);
|
|
136457
|
+
var date = toDate(dirtyDate);
|
|
136458
|
+
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer
|
|
136459
|
+
// because the number of milliseconds in a week is not constant
|
|
136460
|
+
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
136461
|
+
|
|
136462
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
|
|
136463
|
+
}
|
|
136464
|
+
|
|
136465
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136466
|
+
|
|
136467
|
+
function startOfUTCWeek(dirtyDate, dirtyOptions) {
|
|
136468
|
+
requiredArgs(1, arguments);
|
|
136469
|
+
var options = dirtyOptions || {};
|
|
136470
|
+
var locale = options.locale;
|
|
136471
|
+
var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;
|
|
136472
|
+
var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
|
|
136473
|
+
var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
136474
|
+
|
|
136475
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
136476
|
+
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
136477
|
+
}
|
|
136478
|
+
|
|
136479
|
+
var date = toDate(dirtyDate);
|
|
136480
|
+
var day = date.getUTCDay();
|
|
136481
|
+
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
136482
|
+
date.setUTCDate(date.getUTCDate() - diff);
|
|
136483
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
136484
|
+
return date;
|
|
136485
|
+
}
|
|
136486
|
+
|
|
136487
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136488
|
+
|
|
136489
|
+
function getUTCWeekYear(dirtyDate, dirtyOptions) {
|
|
136490
|
+
requiredArgs(1, arguments);
|
|
136491
|
+
var date = toDate(dirtyDate, dirtyOptions);
|
|
136492
|
+
var year = date.getUTCFullYear();
|
|
136493
|
+
var options = dirtyOptions || {};
|
|
136494
|
+
var locale = options.locale;
|
|
136495
|
+
var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;
|
|
136496
|
+
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
|
136497
|
+
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
136498
|
+
|
|
136499
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
136500
|
+
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
136501
|
+
}
|
|
136502
|
+
|
|
136503
|
+
var firstWeekOfNextYear = new Date(0);
|
|
136504
|
+
firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
|
|
136505
|
+
firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
136506
|
+
var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, dirtyOptions);
|
|
136507
|
+
var firstWeekOfThisYear = new Date(0);
|
|
136508
|
+
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
136509
|
+
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
136510
|
+
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, dirtyOptions);
|
|
136511
|
+
|
|
136512
|
+
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
136513
|
+
return year + 1;
|
|
136514
|
+
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
136515
|
+
return year;
|
|
136516
|
+
} else {
|
|
136517
|
+
return year - 1;
|
|
136518
|
+
}
|
|
136519
|
+
}
|
|
136520
|
+
|
|
136521
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136522
|
+
|
|
136523
|
+
function startOfUTCWeekYear(dirtyDate, dirtyOptions) {
|
|
136524
|
+
requiredArgs(1, arguments);
|
|
136525
|
+
var options = dirtyOptions || {};
|
|
136526
|
+
var locale = options.locale;
|
|
136527
|
+
var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;
|
|
136528
|
+
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
|
136529
|
+
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);
|
|
136530
|
+
var year = getUTCWeekYear(dirtyDate, dirtyOptions);
|
|
136531
|
+
var firstWeek = new Date(0);
|
|
136532
|
+
firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
136533
|
+
firstWeek.setUTCHours(0, 0, 0, 0);
|
|
136534
|
+
var date = startOfUTCWeek(firstWeek, dirtyOptions);
|
|
136535
|
+
return date;
|
|
136536
|
+
}
|
|
136537
|
+
|
|
136538
|
+
var MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.
|
|
136539
|
+
// See issue: https://github.com/date-fns/date-fns/issues/376
|
|
136540
|
+
|
|
136541
|
+
function getUTCWeek(dirtyDate, options) {
|
|
136542
|
+
requiredArgs(1, arguments);
|
|
136543
|
+
var date = toDate(dirtyDate);
|
|
136544
|
+
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer
|
|
136545
|
+
// because the number of milliseconds in a week is not constant
|
|
136546
|
+
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
136547
|
+
|
|
136548
|
+
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
|
136549
|
+
}
|
|
136550
|
+
|
|
136551
|
+
var dayPeriodEnum = {
|
|
136552
|
+
am: 'am',
|
|
136553
|
+
pm: 'pm',
|
|
136554
|
+
midnight: 'midnight',
|
|
136555
|
+
noon: 'noon',
|
|
136556
|
+
morning: 'morning',
|
|
136557
|
+
afternoon: 'afternoon',
|
|
136558
|
+
evening: 'evening',
|
|
136559
|
+
night: 'night'
|
|
136560
|
+
};
|
|
136561
|
+
/*
|
|
136562
|
+
* | | Unit | | Unit |
|
|
136563
|
+
* |-----|--------------------------------|-----|--------------------------------|
|
|
136564
|
+
* | a | AM, PM | A* | Milliseconds in day |
|
|
136565
|
+
* | b | AM, PM, noon, midnight | B | Flexible day period |
|
|
136566
|
+
* | c | Stand-alone local day of week | C* | Localized hour w/ day period |
|
|
136567
|
+
* | d | Day of month | D | Day of year |
|
|
136568
|
+
* | e | Local day of week | E | Day of week |
|
|
136569
|
+
* | f | | F* | Day of week in month |
|
|
136570
|
+
* | g* | Modified Julian day | G | Era |
|
|
136571
|
+
* | h | Hour [1-12] | H | Hour [0-23] |
|
|
136572
|
+
* | i! | ISO day of week | I! | ISO week of year |
|
|
136573
|
+
* | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
|
|
136574
|
+
* | k | Hour [1-24] | K | Hour [0-11] |
|
|
136575
|
+
* | l* | (deprecated) | L | Stand-alone month |
|
|
136576
|
+
* | m | Minute | M | Month |
|
|
136577
|
+
* | n | | N | |
|
|
136578
|
+
* | o! | Ordinal number modifier | O | Timezone (GMT) |
|
|
136579
|
+
* | p! | Long localized time | P! | Long localized date |
|
|
136580
|
+
* | q | Stand-alone quarter | Q | Quarter |
|
|
136581
|
+
* | r* | Related Gregorian year | R! | ISO week-numbering year |
|
|
136582
|
+
* | s | Second | S | Fraction of second |
|
|
136583
|
+
* | t! | Seconds timestamp | T! | Milliseconds timestamp |
|
|
136584
|
+
* | u | Extended year | U* | Cyclic year |
|
|
136585
|
+
* | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
|
|
136586
|
+
* | w | Local week of year | W* | Week of month |
|
|
136587
|
+
* | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
|
|
136588
|
+
* | y | Year (abs) | Y | Local week-numbering year |
|
|
136589
|
+
* | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
|
|
136590
|
+
*
|
|
136591
|
+
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
136592
|
+
*
|
|
136593
|
+
* Letters marked by ! are non-standard, but implemented by date-fns:
|
|
136594
|
+
* - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
|
|
136595
|
+
* - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
|
|
136596
|
+
* i.e. 7 for Sunday, 1 for Monday, etc.
|
|
136597
|
+
* - `I` is ISO week of year, as opposed to `w` which is local week of year.
|
|
136598
|
+
* - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
|
|
136599
|
+
* `R` is supposed to be used in conjunction with `I` and `i`
|
|
136600
|
+
* for universal ISO week-numbering date, whereas
|
|
136601
|
+
* `Y` is supposed to be used in conjunction with `w` and `e`
|
|
136602
|
+
* for week-numbering date specific to the locale.
|
|
136603
|
+
* - `P` is long localized date format
|
|
136604
|
+
* - `p` is long localized time format
|
|
136605
|
+
*/
|
|
136606
|
+
|
|
136607
|
+
var formatters = {
|
|
136608
|
+
// Era
|
|
136609
|
+
G: function (date, token, localize) {
|
|
136610
|
+
var era = date.getUTCFullYear() > 0 ? 1 : 0;
|
|
136611
|
+
|
|
136612
|
+
switch (token) {
|
|
136613
|
+
// AD, BC
|
|
136614
|
+
case 'G':
|
|
136615
|
+
case 'GG':
|
|
136616
|
+
case 'GGG':
|
|
136617
|
+
return localize.era(era, {
|
|
136618
|
+
width: 'abbreviated'
|
|
136619
|
+
});
|
|
136620
|
+
// A, B
|
|
136621
|
+
|
|
136622
|
+
case 'GGGGG':
|
|
136623
|
+
return localize.era(era, {
|
|
136624
|
+
width: 'narrow'
|
|
136625
|
+
});
|
|
136626
|
+
// Anno Domini, Before Christ
|
|
136627
|
+
|
|
136628
|
+
case 'GGGG':
|
|
136629
|
+
default:
|
|
136630
|
+
return localize.era(era, {
|
|
136631
|
+
width: 'wide'
|
|
136632
|
+
});
|
|
136633
|
+
}
|
|
136634
|
+
},
|
|
136635
|
+
// Year
|
|
136636
|
+
y: function (date, token, localize) {
|
|
136637
|
+
// Ordinal number
|
|
136638
|
+
if (token === 'yo') {
|
|
136639
|
+
var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
136640
|
+
|
|
136641
|
+
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
136642
|
+
return localize.ordinalNumber(year, {
|
|
136643
|
+
unit: 'year'
|
|
136644
|
+
});
|
|
136645
|
+
}
|
|
136646
|
+
|
|
136647
|
+
return formatters$3.y(date, token);
|
|
136648
|
+
},
|
|
136649
|
+
// Local week-numbering year
|
|
136650
|
+
Y: function (date, token, localize, options) {
|
|
136651
|
+
var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
136652
|
+
|
|
136653
|
+
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year
|
|
136654
|
+
|
|
136655
|
+
if (token === 'YY') {
|
|
136656
|
+
var twoDigitYear = weekYear % 100;
|
|
136657
|
+
return addLeadingZeros(twoDigitYear, 2);
|
|
136658
|
+
} // Ordinal number
|
|
136659
|
+
|
|
136660
|
+
|
|
136661
|
+
if (token === 'Yo') {
|
|
136662
|
+
return localize.ordinalNumber(weekYear, {
|
|
136663
|
+
unit: 'year'
|
|
136664
|
+
});
|
|
136665
|
+
} // Padding
|
|
136666
|
+
|
|
136667
|
+
|
|
136668
|
+
return addLeadingZeros(weekYear, token.length);
|
|
136669
|
+
},
|
|
136670
|
+
// ISO week-numbering year
|
|
136671
|
+
R: function (date, token) {
|
|
136672
|
+
var isoWeekYear = getUTCISOWeekYear(date); // Padding
|
|
136673
|
+
|
|
136674
|
+
return addLeadingZeros(isoWeekYear, token.length);
|
|
136675
|
+
},
|
|
136676
|
+
// Extended year. This is a single number designating the year of this calendar system.
|
|
136677
|
+
// The main difference between `y` and `u` localizers are B.C. years:
|
|
136678
|
+
// | Year | `y` | `u` |
|
|
136679
|
+
// |------|-----|-----|
|
|
136680
|
+
// | AC 1 | 1 | 1 |
|
|
136681
|
+
// | BC 1 | 1 | 0 |
|
|
136682
|
+
// | BC 2 | 2 | -1 |
|
|
136683
|
+
// Also `yy` always returns the last two digits of a year,
|
|
136684
|
+
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
136685
|
+
u: function (date, token) {
|
|
136686
|
+
var year = date.getUTCFullYear();
|
|
136687
|
+
return addLeadingZeros(year, token.length);
|
|
136688
|
+
},
|
|
136689
|
+
// Quarter
|
|
136690
|
+
Q: function (date, token, localize) {
|
|
136691
|
+
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
136692
|
+
|
|
136693
|
+
switch (token) {
|
|
136694
|
+
// 1, 2, 3, 4
|
|
136695
|
+
case 'Q':
|
|
136696
|
+
return String(quarter);
|
|
136697
|
+
// 01, 02, 03, 04
|
|
136698
|
+
|
|
136699
|
+
case 'QQ':
|
|
136700
|
+
return addLeadingZeros(quarter, 2);
|
|
136701
|
+
// 1st, 2nd, 3rd, 4th
|
|
136702
|
+
|
|
136703
|
+
case 'Qo':
|
|
136704
|
+
return localize.ordinalNumber(quarter, {
|
|
136705
|
+
unit: 'quarter'
|
|
136706
|
+
});
|
|
136707
|
+
// Q1, Q2, Q3, Q4
|
|
136708
|
+
|
|
136709
|
+
case 'QQQ':
|
|
136710
|
+
return localize.quarter(quarter, {
|
|
136711
|
+
width: 'abbreviated',
|
|
136712
|
+
context: 'formatting'
|
|
136713
|
+
});
|
|
136714
|
+
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
136715
|
+
|
|
136716
|
+
case 'QQQQQ':
|
|
136717
|
+
return localize.quarter(quarter, {
|
|
136718
|
+
width: 'narrow',
|
|
136719
|
+
context: 'formatting'
|
|
136720
|
+
});
|
|
136721
|
+
// 1st quarter, 2nd quarter, ...
|
|
136722
|
+
|
|
136723
|
+
case 'QQQQ':
|
|
136724
|
+
default:
|
|
136725
|
+
return localize.quarter(quarter, {
|
|
136726
|
+
width: 'wide',
|
|
136727
|
+
context: 'formatting'
|
|
136728
|
+
});
|
|
136729
|
+
}
|
|
136730
|
+
},
|
|
136731
|
+
// Stand-alone quarter
|
|
136732
|
+
q: function (date, token, localize) {
|
|
136733
|
+
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
136734
|
+
|
|
136735
|
+
switch (token) {
|
|
136736
|
+
// 1, 2, 3, 4
|
|
136737
|
+
case 'q':
|
|
136738
|
+
return String(quarter);
|
|
136739
|
+
// 01, 02, 03, 04
|
|
136740
|
+
|
|
136741
|
+
case 'qq':
|
|
136742
|
+
return addLeadingZeros(quarter, 2);
|
|
136743
|
+
// 1st, 2nd, 3rd, 4th
|
|
136744
|
+
|
|
136745
|
+
case 'qo':
|
|
136746
|
+
return localize.ordinalNumber(quarter, {
|
|
136747
|
+
unit: 'quarter'
|
|
136748
|
+
});
|
|
136749
|
+
// Q1, Q2, Q3, Q4
|
|
136750
|
+
|
|
136751
|
+
case 'qqq':
|
|
136752
|
+
return localize.quarter(quarter, {
|
|
136753
|
+
width: 'abbreviated',
|
|
136754
|
+
context: 'standalone'
|
|
136755
|
+
});
|
|
136756
|
+
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
136757
|
+
|
|
136758
|
+
case 'qqqqq':
|
|
136759
|
+
return localize.quarter(quarter, {
|
|
136760
|
+
width: 'narrow',
|
|
136761
|
+
context: 'standalone'
|
|
136762
|
+
});
|
|
136763
|
+
// 1st quarter, 2nd quarter, ...
|
|
136764
|
+
|
|
136765
|
+
case 'qqqq':
|
|
136766
|
+
default:
|
|
136767
|
+
return localize.quarter(quarter, {
|
|
136768
|
+
width: 'wide',
|
|
136769
|
+
context: 'standalone'
|
|
136770
|
+
});
|
|
136771
|
+
}
|
|
136772
|
+
},
|
|
136773
|
+
// Month
|
|
136774
|
+
M: function (date, token, localize) {
|
|
136775
|
+
var month = date.getUTCMonth();
|
|
136776
|
+
|
|
136777
|
+
switch (token) {
|
|
136778
|
+
case 'M':
|
|
136779
|
+
case 'MM':
|
|
136780
|
+
return formatters$3.M(date, token);
|
|
136781
|
+
// 1st, 2nd, ..., 12th
|
|
136782
|
+
|
|
136783
|
+
case 'Mo':
|
|
136784
|
+
return localize.ordinalNumber(month + 1, {
|
|
136785
|
+
unit: 'month'
|
|
136786
|
+
});
|
|
136787
|
+
// Jan, Feb, ..., Dec
|
|
136788
|
+
|
|
136789
|
+
case 'MMM':
|
|
136790
|
+
return localize.month(month, {
|
|
136791
|
+
width: 'abbreviated',
|
|
136792
|
+
context: 'formatting'
|
|
136793
|
+
});
|
|
136794
|
+
// J, F, ..., D
|
|
136795
|
+
|
|
136796
|
+
case 'MMMMM':
|
|
136797
|
+
return localize.month(month, {
|
|
136798
|
+
width: 'narrow',
|
|
136799
|
+
context: 'formatting'
|
|
136800
|
+
});
|
|
136801
|
+
// January, February, ..., December
|
|
136802
|
+
|
|
136803
|
+
case 'MMMM':
|
|
136804
|
+
default:
|
|
136805
|
+
return localize.month(month, {
|
|
136806
|
+
width: 'wide',
|
|
136807
|
+
context: 'formatting'
|
|
136808
|
+
});
|
|
136809
|
+
}
|
|
136810
|
+
},
|
|
136811
|
+
// Stand-alone month
|
|
136812
|
+
L: function (date, token, localize) {
|
|
136813
|
+
var month = date.getUTCMonth();
|
|
136814
|
+
|
|
136815
|
+
switch (token) {
|
|
136816
|
+
// 1, 2, ..., 12
|
|
136817
|
+
case 'L':
|
|
136818
|
+
return String(month + 1);
|
|
136819
|
+
// 01, 02, ..., 12
|
|
136820
|
+
|
|
136821
|
+
case 'LL':
|
|
136822
|
+
return addLeadingZeros(month + 1, 2);
|
|
136823
|
+
// 1st, 2nd, ..., 12th
|
|
136824
|
+
|
|
136825
|
+
case 'Lo':
|
|
136826
|
+
return localize.ordinalNumber(month + 1, {
|
|
136827
|
+
unit: 'month'
|
|
136828
|
+
});
|
|
136829
|
+
// Jan, Feb, ..., Dec
|
|
136830
|
+
|
|
136831
|
+
case 'LLL':
|
|
136832
|
+
return localize.month(month, {
|
|
136833
|
+
width: 'abbreviated',
|
|
136834
|
+
context: 'standalone'
|
|
136835
|
+
});
|
|
136836
|
+
// J, F, ..., D
|
|
136837
|
+
|
|
136838
|
+
case 'LLLLL':
|
|
136839
|
+
return localize.month(month, {
|
|
136840
|
+
width: 'narrow',
|
|
136841
|
+
context: 'standalone'
|
|
136842
|
+
});
|
|
136843
|
+
// January, February, ..., December
|
|
136844
|
+
|
|
136845
|
+
case 'LLLL':
|
|
136846
|
+
default:
|
|
136847
|
+
return localize.month(month, {
|
|
136848
|
+
width: 'wide',
|
|
136849
|
+
context: 'standalone'
|
|
136850
|
+
});
|
|
136851
|
+
}
|
|
136852
|
+
},
|
|
136853
|
+
// Local week of year
|
|
136854
|
+
w: function (date, token, localize, options) {
|
|
136855
|
+
var week = getUTCWeek(date, options);
|
|
136856
|
+
|
|
136857
|
+
if (token === 'wo') {
|
|
136858
|
+
return localize.ordinalNumber(week, {
|
|
136859
|
+
unit: 'week'
|
|
136860
|
+
});
|
|
136861
|
+
}
|
|
136862
|
+
|
|
136863
|
+
return addLeadingZeros(week, token.length);
|
|
136864
|
+
},
|
|
136865
|
+
// ISO week of year
|
|
136866
|
+
I: function (date, token, localize) {
|
|
136867
|
+
var isoWeek = getUTCISOWeek(date);
|
|
136868
|
+
|
|
136869
|
+
if (token === 'Io') {
|
|
136870
|
+
return localize.ordinalNumber(isoWeek, {
|
|
136871
|
+
unit: 'week'
|
|
136872
|
+
});
|
|
136873
|
+
}
|
|
136874
|
+
|
|
136875
|
+
return addLeadingZeros(isoWeek, token.length);
|
|
136876
|
+
},
|
|
136877
|
+
// Day of the month
|
|
136878
|
+
d: function (date, token, localize) {
|
|
136879
|
+
if (token === 'do') {
|
|
136880
|
+
return localize.ordinalNumber(date.getUTCDate(), {
|
|
136881
|
+
unit: 'date'
|
|
136882
|
+
});
|
|
136883
|
+
}
|
|
136884
|
+
|
|
136885
|
+
return formatters$3.d(date, token);
|
|
136886
|
+
},
|
|
136887
|
+
// Day of year
|
|
136888
|
+
D: function (date, token, localize) {
|
|
136889
|
+
var dayOfYear = getUTCDayOfYear(date);
|
|
136890
|
+
|
|
136891
|
+
if (token === 'Do') {
|
|
136892
|
+
return localize.ordinalNumber(dayOfYear, {
|
|
136893
|
+
unit: 'dayOfYear'
|
|
136894
|
+
});
|
|
136895
|
+
}
|
|
136896
|
+
|
|
136897
|
+
return addLeadingZeros(dayOfYear, token.length);
|
|
136898
|
+
},
|
|
136899
|
+
// Day of week
|
|
136900
|
+
E: function (date, token, localize) {
|
|
136901
|
+
var dayOfWeek = date.getUTCDay();
|
|
136902
|
+
|
|
136903
|
+
switch (token) {
|
|
136904
|
+
// Tue
|
|
136905
|
+
case 'E':
|
|
136906
|
+
case 'EE':
|
|
136907
|
+
case 'EEE':
|
|
136908
|
+
return localize.day(dayOfWeek, {
|
|
136909
|
+
width: 'abbreviated',
|
|
136910
|
+
context: 'formatting'
|
|
136911
|
+
});
|
|
136912
|
+
// T
|
|
136913
|
+
|
|
136914
|
+
case 'EEEEE':
|
|
136915
|
+
return localize.day(dayOfWeek, {
|
|
136916
|
+
width: 'narrow',
|
|
136917
|
+
context: 'formatting'
|
|
136918
|
+
});
|
|
136919
|
+
// Tu
|
|
136920
|
+
|
|
136921
|
+
case 'EEEEEE':
|
|
136922
|
+
return localize.day(dayOfWeek, {
|
|
136923
|
+
width: 'short',
|
|
136924
|
+
context: 'formatting'
|
|
136925
|
+
});
|
|
136926
|
+
// Tuesday
|
|
136927
|
+
|
|
136928
|
+
case 'EEEE':
|
|
136929
|
+
default:
|
|
136930
|
+
return localize.day(dayOfWeek, {
|
|
136931
|
+
width: 'wide',
|
|
136932
|
+
context: 'formatting'
|
|
136933
|
+
});
|
|
136934
|
+
}
|
|
136935
|
+
},
|
|
136936
|
+
// Local day of week
|
|
136937
|
+
e: function (date, token, localize, options) {
|
|
136938
|
+
var dayOfWeek = date.getUTCDay();
|
|
136939
|
+
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
136940
|
+
|
|
136941
|
+
switch (token) {
|
|
136942
|
+
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
136943
|
+
case 'e':
|
|
136944
|
+
return String(localDayOfWeek);
|
|
136945
|
+
// Padded numerical value
|
|
136946
|
+
|
|
136947
|
+
case 'ee':
|
|
136948
|
+
return addLeadingZeros(localDayOfWeek, 2);
|
|
136949
|
+
// 1st, 2nd, ..., 7th
|
|
136950
|
+
|
|
136951
|
+
case 'eo':
|
|
136952
|
+
return localize.ordinalNumber(localDayOfWeek, {
|
|
136953
|
+
unit: 'day'
|
|
136954
|
+
});
|
|
136955
|
+
|
|
136956
|
+
case 'eee':
|
|
136957
|
+
return localize.day(dayOfWeek, {
|
|
136958
|
+
width: 'abbreviated',
|
|
136959
|
+
context: 'formatting'
|
|
136960
|
+
});
|
|
136961
|
+
// T
|
|
136962
|
+
|
|
136963
|
+
case 'eeeee':
|
|
136964
|
+
return localize.day(dayOfWeek, {
|
|
136965
|
+
width: 'narrow',
|
|
136966
|
+
context: 'formatting'
|
|
136967
|
+
});
|
|
136968
|
+
// Tu
|
|
136969
|
+
|
|
136970
|
+
case 'eeeeee':
|
|
136971
|
+
return localize.day(dayOfWeek, {
|
|
136972
|
+
width: 'short',
|
|
136973
|
+
context: 'formatting'
|
|
136974
|
+
});
|
|
136975
|
+
// Tuesday
|
|
136976
|
+
|
|
136977
|
+
case 'eeee':
|
|
136978
|
+
default:
|
|
136979
|
+
return localize.day(dayOfWeek, {
|
|
136980
|
+
width: 'wide',
|
|
136981
|
+
context: 'formatting'
|
|
136982
|
+
});
|
|
136983
|
+
}
|
|
136984
|
+
},
|
|
136985
|
+
// Stand-alone local day of week
|
|
136986
|
+
c: function (date, token, localize, options) {
|
|
136987
|
+
var dayOfWeek = date.getUTCDay();
|
|
136988
|
+
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
136989
|
+
|
|
136990
|
+
switch (token) {
|
|
136991
|
+
// Numerical value (same as in `e`)
|
|
136992
|
+
case 'c':
|
|
136993
|
+
return String(localDayOfWeek);
|
|
136994
|
+
// Padded numerical value
|
|
136995
|
+
|
|
136996
|
+
case 'cc':
|
|
136997
|
+
return addLeadingZeros(localDayOfWeek, token.length);
|
|
136998
|
+
// 1st, 2nd, ..., 7th
|
|
136999
|
+
|
|
137000
|
+
case 'co':
|
|
137001
|
+
return localize.ordinalNumber(localDayOfWeek, {
|
|
137002
|
+
unit: 'day'
|
|
137003
|
+
});
|
|
137004
|
+
|
|
137005
|
+
case 'ccc':
|
|
137006
|
+
return localize.day(dayOfWeek, {
|
|
137007
|
+
width: 'abbreviated',
|
|
137008
|
+
context: 'standalone'
|
|
137009
|
+
});
|
|
137010
|
+
// T
|
|
137011
|
+
|
|
137012
|
+
case 'ccccc':
|
|
137013
|
+
return localize.day(dayOfWeek, {
|
|
137014
|
+
width: 'narrow',
|
|
137015
|
+
context: 'standalone'
|
|
137016
|
+
});
|
|
137017
|
+
// Tu
|
|
137018
|
+
|
|
137019
|
+
case 'cccccc':
|
|
137020
|
+
return localize.day(dayOfWeek, {
|
|
137021
|
+
width: 'short',
|
|
137022
|
+
context: 'standalone'
|
|
137023
|
+
});
|
|
137024
|
+
// Tuesday
|
|
137025
|
+
|
|
137026
|
+
case 'cccc':
|
|
137027
|
+
default:
|
|
137028
|
+
return localize.day(dayOfWeek, {
|
|
137029
|
+
width: 'wide',
|
|
137030
|
+
context: 'standalone'
|
|
137031
|
+
});
|
|
137032
|
+
}
|
|
137033
|
+
},
|
|
137034
|
+
// ISO day of week
|
|
137035
|
+
i: function (date, token, localize) {
|
|
137036
|
+
var dayOfWeek = date.getUTCDay();
|
|
137037
|
+
var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
137038
|
+
|
|
137039
|
+
switch (token) {
|
|
137040
|
+
// 2
|
|
137041
|
+
case 'i':
|
|
137042
|
+
return String(isoDayOfWeek);
|
|
137043
|
+
// 02
|
|
137044
|
+
|
|
137045
|
+
case 'ii':
|
|
137046
|
+
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
137047
|
+
// 2nd
|
|
137048
|
+
|
|
137049
|
+
case 'io':
|
|
137050
|
+
return localize.ordinalNumber(isoDayOfWeek, {
|
|
137051
|
+
unit: 'day'
|
|
137052
|
+
});
|
|
137053
|
+
// Tue
|
|
137054
|
+
|
|
137055
|
+
case 'iii':
|
|
137056
|
+
return localize.day(dayOfWeek, {
|
|
137057
|
+
width: 'abbreviated',
|
|
137058
|
+
context: 'formatting'
|
|
137059
|
+
});
|
|
137060
|
+
// T
|
|
137061
|
+
|
|
137062
|
+
case 'iiiii':
|
|
137063
|
+
return localize.day(dayOfWeek, {
|
|
137064
|
+
width: 'narrow',
|
|
137065
|
+
context: 'formatting'
|
|
137066
|
+
});
|
|
137067
|
+
// Tu
|
|
137068
|
+
|
|
137069
|
+
case 'iiiiii':
|
|
137070
|
+
return localize.day(dayOfWeek, {
|
|
137071
|
+
width: 'short',
|
|
137072
|
+
context: 'formatting'
|
|
137073
|
+
});
|
|
137074
|
+
// Tuesday
|
|
137075
|
+
|
|
137076
|
+
case 'iiii':
|
|
137077
|
+
default:
|
|
137078
|
+
return localize.day(dayOfWeek, {
|
|
137079
|
+
width: 'wide',
|
|
137080
|
+
context: 'formatting'
|
|
137081
|
+
});
|
|
137082
|
+
}
|
|
137083
|
+
},
|
|
137084
|
+
// AM or PM
|
|
137085
|
+
a: function (date, token, localize) {
|
|
137086
|
+
var hours = date.getUTCHours();
|
|
137087
|
+
var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
|
|
137088
|
+
|
|
137089
|
+
switch (token) {
|
|
137090
|
+
case 'a':
|
|
137091
|
+
case 'aa':
|
|
137092
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137093
|
+
width: 'abbreviated',
|
|
137094
|
+
context: 'formatting'
|
|
137095
|
+
});
|
|
137096
|
+
|
|
137097
|
+
case 'aaa':
|
|
137098
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137099
|
+
width: 'abbreviated',
|
|
137100
|
+
context: 'formatting'
|
|
137101
|
+
}).toLowerCase();
|
|
137102
|
+
|
|
137103
|
+
case 'aaaaa':
|
|
137104
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137105
|
+
width: 'narrow',
|
|
137106
|
+
context: 'formatting'
|
|
137107
|
+
});
|
|
137108
|
+
|
|
137109
|
+
case 'aaaa':
|
|
137110
|
+
default:
|
|
137111
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137112
|
+
width: 'wide',
|
|
137113
|
+
context: 'formatting'
|
|
137114
|
+
});
|
|
137115
|
+
}
|
|
137116
|
+
},
|
|
137117
|
+
// AM, PM, midnight, noon
|
|
137118
|
+
b: function (date, token, localize) {
|
|
137119
|
+
var hours = date.getUTCHours();
|
|
137120
|
+
var dayPeriodEnumValue;
|
|
137121
|
+
|
|
137122
|
+
if (hours === 12) {
|
|
137123
|
+
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
137124
|
+
} else if (hours === 0) {
|
|
137125
|
+
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
|
137126
|
+
} else {
|
|
137127
|
+
dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
|
|
137128
|
+
}
|
|
137129
|
+
|
|
137130
|
+
switch (token) {
|
|
137131
|
+
case 'b':
|
|
137132
|
+
case 'bb':
|
|
137133
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137134
|
+
width: 'abbreviated',
|
|
137135
|
+
context: 'formatting'
|
|
137136
|
+
});
|
|
137137
|
+
|
|
137138
|
+
case 'bbb':
|
|
137139
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137140
|
+
width: 'abbreviated',
|
|
137141
|
+
context: 'formatting'
|
|
137142
|
+
}).toLowerCase();
|
|
137143
|
+
|
|
137144
|
+
case 'bbbbb':
|
|
137145
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137146
|
+
width: 'narrow',
|
|
137147
|
+
context: 'formatting'
|
|
137148
|
+
});
|
|
137149
|
+
|
|
137150
|
+
case 'bbbb':
|
|
137151
|
+
default:
|
|
137152
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137153
|
+
width: 'wide',
|
|
137154
|
+
context: 'formatting'
|
|
137155
|
+
});
|
|
137156
|
+
}
|
|
137157
|
+
},
|
|
137158
|
+
// in the morning, in the afternoon, in the evening, at night
|
|
137159
|
+
B: function (date, token, localize) {
|
|
137160
|
+
var hours = date.getUTCHours();
|
|
137161
|
+
var dayPeriodEnumValue;
|
|
137162
|
+
|
|
137163
|
+
if (hours >= 17) {
|
|
137164
|
+
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
137165
|
+
} else if (hours >= 12) {
|
|
137166
|
+
dayPeriodEnumValue = dayPeriodEnum.afternoon;
|
|
137167
|
+
} else if (hours >= 4) {
|
|
137168
|
+
dayPeriodEnumValue = dayPeriodEnum.morning;
|
|
137169
|
+
} else {
|
|
137170
|
+
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
137171
|
+
}
|
|
137172
|
+
|
|
137173
|
+
switch (token) {
|
|
137174
|
+
case 'B':
|
|
137175
|
+
case 'BB':
|
|
137176
|
+
case 'BBB':
|
|
137177
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137178
|
+
width: 'abbreviated',
|
|
137179
|
+
context: 'formatting'
|
|
137180
|
+
});
|
|
137181
|
+
|
|
137182
|
+
case 'BBBBB':
|
|
137183
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137184
|
+
width: 'narrow',
|
|
137185
|
+
context: 'formatting'
|
|
137186
|
+
});
|
|
137187
|
+
|
|
137188
|
+
case 'BBBB':
|
|
137189
|
+
default:
|
|
137190
|
+
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
137191
|
+
width: 'wide',
|
|
137192
|
+
context: 'formatting'
|
|
137193
|
+
});
|
|
137194
|
+
}
|
|
137195
|
+
},
|
|
137196
|
+
// Hour [1-12]
|
|
137197
|
+
h: function (date, token, localize) {
|
|
137198
|
+
if (token === 'ho') {
|
|
137199
|
+
var hours = date.getUTCHours() % 12;
|
|
137200
|
+
if (hours === 0) hours = 12;
|
|
137201
|
+
return localize.ordinalNumber(hours, {
|
|
137202
|
+
unit: 'hour'
|
|
137203
|
+
});
|
|
137204
|
+
}
|
|
137205
|
+
|
|
137206
|
+
return formatters$3.h(date, token);
|
|
137207
|
+
},
|
|
137208
|
+
// Hour [0-23]
|
|
137209
|
+
H: function (date, token, localize) {
|
|
137210
|
+
if (token === 'Ho') {
|
|
137211
|
+
return localize.ordinalNumber(date.getUTCHours(), {
|
|
137212
|
+
unit: 'hour'
|
|
137213
|
+
});
|
|
137214
|
+
}
|
|
137215
|
+
|
|
137216
|
+
return formatters$3.H(date, token);
|
|
137217
|
+
},
|
|
137218
|
+
// Hour [0-11]
|
|
137219
|
+
K: function (date, token, localize) {
|
|
137220
|
+
var hours = date.getUTCHours() % 12;
|
|
137221
|
+
|
|
137222
|
+
if (token === 'Ko') {
|
|
137223
|
+
return localize.ordinalNumber(hours, {
|
|
137224
|
+
unit: 'hour'
|
|
137225
|
+
});
|
|
137226
|
+
}
|
|
137227
|
+
|
|
137228
|
+
return addLeadingZeros(hours, token.length);
|
|
137229
|
+
},
|
|
137230
|
+
// Hour [1-24]
|
|
137231
|
+
k: function (date, token, localize) {
|
|
137232
|
+
var hours = date.getUTCHours();
|
|
137233
|
+
if (hours === 0) hours = 24;
|
|
137234
|
+
|
|
137235
|
+
if (token === 'ko') {
|
|
137236
|
+
return localize.ordinalNumber(hours, {
|
|
137237
|
+
unit: 'hour'
|
|
137238
|
+
});
|
|
137239
|
+
}
|
|
137240
|
+
|
|
137241
|
+
return addLeadingZeros(hours, token.length);
|
|
137242
|
+
},
|
|
137243
|
+
// Minute
|
|
137244
|
+
m: function (date, token, localize) {
|
|
137245
|
+
if (token === 'mo') {
|
|
137246
|
+
return localize.ordinalNumber(date.getUTCMinutes(), {
|
|
137247
|
+
unit: 'minute'
|
|
137248
|
+
});
|
|
137249
|
+
}
|
|
137250
|
+
|
|
137251
|
+
return formatters$3.m(date, token);
|
|
137252
|
+
},
|
|
137253
|
+
// Second
|
|
137254
|
+
s: function (date, token, localize) {
|
|
137255
|
+
if (token === 'so') {
|
|
137256
|
+
return localize.ordinalNumber(date.getUTCSeconds(), {
|
|
137257
|
+
unit: 'second'
|
|
137258
|
+
});
|
|
137259
|
+
}
|
|
137260
|
+
|
|
137261
|
+
return formatters$3.s(date, token);
|
|
137262
|
+
},
|
|
137263
|
+
// Fraction of second
|
|
137264
|
+
S: function (date, token) {
|
|
137265
|
+
return formatters$3.S(date, token);
|
|
137266
|
+
},
|
|
137267
|
+
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
137268
|
+
X: function (date, token, _localize, options) {
|
|
137269
|
+
var originalDate = options._originalDate || date;
|
|
137270
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
137271
|
+
|
|
137272
|
+
if (timezoneOffset === 0) {
|
|
137273
|
+
return 'Z';
|
|
137274
|
+
}
|
|
137275
|
+
|
|
137276
|
+
switch (token) {
|
|
137277
|
+
// Hours and optional minutes
|
|
137278
|
+
case 'X':
|
|
137279
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
137280
|
+
// Hours, minutes and optional seconds without `:` delimiter
|
|
137281
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
137282
|
+
// so this token always has the same output as `XX`
|
|
137283
|
+
|
|
137284
|
+
case 'XXXX':
|
|
137285
|
+
case 'XX':
|
|
137286
|
+
// Hours and minutes without `:` delimiter
|
|
137287
|
+
return formatTimezone(timezoneOffset);
|
|
137288
|
+
// Hours, minutes and optional seconds with `:` delimiter
|
|
137289
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
137290
|
+
// so this token always has the same output as `XXX`
|
|
137291
|
+
|
|
137292
|
+
case 'XXXXX':
|
|
137293
|
+
case 'XXX': // Hours and minutes with `:` delimiter
|
|
137294
|
+
|
|
137295
|
+
default:
|
|
137296
|
+
return formatTimezone(timezoneOffset, ':');
|
|
137297
|
+
}
|
|
137298
|
+
},
|
|
137299
|
+
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
137300
|
+
x: function (date, token, _localize, options) {
|
|
137301
|
+
var originalDate = options._originalDate || date;
|
|
137302
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
137303
|
+
|
|
137304
|
+
switch (token) {
|
|
137305
|
+
// Hours and optional minutes
|
|
137306
|
+
case 'x':
|
|
137307
|
+
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
137308
|
+
// Hours, minutes and optional seconds without `:` delimiter
|
|
137309
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
137310
|
+
// so this token always has the same output as `xx`
|
|
137311
|
+
|
|
137312
|
+
case 'xxxx':
|
|
137313
|
+
case 'xx':
|
|
137314
|
+
// Hours and minutes without `:` delimiter
|
|
137315
|
+
return formatTimezone(timezoneOffset);
|
|
137316
|
+
// Hours, minutes and optional seconds with `:` delimiter
|
|
137317
|
+
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
137318
|
+
// so this token always has the same output as `xxx`
|
|
137319
|
+
|
|
137320
|
+
case 'xxxxx':
|
|
137321
|
+
case 'xxx': // Hours and minutes with `:` delimiter
|
|
137322
|
+
|
|
137323
|
+
default:
|
|
137324
|
+
return formatTimezone(timezoneOffset, ':');
|
|
137325
|
+
}
|
|
137326
|
+
},
|
|
137327
|
+
// Timezone (GMT)
|
|
137328
|
+
O: function (date, token, _localize, options) {
|
|
137329
|
+
var originalDate = options._originalDate || date;
|
|
137330
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
137331
|
+
|
|
137332
|
+
switch (token) {
|
|
137333
|
+
// Short
|
|
137334
|
+
case 'O':
|
|
137335
|
+
case 'OO':
|
|
137336
|
+
case 'OOO':
|
|
137337
|
+
return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
|
|
137338
|
+
// Long
|
|
137339
|
+
|
|
137340
|
+
case 'OOOO':
|
|
137341
|
+
default:
|
|
137342
|
+
return 'GMT' + formatTimezone(timezoneOffset, ':');
|
|
137343
|
+
}
|
|
137344
|
+
},
|
|
137345
|
+
// Timezone (specific non-location)
|
|
137346
|
+
z: function (date, token, _localize, options) {
|
|
137347
|
+
var originalDate = options._originalDate || date;
|
|
137348
|
+
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
137349
|
+
|
|
137350
|
+
switch (token) {
|
|
137351
|
+
// Short
|
|
137352
|
+
case 'z':
|
|
137353
|
+
case 'zz':
|
|
137354
|
+
case 'zzz':
|
|
137355
|
+
return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
|
|
137356
|
+
// Long
|
|
137357
|
+
|
|
137358
|
+
case 'zzzz':
|
|
137359
|
+
default:
|
|
137360
|
+
return 'GMT' + formatTimezone(timezoneOffset, ':');
|
|
137361
|
+
}
|
|
137362
|
+
},
|
|
137363
|
+
// Seconds timestamp
|
|
137364
|
+
t: function (date, token, _localize, options) {
|
|
137365
|
+
var originalDate = options._originalDate || date;
|
|
137366
|
+
var timestamp = Math.floor(originalDate.getTime() / 1000);
|
|
137367
|
+
return addLeadingZeros(timestamp, token.length);
|
|
137368
|
+
},
|
|
137369
|
+
// Milliseconds timestamp
|
|
137370
|
+
T: function (date, token, _localize, options) {
|
|
137371
|
+
var originalDate = options._originalDate || date;
|
|
137372
|
+
var timestamp = originalDate.getTime();
|
|
137373
|
+
return addLeadingZeros(timestamp, token.length);
|
|
137374
|
+
}
|
|
137375
|
+
};
|
|
137376
|
+
|
|
137377
|
+
function formatTimezoneShort(offset, dirtyDelimiter) {
|
|
137378
|
+
var sign = offset > 0 ? '-' : '+';
|
|
137379
|
+
var absOffset = Math.abs(offset);
|
|
137380
|
+
var hours = Math.floor(absOffset / 60);
|
|
137381
|
+
var minutes = absOffset % 60;
|
|
137382
|
+
|
|
137383
|
+
if (minutes === 0) {
|
|
137384
|
+
return sign + String(hours);
|
|
137385
|
+
}
|
|
137386
|
+
|
|
137387
|
+
var delimiter = dirtyDelimiter || '';
|
|
137388
|
+
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
137389
|
+
}
|
|
137390
|
+
|
|
137391
|
+
function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
|
|
137392
|
+
if (offset % 60 === 0) {
|
|
137393
|
+
var sign = offset > 0 ? '-' : '+';
|
|
137394
|
+
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
137395
|
+
}
|
|
137396
|
+
|
|
137397
|
+
return formatTimezone(offset, dirtyDelimiter);
|
|
137398
|
+
}
|
|
137399
|
+
|
|
137400
|
+
function formatTimezone(offset, dirtyDelimiter) {
|
|
137401
|
+
var delimiter = dirtyDelimiter || '';
|
|
137402
|
+
var sign = offset > 0 ? '-' : '+';
|
|
137403
|
+
var absOffset = Math.abs(offset);
|
|
137404
|
+
var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);
|
|
137405
|
+
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
137406
|
+
return sign + hours + delimiter + minutes;
|
|
137407
|
+
}
|
|
137408
|
+
|
|
137409
|
+
var formatters$1 = formatters;
|
|
137410
|
+
|
|
137411
|
+
function dateLongFormatter(pattern, formatLong) {
|
|
137412
|
+
switch (pattern) {
|
|
137413
|
+
case 'P':
|
|
137414
|
+
return formatLong.date({
|
|
137415
|
+
width: 'short'
|
|
137416
|
+
});
|
|
137417
|
+
|
|
137418
|
+
case 'PP':
|
|
137419
|
+
return formatLong.date({
|
|
137420
|
+
width: 'medium'
|
|
137421
|
+
});
|
|
137422
|
+
|
|
137423
|
+
case 'PPP':
|
|
137424
|
+
return formatLong.date({
|
|
137425
|
+
width: 'long'
|
|
137426
|
+
});
|
|
137427
|
+
|
|
137428
|
+
case 'PPPP':
|
|
137429
|
+
default:
|
|
137430
|
+
return formatLong.date({
|
|
137431
|
+
width: 'full'
|
|
137432
|
+
});
|
|
137433
|
+
}
|
|
137434
|
+
}
|
|
137435
|
+
|
|
137436
|
+
function timeLongFormatter(pattern, formatLong) {
|
|
137437
|
+
switch (pattern) {
|
|
137438
|
+
case 'p':
|
|
137439
|
+
return formatLong.time({
|
|
137440
|
+
width: 'short'
|
|
137441
|
+
});
|
|
137442
|
+
|
|
137443
|
+
case 'pp':
|
|
137444
|
+
return formatLong.time({
|
|
137445
|
+
width: 'medium'
|
|
137446
|
+
});
|
|
137447
|
+
|
|
137448
|
+
case 'ppp':
|
|
137449
|
+
return formatLong.time({
|
|
137450
|
+
width: 'long'
|
|
137451
|
+
});
|
|
137452
|
+
|
|
137453
|
+
case 'pppp':
|
|
137454
|
+
default:
|
|
137455
|
+
return formatLong.time({
|
|
137456
|
+
width: 'full'
|
|
137457
|
+
});
|
|
137458
|
+
}
|
|
137459
|
+
}
|
|
137460
|
+
|
|
137461
|
+
function dateTimeLongFormatter(pattern, formatLong) {
|
|
137462
|
+
var matchResult = pattern.match(/(P+)(p+)?/);
|
|
137463
|
+
var datePattern = matchResult[1];
|
|
137464
|
+
var timePattern = matchResult[2];
|
|
137465
|
+
|
|
137466
|
+
if (!timePattern) {
|
|
137467
|
+
return dateLongFormatter(pattern, formatLong);
|
|
137468
|
+
}
|
|
137469
|
+
|
|
137470
|
+
var dateTimeFormat;
|
|
137471
|
+
|
|
137472
|
+
switch (datePattern) {
|
|
137473
|
+
case 'P':
|
|
137474
|
+
dateTimeFormat = formatLong.dateTime({
|
|
137475
|
+
width: 'short'
|
|
137476
|
+
});
|
|
137477
|
+
break;
|
|
137478
|
+
|
|
137479
|
+
case 'PP':
|
|
137480
|
+
dateTimeFormat = formatLong.dateTime({
|
|
137481
|
+
width: 'medium'
|
|
137482
|
+
});
|
|
137483
|
+
break;
|
|
137484
|
+
|
|
137485
|
+
case 'PPP':
|
|
137486
|
+
dateTimeFormat = formatLong.dateTime({
|
|
137487
|
+
width: 'long'
|
|
137488
|
+
});
|
|
137489
|
+
break;
|
|
137490
|
+
|
|
137491
|
+
case 'PPPP':
|
|
137492
|
+
default:
|
|
137493
|
+
dateTimeFormat = formatLong.dateTime({
|
|
137494
|
+
width: 'full'
|
|
137495
|
+
});
|
|
137496
|
+
break;
|
|
137497
|
+
}
|
|
137498
|
+
|
|
137499
|
+
return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));
|
|
137500
|
+
}
|
|
137501
|
+
|
|
137502
|
+
var longFormatters = {
|
|
137503
|
+
p: timeLongFormatter,
|
|
137504
|
+
P: dateTimeLongFormatter
|
|
137505
|
+
};
|
|
137506
|
+
var longFormatters$1 = longFormatters;
|
|
137507
|
+
|
|
137508
|
+
var protectedDayOfYearTokens = ['D', 'DD'];
|
|
137509
|
+
var protectedWeekYearTokens = ['YY', 'YYYY'];
|
|
137510
|
+
function isProtectedDayOfYearToken(token) {
|
|
137511
|
+
return protectedDayOfYearTokens.indexOf(token) !== -1;
|
|
137512
|
+
}
|
|
137513
|
+
function isProtectedWeekYearToken(token) {
|
|
137514
|
+
return protectedWeekYearTokens.indexOf(token) !== -1;
|
|
137515
|
+
}
|
|
137516
|
+
function throwProtectedError(token, format, input) {
|
|
137517
|
+
if (token === 'YYYY') {
|
|
137518
|
+
throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
137519
|
+
} else if (token === 'YY') {
|
|
137520
|
+
throw new RangeError("Use `yy` instead of `YY` (in `".concat(format, "`) for formatting years to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
137521
|
+
} else if (token === 'D') {
|
|
137522
|
+
throw new RangeError("Use `d` instead of `D` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
137523
|
+
} else if (token === 'DD') {
|
|
137524
|
+
throw new RangeError("Use `dd` instead of `DD` (in `".concat(format, "`) for formatting days of the month to the input `").concat(input, "`; see: https://git.io/fxCyr"));
|
|
137525
|
+
}
|
|
137526
|
+
}
|
|
137527
|
+
|
|
137528
|
+
// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
|
|
137529
|
+
// (one of the certain letters followed by `o`)
|
|
137530
|
+
// - (\w)\1* matches any sequences of the same letter
|
|
137531
|
+
// - '' matches two quote characters in a row
|
|
137532
|
+
// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
|
|
137533
|
+
// except a single quote symbol, which ends the sequence.
|
|
137534
|
+
// Two quote characters do not end the sequence.
|
|
137535
|
+
// If there is no matching single quote
|
|
137536
|
+
// then the sequence will continue until the end of the string.
|
|
137537
|
+
// - . matches any single character unmatched by previous parts of the RegExps
|
|
137538
|
+
|
|
137539
|
+
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also
|
|
137540
|
+
// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
|
|
137541
|
+
|
|
137542
|
+
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
137543
|
+
var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
137544
|
+
var doubleQuoteRegExp = /''/g;
|
|
137545
|
+
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
137546
|
+
/**
|
|
137547
|
+
* @name format
|
|
137548
|
+
* @category Common Helpers
|
|
137549
|
+
* @summary Format the date.
|
|
137550
|
+
*
|
|
137551
|
+
* @description
|
|
137552
|
+
* Return the formatted date string in the given format. The result may vary by locale.
|
|
137553
|
+
*
|
|
137554
|
+
* > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
|
|
137555
|
+
* > See: https://git.io/fxCyr
|
|
137556
|
+
*
|
|
137557
|
+
* The characters wrapped between two single quotes characters (') are escaped.
|
|
137558
|
+
* Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
|
|
137559
|
+
* (see the last example)
|
|
137560
|
+
*
|
|
137561
|
+
* Format of the string is based on Unicode Technical Standard #35:
|
|
137562
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
137563
|
+
* with a few additions (see note 7 below the table).
|
|
137564
|
+
*
|
|
137565
|
+
* Accepted patterns:
|
|
137566
|
+
* | Unit | Pattern | Result examples | Notes |
|
|
137567
|
+
* |---------------------------------|---------|-----------------------------------|-------|
|
|
137568
|
+
* | Era | G..GGG | AD, BC | |
|
|
137569
|
+
* | | GGGG | Anno Domini, Before Christ | 2 |
|
|
137570
|
+
* | | GGGGG | A, B | |
|
|
137571
|
+
* | Calendar year | y | 44, 1, 1900, 2017 | 5 |
|
|
137572
|
+
* | | yo | 44th, 1st, 0th, 17th | 5,7 |
|
|
137573
|
+
* | | yy | 44, 01, 00, 17 | 5 |
|
|
137574
|
+
* | | yyy | 044, 001, 1900, 2017 | 5 |
|
|
137575
|
+
* | | yyyy | 0044, 0001, 1900, 2017 | 5 |
|
|
137576
|
+
* | | yyyyy | ... | 3,5 |
|
|
137577
|
+
* | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
|
|
137578
|
+
* | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
|
|
137579
|
+
* | | YY | 44, 01, 00, 17 | 5,8 |
|
|
137580
|
+
* | | YYY | 044, 001, 1900, 2017 | 5 |
|
|
137581
|
+
* | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
|
|
137582
|
+
* | | YYYYY | ... | 3,5 |
|
|
137583
|
+
* | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
|
|
137584
|
+
* | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
|
|
137585
|
+
* | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
|
|
137586
|
+
* | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
|
|
137587
|
+
* | | RRRRR | ... | 3,5,7 |
|
|
137588
|
+
* | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
|
|
137589
|
+
* | | uu | -43, 01, 1900, 2017 | 5 |
|
|
137590
|
+
* | | uuu | -043, 001, 1900, 2017 | 5 |
|
|
137591
|
+
* | | uuuu | -0043, 0001, 1900, 2017 | 5 |
|
|
137592
|
+
* | | uuuuu | ... | 3,5 |
|
|
137593
|
+
* | Quarter (formatting) | Q | 1, 2, 3, 4 | |
|
|
137594
|
+
* | | Qo | 1st, 2nd, 3rd, 4th | 7 |
|
|
137595
|
+
* | | QQ | 01, 02, 03, 04 | |
|
|
137596
|
+
* | | QQQ | Q1, Q2, Q3, Q4 | |
|
|
137597
|
+
* | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
|
|
137598
|
+
* | | QQQQQ | 1, 2, 3, 4 | 4 |
|
|
137599
|
+
* | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
|
|
137600
|
+
* | | qo | 1st, 2nd, 3rd, 4th | 7 |
|
|
137601
|
+
* | | qq | 01, 02, 03, 04 | |
|
|
137602
|
+
* | | qqq | Q1, Q2, Q3, Q4 | |
|
|
137603
|
+
* | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
|
|
137604
|
+
* | | qqqqq | 1, 2, 3, 4 | 4 |
|
|
137605
|
+
* | Month (formatting) | M | 1, 2, ..., 12 | |
|
|
137606
|
+
* | | Mo | 1st, 2nd, ..., 12th | 7 |
|
|
137607
|
+
* | | MM | 01, 02, ..., 12 | |
|
|
137608
|
+
* | | MMM | Jan, Feb, ..., Dec | |
|
|
137609
|
+
* | | MMMM | January, February, ..., December | 2 |
|
|
137610
|
+
* | | MMMMM | J, F, ..., D | |
|
|
137611
|
+
* | Month (stand-alone) | L | 1, 2, ..., 12 | |
|
|
137612
|
+
* | | Lo | 1st, 2nd, ..., 12th | 7 |
|
|
137613
|
+
* | | LL | 01, 02, ..., 12 | |
|
|
137614
|
+
* | | LLL | Jan, Feb, ..., Dec | |
|
|
137615
|
+
* | | LLLL | January, February, ..., December | 2 |
|
|
137616
|
+
* | | LLLLL | J, F, ..., D | |
|
|
137617
|
+
* | Local week of year | w | 1, 2, ..., 53 | |
|
|
137618
|
+
* | | wo | 1st, 2nd, ..., 53th | 7 |
|
|
137619
|
+
* | | ww | 01, 02, ..., 53 | |
|
|
137620
|
+
* | ISO week of year | I | 1, 2, ..., 53 | 7 |
|
|
137621
|
+
* | | Io | 1st, 2nd, ..., 53th | 7 |
|
|
137622
|
+
* | | II | 01, 02, ..., 53 | 7 |
|
|
137623
|
+
* | Day of month | d | 1, 2, ..., 31 | |
|
|
137624
|
+
* | | do | 1st, 2nd, ..., 31st | 7 |
|
|
137625
|
+
* | | dd | 01, 02, ..., 31 | |
|
|
137626
|
+
* | Day of year | D | 1, 2, ..., 365, 366 | 9 |
|
|
137627
|
+
* | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
|
|
137628
|
+
* | | DD | 01, 02, ..., 365, 366 | 9 |
|
|
137629
|
+
* | | DDD | 001, 002, ..., 365, 366 | |
|
|
137630
|
+
* | | DDDD | ... | 3 |
|
|
137631
|
+
* | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
|
|
137632
|
+
* | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
|
|
137633
|
+
* | | EEEEE | M, T, W, T, F, S, S | |
|
|
137634
|
+
* | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
137635
|
+
* | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
|
|
137636
|
+
* | | io | 1st, 2nd, ..., 7th | 7 |
|
|
137637
|
+
* | | ii | 01, 02, ..., 07 | 7 |
|
|
137638
|
+
* | | iii | Mon, Tue, Wed, ..., Sun | 7 |
|
|
137639
|
+
* | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
|
|
137640
|
+
* | | iiiii | M, T, W, T, F, S, S | 7 |
|
|
137641
|
+
* | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
|
|
137642
|
+
* | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
|
|
137643
|
+
* | | eo | 2nd, 3rd, ..., 1st | 7 |
|
|
137644
|
+
* | | ee | 02, 03, ..., 01 | |
|
|
137645
|
+
* | | eee | Mon, Tue, Wed, ..., Sun | |
|
|
137646
|
+
* | | eeee | Monday, Tuesday, ..., Sunday | 2 |
|
|
137647
|
+
* | | eeeee | M, T, W, T, F, S, S | |
|
|
137648
|
+
* | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
137649
|
+
* | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
|
|
137650
|
+
* | | co | 2nd, 3rd, ..., 1st | 7 |
|
|
137651
|
+
* | | cc | 02, 03, ..., 01 | |
|
|
137652
|
+
* | | ccc | Mon, Tue, Wed, ..., Sun | |
|
|
137653
|
+
* | | cccc | Monday, Tuesday, ..., Sunday | 2 |
|
|
137654
|
+
* | | ccccc | M, T, W, T, F, S, S | |
|
|
137655
|
+
* | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
|
|
137656
|
+
* | AM, PM | a..aa | AM, PM | |
|
|
137657
|
+
* | | aaa | am, pm | |
|
|
137658
|
+
* | | aaaa | a.m., p.m. | 2 |
|
|
137659
|
+
* | | aaaaa | a, p | |
|
|
137660
|
+
* | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
|
|
137661
|
+
* | | bbb | am, pm, noon, midnight | |
|
|
137662
|
+
* | | bbbb | a.m., p.m., noon, midnight | 2 |
|
|
137663
|
+
* | | bbbbb | a, p, n, mi | |
|
|
137664
|
+
* | Flexible day period | B..BBB | at night, in the morning, ... | |
|
|
137665
|
+
* | | BBBB | at night, in the morning, ... | 2 |
|
|
137666
|
+
* | | BBBBB | at night, in the morning, ... | |
|
|
137667
|
+
* | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
|
|
137668
|
+
* | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
|
|
137669
|
+
* | | hh | 01, 02, ..., 11, 12 | |
|
|
137670
|
+
* | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
|
|
137671
|
+
* | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
|
|
137672
|
+
* | | HH | 00, 01, 02, ..., 23 | |
|
|
137673
|
+
* | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
|
|
137674
|
+
* | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
|
|
137675
|
+
* | | KK | 01, 02, ..., 11, 00 | |
|
|
137676
|
+
* | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
|
|
137677
|
+
* | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
|
|
137678
|
+
* | | kk | 24, 01, 02, ..., 23 | |
|
|
137679
|
+
* | Minute | m | 0, 1, ..., 59 | |
|
|
137680
|
+
* | | mo | 0th, 1st, ..., 59th | 7 |
|
|
137681
|
+
* | | mm | 00, 01, ..., 59 | |
|
|
137682
|
+
* | Second | s | 0, 1, ..., 59 | |
|
|
137683
|
+
* | | so | 0th, 1st, ..., 59th | 7 |
|
|
137684
|
+
* | | ss | 00, 01, ..., 59 | |
|
|
137685
|
+
* | Fraction of second | S | 0, 1, ..., 9 | |
|
|
137686
|
+
* | | SS | 00, 01, ..., 99 | |
|
|
137687
|
+
* | | SSS | 000, 001, ..., 999 | |
|
|
137688
|
+
* | | SSSS | ... | 3 |
|
|
137689
|
+
* | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
|
|
137690
|
+
* | | XX | -0800, +0530, Z | |
|
|
137691
|
+
* | | XXX | -08:00, +05:30, Z | |
|
|
137692
|
+
* | | XXXX | -0800, +0530, Z, +123456 | 2 |
|
|
137693
|
+
* | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
|
|
137694
|
+
* | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
|
|
137695
|
+
* | | xx | -0800, +0530, +0000 | |
|
|
137696
|
+
* | | xxx | -08:00, +05:30, +00:00 | 2 |
|
|
137697
|
+
* | | xxxx | -0800, +0530, +0000, +123456 | |
|
|
137698
|
+
* | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
|
|
137699
|
+
* | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
|
|
137700
|
+
* | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
|
|
137701
|
+
* | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
|
|
137702
|
+
* | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
|
|
137703
|
+
* | Seconds timestamp | t | 512969520 | 7 |
|
|
137704
|
+
* | | tt | ... | 3,7 |
|
|
137705
|
+
* | Milliseconds timestamp | T | 512969520900 | 7 |
|
|
137706
|
+
* | | TT | ... | 3,7 |
|
|
137707
|
+
* | Long localized date | P | 04/29/1453 | 7 |
|
|
137708
|
+
* | | PP | Apr 29, 1453 | 7 |
|
|
137709
|
+
* | | PPP | April 29th, 1453 | 7 |
|
|
137710
|
+
* | | PPPP | Friday, April 29th, 1453 | 2,7 |
|
|
137711
|
+
* | Long localized time | p | 12:00 AM | 7 |
|
|
137712
|
+
* | | pp | 12:00:00 AM | 7 |
|
|
137713
|
+
* | | ppp | 12:00:00 AM GMT+2 | 7 |
|
|
137714
|
+
* | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
|
|
137715
|
+
* | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
|
|
137716
|
+
* | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
|
|
137717
|
+
* | | PPPppp | April 29th, 1453 at ... | 7 |
|
|
137718
|
+
* | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
|
|
137719
|
+
* Notes:
|
|
137720
|
+
* 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
|
|
137721
|
+
* are the same as "stand-alone" units, but are different in some languages.
|
|
137722
|
+
* "Formatting" units are declined according to the rules of the language
|
|
137723
|
+
* in the context of a date. "Stand-alone" units are always nominative singular:
|
|
137724
|
+
*
|
|
137725
|
+
* `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
|
|
137726
|
+
*
|
|
137727
|
+
* `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
|
|
137728
|
+
*
|
|
137729
|
+
* 2. Any sequence of the identical letters is a pattern, unless it is escaped by
|
|
137730
|
+
* the single quote characters (see below).
|
|
137731
|
+
* If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
|
|
137732
|
+
* the output will be the same as default pattern for this unit, usually
|
|
137733
|
+
* the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
|
|
137734
|
+
* are marked with "2" in the last column of the table.
|
|
137735
|
+
*
|
|
137736
|
+
* `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
|
|
137737
|
+
*
|
|
137738
|
+
* `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
|
|
137739
|
+
*
|
|
137740
|
+
* `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
|
|
137741
|
+
*
|
|
137742
|
+
* `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
|
|
137743
|
+
*
|
|
137744
|
+
* `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
|
|
137745
|
+
*
|
|
137746
|
+
* 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
|
|
137747
|
+
* The output will be padded with zeros to match the length of the pattern.
|
|
137748
|
+
*
|
|
137749
|
+
* `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
|
|
137750
|
+
*
|
|
137751
|
+
* 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
|
|
137752
|
+
* These tokens represent the shortest form of the quarter.
|
|
137753
|
+
*
|
|
137754
|
+
* 5. The main difference between `y` and `u` patterns are B.C. years:
|
|
137755
|
+
*
|
|
137756
|
+
* | Year | `y` | `u` |
|
|
137757
|
+
* |------|-----|-----|
|
|
137758
|
+
* | AC 1 | 1 | 1 |
|
|
137759
|
+
* | BC 1 | 1 | 0 |
|
|
137760
|
+
* | BC 2 | 2 | -1 |
|
|
137761
|
+
*
|
|
137762
|
+
* Also `yy` always returns the last two digits of a year,
|
|
137763
|
+
* while `uu` pads single digit years to 2 characters and returns other years unchanged:
|
|
137764
|
+
*
|
|
137765
|
+
* | Year | `yy` | `uu` |
|
|
137766
|
+
* |------|------|------|
|
|
137767
|
+
* | 1 | 01 | 01 |
|
|
137768
|
+
* | 14 | 14 | 14 |
|
|
137769
|
+
* | 376 | 76 | 376 |
|
|
137770
|
+
* | 1453 | 53 | 1453 |
|
|
137771
|
+
*
|
|
137772
|
+
* The same difference is true for local and ISO week-numbering years (`Y` and `R`),
|
|
137773
|
+
* except local week-numbering years are dependent on `options.weekStartsOn`
|
|
137774
|
+
* and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}
|
|
137775
|
+
* and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).
|
|
137776
|
+
*
|
|
137777
|
+
* 6. Specific non-location timezones are currently unavailable in `date-fns`,
|
|
137778
|
+
* so right now these tokens fall back to GMT timezones.
|
|
137779
|
+
*
|
|
137780
|
+
* 7. These patterns are not in the Unicode Technical Standard #35:
|
|
137781
|
+
* - `i`: ISO day of week
|
|
137782
|
+
* - `I`: ISO week of year
|
|
137783
|
+
* - `R`: ISO week-numbering year
|
|
137784
|
+
* - `t`: seconds timestamp
|
|
137785
|
+
* - `T`: milliseconds timestamp
|
|
137786
|
+
* - `o`: ordinal number modifier
|
|
137787
|
+
* - `P`: long localized date
|
|
137788
|
+
* - `p`: long localized time
|
|
137789
|
+
*
|
|
137790
|
+
* 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
|
|
137791
|
+
* You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://git.io/fxCyr
|
|
137792
|
+
*
|
|
137793
|
+
* 9. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.
|
|
137794
|
+
* You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://git.io/fxCyr
|
|
137795
|
+
*
|
|
137796
|
+
* ### v2.0.0 breaking changes:
|
|
137797
|
+
*
|
|
137798
|
+
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
137799
|
+
*
|
|
137800
|
+
* - The second argument is now required for the sake of explicitness.
|
|
137801
|
+
*
|
|
137802
|
+
* ```javascript
|
|
137803
|
+
* // Before v2.0.0
|
|
137804
|
+
* format(new Date(2016, 0, 1))
|
|
137805
|
+
*
|
|
137806
|
+
* // v2.0.0 onward
|
|
137807
|
+
* format(new Date(2016, 0, 1), "yyyy-MM-dd'T'HH:mm:ss.SSSxxx")
|
|
137808
|
+
* ```
|
|
137809
|
+
*
|
|
137810
|
+
* - New format string API for `format` function
|
|
137811
|
+
* which is based on [Unicode Technical Standard #35](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).
|
|
137812
|
+
* See [this post](https://blog.date-fns.org/post/unicode-tokens-in-date-fns-v2-sreatyki91jg) for more details.
|
|
137813
|
+
*
|
|
137814
|
+
* - Characters are now escaped using single quote symbols (`'`) instead of square brackets.
|
|
137815
|
+
*
|
|
137816
|
+
* @param {Date|Number} date - the original date
|
|
137817
|
+
* @param {String} format - the string of tokens
|
|
137818
|
+
* @param {Object} [options] - an object with options.
|
|
137819
|
+
* @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
|
|
137820
|
+
* @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
|
|
137821
|
+
* @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is
|
|
137822
|
+
* @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;
|
|
137823
|
+
* see: https://git.io/fxCyr
|
|
137824
|
+
* @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;
|
|
137825
|
+
* see: https://git.io/fxCyr
|
|
137826
|
+
* @returns {String} the formatted date string
|
|
137827
|
+
* @throws {TypeError} 2 arguments required
|
|
137828
|
+
* @throws {RangeError} `date` must not be Invalid Date
|
|
137829
|
+
* @throws {RangeError} `options.locale` must contain `localize` property
|
|
137830
|
+
* @throws {RangeError} `options.locale` must contain `formatLong` property
|
|
137831
|
+
* @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
|
|
137832
|
+
* @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
|
|
137833
|
+
* @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr
|
|
137834
|
+
* @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr
|
|
137835
|
+
* @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr
|
|
137836
|
+
* @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr
|
|
137837
|
+
* @throws {RangeError} format string contains an unescaped latin alphabet character
|
|
137838
|
+
*
|
|
137839
|
+
* @example
|
|
137840
|
+
* // Represent 11 February 2014 in middle-endian format:
|
|
137841
|
+
* var result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
|
|
137842
|
+
* //=> '02/11/2014'
|
|
137843
|
+
*
|
|
137844
|
+
* @example
|
|
137845
|
+
* // Represent 2 July 2014 in Esperanto:
|
|
137846
|
+
* import { eoLocale } from 'date-fns/locale/eo'
|
|
137847
|
+
* var result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
|
|
137848
|
+
* locale: eoLocale
|
|
137849
|
+
* })
|
|
137850
|
+
* //=> '2-a de julio 2014'
|
|
137851
|
+
*
|
|
137852
|
+
* @example
|
|
137853
|
+
* // Escape string by single quote characters:
|
|
137854
|
+
* var result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
|
|
137855
|
+
* //=> "3 o'clock"
|
|
137856
|
+
*/
|
|
137857
|
+
|
|
137858
|
+
function format(dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
137859
|
+
requiredArgs(2, arguments);
|
|
137860
|
+
var formatStr = String(dirtyFormatStr);
|
|
137861
|
+
var options = dirtyOptions || {};
|
|
137862
|
+
var locale = options.locale || defaultLocale;
|
|
137863
|
+
var localeFirstWeekContainsDate = locale.options && locale.options.firstWeekContainsDate;
|
|
137864
|
+
var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);
|
|
137865
|
+
var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
137866
|
+
|
|
137867
|
+
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
137868
|
+
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
137869
|
+
}
|
|
137870
|
+
|
|
137871
|
+
var localeWeekStartsOn = locale.options && locale.options.weekStartsOn;
|
|
137872
|
+
var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);
|
|
137873
|
+
var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
137874
|
+
|
|
137875
|
+
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
137876
|
+
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
137877
|
+
}
|
|
137878
|
+
|
|
137879
|
+
if (!locale.localize) {
|
|
137880
|
+
throw new RangeError('locale must contain localize property');
|
|
137881
|
+
}
|
|
137882
|
+
|
|
137883
|
+
if (!locale.formatLong) {
|
|
137884
|
+
throw new RangeError('locale must contain formatLong property');
|
|
137885
|
+
}
|
|
137886
|
+
|
|
137887
|
+
var originalDate = toDate(dirtyDate);
|
|
137888
|
+
|
|
137889
|
+
if (!isValid(originalDate)) {
|
|
137890
|
+
throw new RangeError('Invalid time value');
|
|
137891
|
+
} // Convert the date in system timezone to the same date in UTC+00:00 timezone.
|
|
137892
|
+
// This ensures that when UTC functions will be implemented, locales will be compatible with them.
|
|
137893
|
+
// See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
|
|
137894
|
+
|
|
137895
|
+
|
|
137896
|
+
var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
|
|
137897
|
+
var utcDate = subMilliseconds(originalDate, timezoneOffset);
|
|
137898
|
+
var formatterOptions = {
|
|
137899
|
+
firstWeekContainsDate: firstWeekContainsDate,
|
|
137900
|
+
weekStartsOn: weekStartsOn,
|
|
137901
|
+
locale: locale,
|
|
137902
|
+
_originalDate: originalDate
|
|
137903
|
+
};
|
|
137904
|
+
var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
|
|
137905
|
+
var firstCharacter = substring[0];
|
|
137906
|
+
|
|
137907
|
+
if (firstCharacter === 'p' || firstCharacter === 'P') {
|
|
137908
|
+
var longFormatter = longFormatters$1[firstCharacter];
|
|
137909
|
+
return longFormatter(substring, locale.formatLong, formatterOptions);
|
|
137910
|
+
}
|
|
137911
|
+
|
|
137912
|
+
return substring;
|
|
137913
|
+
}).join('').match(formattingTokensRegExp).map(function (substring) {
|
|
137914
|
+
// Replace two single quote characters with one single quote character
|
|
137915
|
+
if (substring === "''") {
|
|
137916
|
+
return "'";
|
|
137917
|
+
}
|
|
137918
|
+
|
|
137919
|
+
var firstCharacter = substring[0];
|
|
137920
|
+
|
|
137921
|
+
if (firstCharacter === "'") {
|
|
137922
|
+
return cleanEscapedString(substring);
|
|
137923
|
+
}
|
|
137924
|
+
|
|
137925
|
+
var formatter = formatters$1[firstCharacter];
|
|
137926
|
+
|
|
137927
|
+
if (formatter) {
|
|
137928
|
+
if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(substring)) {
|
|
137929
|
+
throwProtectedError(substring, dirtyFormatStr, dirtyDate);
|
|
137930
|
+
}
|
|
137931
|
+
|
|
137932
|
+
if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(substring)) {
|
|
137933
|
+
throwProtectedError(substring, dirtyFormatStr, dirtyDate);
|
|
137934
|
+
}
|
|
137935
|
+
|
|
137936
|
+
return formatter(utcDate, substring, locale.localize, formatterOptions);
|
|
137937
|
+
}
|
|
137938
|
+
|
|
137939
|
+
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
137940
|
+
throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
|
|
137941
|
+
}
|
|
137942
|
+
|
|
137943
|
+
return substring;
|
|
137944
|
+
}).join('');
|
|
137945
|
+
return result;
|
|
137946
|
+
}
|
|
137947
|
+
|
|
137948
|
+
function cleanEscapedString(input) {
|
|
137949
|
+
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
|
137950
|
+
}
|
|
137951
|
+
|
|
135600
137952
|
var PublishingDateFilter = function PublishingDateFilter() {
|
|
135601
137953
|
var publishingDateRef = useRef$1();
|
|
135602
137954
|
var formatMessage = useIntl().formatMessage;
|
|
@@ -135612,6 +137964,7 @@ var PublishingDateFilter = function PublishingDateFilter() {
|
|
|
135612
137964
|
var today = new Date();
|
|
135613
137965
|
var startOfToday = startOfDay(today);
|
|
135614
137966
|
var endOfToday = endOfDay(today);
|
|
137967
|
+
var isActive = (filter === null || filter === void 0 ? void 0 : filter.beforeDate) || (filter === null || filter === void 0 ? void 0 : filter.afterDate);
|
|
135615
137968
|
return jsxs("div", __assign$g({
|
|
135616
137969
|
ref: publishingDateRef
|
|
135617
137970
|
}, {
|
|
@@ -135619,13 +137972,13 @@ var PublishingDateFilter = function PublishingDateFilter() {
|
|
|
135619
137972
|
iconProps: {
|
|
135620
137973
|
iconName: showDates ? 'ChevronUp' : 'ChevronDown'
|
|
135621
137974
|
},
|
|
135622
|
-
text: formatMessage({
|
|
137975
|
+
text: isActive ? getButtonText() : formatMessage({
|
|
135623
137976
|
id: 'FilterPanel.publishingDate'
|
|
135624
137977
|
}),
|
|
135625
137978
|
onClick: function () {
|
|
135626
137979
|
return setShowDates(!showDates);
|
|
135627
137980
|
},
|
|
135628
|
-
isActive:
|
|
137981
|
+
isActive: isActive
|
|
135629
137982
|
}, void 0), showDates && jsx$1(Callout, __assign$g({
|
|
135630
137983
|
target: publishingDateRef.current,
|
|
135631
137984
|
onDismiss: function () {
|
|
@@ -135639,7 +137992,7 @@ var PublishingDateFilter = function PublishingDateFilter() {
|
|
|
135639
137992
|
}
|
|
135640
137993
|
}
|
|
135641
137994
|
}, {
|
|
135642
|
-
children: jsxs(Host, {
|
|
137995
|
+
children: jsxs(Host$1, {
|
|
135643
137996
|
children: [jsx$1(StyledDateTimePicker, {
|
|
135644
137997
|
label: formatMessage({
|
|
135645
137998
|
id: 'FilterPanel.publishingDateFrom'
|
|
@@ -135659,8 +138012,7 @@ var PublishingDateFilter = function PublishingDateFilter() {
|
|
|
135659
138012
|
noDateResourceKey: "MetadataEditor.noDate",
|
|
135660
138013
|
selectDateResourceKey: "FilterPanel.publishingDatePlaceholder",
|
|
135661
138014
|
onChanged: handleEndDateChange,
|
|
135662
|
-
minDate: filter === null || filter === void 0 ? void 0 : filter.afterDate
|
|
135663
|
-
maxDate: today.toString()
|
|
138015
|
+
minDate: filter === null || filter === void 0 ? void 0 : filter.afterDate
|
|
135664
138016
|
}, void 0), jsxs(DateShortcuts, {
|
|
135665
138017
|
children: [jsx$1(FormattedMessage$1, {
|
|
135666
138018
|
id: "FilterPanel.publishingDateShortcuts"
|
|
@@ -135705,7 +138057,7 @@ var PublishingDateFilter = function PublishingDateFilter() {
|
|
|
135705
138057
|
},
|
|
135706
138058
|
label: "FilterPanel.publishingDateShortcuts.lastMonth"
|
|
135707
138059
|
}, void 0)]
|
|
135708
|
-
}, void 0), jsx$1(ClearFilterButton, {
|
|
138060
|
+
}, void 0), jsx$1(ClearFilterButton$1, {
|
|
135709
138061
|
text: "Clear filter",
|
|
135710
138062
|
iconProps: {
|
|
135711
138063
|
iconName: 'ClearFilter'
|
|
@@ -135734,6 +138086,25 @@ var PublishingDateFilter = function PublishingDateFilter() {
|
|
|
135734
138086
|
afterDate: null
|
|
135735
138087
|
}));
|
|
135736
138088
|
}
|
|
138089
|
+
|
|
138090
|
+
function getButtonText() {
|
|
138091
|
+
var start = format(new Date(filter.afterDate), 'P');
|
|
138092
|
+
var end = format(new Date(filter.beforeDate), 'P');
|
|
138093
|
+
|
|
138094
|
+
if (!filter.afterDate) {
|
|
138095
|
+
return formatMessage({
|
|
138096
|
+
id: 'FilterPanel.publishingDateBefore'
|
|
138097
|
+
}) + " " + end;
|
|
138098
|
+
}
|
|
138099
|
+
|
|
138100
|
+
if (!filter.beforeDate) {
|
|
138101
|
+
return formatMessage({
|
|
138102
|
+
id: 'FilterPanel.publishingDateAfter'
|
|
138103
|
+
}) + " " + start;
|
|
138104
|
+
}
|
|
138105
|
+
|
|
138106
|
+
return start + " - " + end;
|
|
138107
|
+
}
|
|
135737
138108
|
};
|
|
135738
138109
|
|
|
135739
138110
|
var DateShortcutButton = function DateShortcutButton(_a) {
|
|
@@ -135752,22 +138123,22 @@ var DateShortcutButton = function DateShortcutButton(_a) {
|
|
|
135752
138123
|
}), void 0);
|
|
135753
138124
|
};
|
|
135754
138125
|
|
|
135755
|
-
var Host = _styled.div.withConfig({
|
|
138126
|
+
var Host$1 = _styled.div.withConfig({
|
|
135756
138127
|
displayName: "PublishingDateFilter__Host",
|
|
135757
138128
|
componentId: "sc-zv88cu-0"
|
|
135758
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
138129
|
+
})(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
135759
138130
|
|
|
135760
138131
|
var DateButton = _styled(ActionButton).withConfig({
|
|
135761
138132
|
displayName: "PublishingDateFilter__DateButton",
|
|
135762
138133
|
componentId: "sc-zv88cu-1"
|
|
135763
|
-
})(templateObject_3 || (templateObject_3 = __makeTemplateObject$l(["\n ", "\n i {\n order: 1;\n }\n"], ["\n ", "\n i {\n order: 1;\n }\n"])), function (p) {
|
|
135764
|
-
return p.isActive && css$2(templateObject_2 || (templateObject_2 = __makeTemplateObject$l(["\n font-weight: bold;\n "], ["\n font-weight: bold;\n "])));
|
|
138134
|
+
})(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject$l(["\n ", "\n i {\n order: 1;\n }\n"], ["\n ", "\n i {\n order: 1;\n }\n"])), function (p) {
|
|
138135
|
+
return p.isActive && css$2(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject$l(["\n font-weight: bold;\n "], ["\n font-weight: bold;\n "])));
|
|
135765
138136
|
});
|
|
135766
138137
|
|
|
135767
|
-
var ClearFilterButton = _styled(DefaultButton).withConfig({
|
|
138138
|
+
var ClearFilterButton$1 = _styled(DefaultButton).withConfig({
|
|
135768
138139
|
displayName: "PublishingDateFilter__ClearFilterButton",
|
|
135769
138140
|
componentId: "sc-zv88cu-2"
|
|
135770
|
-
})(templateObject_4 || (templateObject_4 = __makeTemplateObject$l(["\n margin-left: auto;\n\n .ms-Button-label {\n font-weight: normal;\n }\n"], ["\n margin-left: auto;\n\n .ms-Button-label {\n font-weight: normal;\n }\n"])));
|
|
138141
|
+
})(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject$l(["\n margin-left: auto;\n\n .ms-Button-label {\n font-weight: normal;\n }\n"], ["\n margin-left: auto;\n\n .ms-Button-label {\n font-weight: normal;\n }\n"])));
|
|
135771
138142
|
|
|
135772
138143
|
var StyledDateTimePicker = _styled(DateTimePicker).withConfig({
|
|
135773
138144
|
displayName: "PublishingDateFilter__StyledDateTimePicker",
|
|
@@ -135781,7 +138152,7 @@ var DateShortcuts = _styled.div.withConfig({
|
|
|
135781
138152
|
return p.theme.palette.themePrimary;
|
|
135782
138153
|
});
|
|
135783
138154
|
|
|
135784
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
138155
|
+
var templateObject_1$2, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5, templateObject_6;
|
|
135785
138156
|
|
|
135786
138157
|
var ClearAllFiltersButton = function ClearAllFiltersButton(_a) {
|
|
135787
138158
|
var onClick = _a.onClick;
|
|
@@ -135794,4 +138165,135 @@ var ClearAllFiltersButton = function ClearAllFiltersButton(_a) {
|
|
|
135794
138165
|
}, void 0);
|
|
135795
138166
|
};
|
|
135796
138167
|
|
|
135797
|
-
|
|
138168
|
+
var ToolbarFilterCalloutButton = function ToolbarFilterCalloutButton(_a) {
|
|
138169
|
+
var buttonText = _a.buttonText,
|
|
138170
|
+
buttonContent = _a.buttonContent,
|
|
138171
|
+
isActive = _a.isActive,
|
|
138172
|
+
handleClearFilter = _a.handleClearFilter,
|
|
138173
|
+
className = _a.className,
|
|
138174
|
+
children = _a.children;
|
|
138175
|
+
var hostRef = useRef$1();
|
|
138176
|
+
|
|
138177
|
+
var _b = useState$2(false),
|
|
138178
|
+
showCallout = _b[0],
|
|
138179
|
+
setShowCallout = _b[1];
|
|
138180
|
+
|
|
138181
|
+
return jsxs("div", __assign$g({
|
|
138182
|
+
ref: hostRef,
|
|
138183
|
+
className: className
|
|
138184
|
+
}, {
|
|
138185
|
+
children: [jsx$1(Button, __assign$g({
|
|
138186
|
+
iconProps: {
|
|
138187
|
+
iconName: showCallout ? 'ChevronUp' : 'ChevronDown'
|
|
138188
|
+
},
|
|
138189
|
+
text: !buttonContent ? buttonText : undefined,
|
|
138190
|
+
onClick: function () {
|
|
138191
|
+
return setShowCallout(!showCallout);
|
|
138192
|
+
},
|
|
138193
|
+
isActive: isActive
|
|
138194
|
+
}, {
|
|
138195
|
+
children: buttonContent
|
|
138196
|
+
}), void 0), showCallout && jsx$1(Callout, __assign$g({
|
|
138197
|
+
target: hostRef.current,
|
|
138198
|
+
onDismiss: function () {
|
|
138199
|
+
return setShowCallout(false);
|
|
138200
|
+
},
|
|
138201
|
+
isBeakVisible: false,
|
|
138202
|
+
calloutWidth: 240,
|
|
138203
|
+
styles: {
|
|
138204
|
+
calloutMain: {
|
|
138205
|
+
padding: spacingM
|
|
138206
|
+
}
|
|
138207
|
+
}
|
|
138208
|
+
}, {
|
|
138209
|
+
children: jsxs(Host, {
|
|
138210
|
+
children: [children, jsx$1(ClearFilterButton, {
|
|
138211
|
+
text: "Clear filter",
|
|
138212
|
+
iconProps: {
|
|
138213
|
+
iconName: 'ClearFilter'
|
|
138214
|
+
},
|
|
138215
|
+
onClick: handleClearFilter
|
|
138216
|
+
}, void 0)]
|
|
138217
|
+
}, void 0)
|
|
138218
|
+
}), void 0)]
|
|
138219
|
+
}), void 0);
|
|
138220
|
+
};
|
|
138221
|
+
|
|
138222
|
+
var Host = _styled.div.withConfig({
|
|
138223
|
+
displayName: "ToolbarFilterCalloutButton__Host",
|
|
138224
|
+
componentId: "sc-fu36ma-0"
|
|
138225
|
+
})(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
138226
|
+
|
|
138227
|
+
var Button = _styled(ActionButton).withConfig({
|
|
138228
|
+
displayName: "ToolbarFilterCalloutButton__Button",
|
|
138229
|
+
componentId: "sc-fu36ma-1"
|
|
138230
|
+
})(templateObject_3 || (templateObject_3 = __makeTemplateObject$l(["\n ", "\n i {\n order: 1;\n }\n"], ["\n ", "\n i {\n order: 1;\n }\n"])), function (p) {
|
|
138231
|
+
return p.isActive && css$2(templateObject_2 || (templateObject_2 = __makeTemplateObject$l(["\n font-weight: bold;\n "], ["\n font-weight: bold;\n "])));
|
|
138232
|
+
});
|
|
138233
|
+
|
|
138234
|
+
var ClearFilterButton = _styled(DefaultButton).withConfig({
|
|
138235
|
+
displayName: "ToolbarFilterCalloutButton__ClearFilterButton",
|
|
138236
|
+
componentId: "sc-fu36ma-2"
|
|
138237
|
+
})(templateObject_4 || (templateObject_4 = __makeTemplateObject$l(["\n margin-left: auto;\n\n .ms-Button-label {\n font-weight: normal;\n }\n"], ["\n margin-left: auto;\n\n .ms-Button-label {\n font-weight: normal;\n }\n"])));
|
|
138238
|
+
|
|
138239
|
+
var templateObject_1$1, templateObject_2, templateObject_3, templateObject_4;
|
|
138240
|
+
|
|
138241
|
+
var KeywordsFilter = function KeywordsFilter() {
|
|
138242
|
+
var _a;
|
|
138243
|
+
|
|
138244
|
+
var formatMessage = useIntl().formatMessage;
|
|
138245
|
+
|
|
138246
|
+
var _b = useContext(FilterContext),
|
|
138247
|
+
filter = _b.filter,
|
|
138248
|
+
onChange = _b.onChange;
|
|
138249
|
+
|
|
138250
|
+
return jsx$1(ToolbarFilterCalloutButton, __assign$g({
|
|
138251
|
+
buttonText: formatMessage({
|
|
138252
|
+
id: 'FilterPanel.keywordFilter'
|
|
138253
|
+
}),
|
|
138254
|
+
buttonContent: getButtonContent(),
|
|
138255
|
+
handleClearFilter: function () {
|
|
138256
|
+
return onChange(__assign$g(__assign$g({}, filter), {
|
|
138257
|
+
keywords: null
|
|
138258
|
+
}));
|
|
138259
|
+
},
|
|
138260
|
+
isActive: ((_a = filter === null || filter === void 0 ? void 0 : filter.keywords) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
138261
|
+
}, {
|
|
138262
|
+
children: jsx$1(StyledKeywordPicker, {
|
|
138263
|
+
value: (filter === null || filter === void 0 ? void 0 : filter.keywords) || [],
|
|
138264
|
+
onChange: function (keywords) {
|
|
138265
|
+
return onChange(__assign$g(__assign$g({}, filter), {
|
|
138266
|
+
keywords: keywords
|
|
138267
|
+
}));
|
|
138268
|
+
},
|
|
138269
|
+
showSelectionToggle: true
|
|
138270
|
+
}, void 0)
|
|
138271
|
+
}), void 0);
|
|
138272
|
+
|
|
138273
|
+
function getButtonContent() {
|
|
138274
|
+
var _a;
|
|
138275
|
+
|
|
138276
|
+
var keywordsLength = (_a = filter === null || filter === void 0 ? void 0 : filter.keywords) === null || _a === void 0 ? void 0 : _a.length;
|
|
138277
|
+
|
|
138278
|
+
if (!keywordsLength) {
|
|
138279
|
+
return undefined;
|
|
138280
|
+
}
|
|
138281
|
+
|
|
138282
|
+
return jsxs(Fragment, {
|
|
138283
|
+
children: [jsx$1(KeywordTitle, {
|
|
138284
|
+
keywordName: filter.keywords[0].name
|
|
138285
|
+
}, void 0), "\u00A0", keywordsLength > 1 && jsxs(Fragment, {
|
|
138286
|
+
children: ["(+", keywordsLength - 1, ")\u00A0"]
|
|
138287
|
+
}, void 0)]
|
|
138288
|
+
}, void 0);
|
|
138289
|
+
}
|
|
138290
|
+
};
|
|
138291
|
+
|
|
138292
|
+
var StyledKeywordPicker = _styled(KeywordPicker).withConfig({
|
|
138293
|
+
displayName: "KeywordsFilter__StyledKeywordPicker",
|
|
138294
|
+
componentId: "sc-1aoeg5i-0"
|
|
138295
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject$l(["\n margin-bottom: 20px;\n\n .keyword-picker-tree div:last-child {\n margin-bottom: 0;\n }\n"], ["\n margin-bottom: 20px;\n\n .keyword-picker-tree div:last-child {\n margin-bottom: 0;\n }\n"])));
|
|
138296
|
+
|
|
138297
|
+
var templateObject_1;
|
|
138298
|
+
|
|
138299
|
+
export { Avatar as A, PublishingDateFilter as B, ChannelFilter as C, ClearAllFiltersButton as D, EventDetail as E, ItemLayoutMode as I, KeywordsFilter as K, ManageChannels as M, NewsDetail as N, PropTypes$2 as P, ReachContextProvider as R, ThemeContext$1 as T, UserDetails as U, _assertThisInitialized$b as _, commonjsGlobal$7 as a, _setPrototypeOf$6 as b, commonjsRequire as c, _defineProperty$p as d, _extends$9 as e, minScreenSize as f, PageDetail as g, NewsList as h, NewsGrid as i, useCurrentUser as j, NewsHero as k, NewsEditorDashboard as l, moment$1 as m, Toolbar$1 as n, ToolbarIconButton as o, ToolbarChannelSelector as p, ToolbarMarkAllEventsAsReadButton as q, ToolbarMarkAllNewsAsReadButton as r, ToolbarCloseButton as s, NewsItemContextProvider as t, useWindowSize$2 as u, ToolbarNewsLanguageSelector as v, ToolbarManageNewsItemButton as w, NewsDetailPreview as x, NewsItemPreviewContextProvider as y, ToolbarFilterPanel as z };
|