Changes for page Prepare

Last modified by Veronika Kocher on Friday, 18 Sep 2026 16:47

From version 29.7
edited by Veronika Kocher
on Thursday, 03 Sep 2026 9:18
Change comment: There is no comment for this version
To version 30.1
edited by Veronika Kocher
on Thursday, 03 Sep 2026 15:03
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -Enable
1 +Prepare
Content
... ... @@ -486,21 +486,132 @@
486 486  {{/html}}
487 487  
488 488  {{html clean="false"}}
489 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_START -->
490 -<style data-sn-horizontal-box-harmonizer="1">
491 -[data-sn-equal-height-managed="1"]{box-sizing:border-box}
492 -@media(max-width:767px){
493 - [data-sn-equal-height-managed="1"]{min-height:0!important}
489 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_START -->
490 +
491 +<style data-sn-service-navigator-master="1">
492 +/* =========================================================
493 + MASTER TYPOGRAPHY
494 + ========================================================= */
495 +#xwikicontent h1,
496 +#xwikicontent h2,
497 +#xwikicontent h3,
498 +#xwikicontent h4,
499 +#xwikicontent h5,
500 +#xwikicontent h6,
501 +#xwikicontent .box-title,
502 +#xwikicontent [role="heading"],
503 +#xwikicontent h1 a,
504 +#xwikicontent h2 a,
505 +#xwikicontent h3 a,
506 +#xwikicontent h4 a,
507 +#xwikicontent h5 a,
508 +#xwikicontent h6 a,
509 +#xwikicontent .box-title a,
510 +#xwikicontent [role="heading"] a{
511 + text-align:left!important;
512 + text-justify:auto!important;
513 + word-spacing:normal!important;
494 494  }
515 +
516 +/* =========================================================
517 + COMING SOON / IN VORBEREITUNG
518 + ========================================================= */
519 +.sn-coming-soon-badge{
520 + display:inline-block;
521 + vertical-align:middle;
522 + margin-left:10px;
523 + padding:4px 8px;
524 + border-radius:14px;
525 + border:1px solid #efd9cc;
526 + background:#fff4ee;
527 + color:#8a4d36;
528 + font-size:11px;
529 + font-weight:700;
530 + letter-spacing:.055em;
531 + line-height:1.2;
532 + white-space:nowrap;
533 +}
534 +
535 +/* =========================================================
536 + NATIVE / DETAIL CALLOUT GEOMETRY
537 + Preserve existing backgrounds.
538 + ========================================================= */
539 +#xwikicontent .arsn-info,
540 +#xwikicontent .dmp-info,
541 +#xwikicontent .ido-info,
542 +#xwikicontent .pp-info,
543 +#xwikicontent .infomessage{
544 + box-sizing:border-box!important;
545 + border-left:4px solid #21b6d7!important;
546 + border-radius:8px;
547 + text-align:left!important;
548 + word-spacing:normal!important;
549 +}
550 +
551 +#xwikicontent .arsn-warn,
552 +#xwikicontent .dmp-warn,
553 +#xwikicontent .ido-warn,
554 +#xwikicontent .pp-warn,
555 +#xwikicontent .warn,
556 +#xwikicontent .warning,
557 +#xwikicontent .warningmessage,
558 +#xwikicontent .errormessage{
559 + box-sizing:border-box!important;
560 + border-left:4px solid #e94b13!important;
561 + border-radius:8px;
562 + text-align:left!important;
563 + word-spacing:normal!important;
564 +}
565 +
566 +[data-sn-master-equal-height],
567 +[data-sn-master-first-row]{
568 + box-sizing:border-box;
569 +}
570 +
571 +/* =========================================================
572 + FULL-WIDTH THREE-LINE NUMBER / TITLE / SUBTITLE BLOCKS
573 + ========================================================= */
574 +#xwikicontent .arsn-area-label[data-sn-three-line="1"]{
575 + display:grid!important;
576 + grid-template-columns:minmax(0,1fr)!important;
577 + grid-auto-rows:auto!important;
578 + width:100%!important;
579 + max-width:none!important;
580 + box-sizing:border-box!important;
581 + justify-items:start!important;
582 + align-items:start!important;
583 + gap:2px!important;
584 + text-align:left!important;
585 + text-align-last:left!important;
586 + text-justify:auto!important;
587 + word-spacing:normal!important;
588 + white-space:normal!important;
589 +}
590 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-number,
591 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .sn-area-label-title,
592 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-action{
593 + display:block!important;
594 + width:100%!important;
595 + margin:0!important;
596 + text-align:left!important;
597 + text-align-last:left!important;
598 + text-justify:auto!important;
599 + word-spacing:normal!important;
600 + white-space:normal!important;
601 +}
495 495  </style>
496 -<script data-sn-horizontal-box-harmonizer="1">
603 +
604 +<script data-sn-service-navigator-master="1">
497 497  (function(){
498 498   "use strict";
499 499  
608 + var PAGE_KIND="overview";
609 + var PLACEHOLDER=false;
610 + var PLACEHOLDER_LABEL="COMING SOON";
611 +
500 500   var MOBILE_MAX=767;
501 - var ROW_TOLERANCE=4;
502 - var MIN_W=150;
503 - var MIN_H=36;
613 + var ROW_TOLERANCE=6;
614 + var RESIZE_DEBOUNCE=220;
504 504  
505 505   var root=
506 506   document.getElementById("xwikicontent")||
... ... @@ -510,212 +510,1268 @@
510 510  
511 511   if(!root)return;
512 512  
513 - var managed=new Set();
514 - var raf=0;
624 + var managedHeight=new Set();
625 + var managedMargin=new Set();
626 + var originalHeight=new WeakMap();
627 + var originalMargin=new WeakMap();
515 515  
516 - function num(v){
517 - var n=parseFloat(v);
629 + var resizeTimer=0;
630 + var running=false;
631 +
632 + var THEMES=[
633 + {
634 + name:"BLUE",
635 + accent:"#21b6d7",
636 + bg:"#eaf7fb",
637 + text:"#315d68",
638 + labels:[
639 + "HIER STARTEN",
640 + "ENTSCHEIDEN",
641 + "ÜBERPRÜFEN & ANPASSEN",
642 + "START HERE",
643 + "DECIDE",
644 + "REVIEW & ADAPT"
645 + ]
646 + },
647 + {
648 + name:"RED",
649 + accent:"#e94b13",
650 + bg:"#fff1ec",
651 + text:"#8a4d36",
652 + labels:[
653 + "PLANEN & ORGANISIEREN",
654 + "ORGANISIEREN & DOKUMENTIEREN",
655 + "PUBLIZIEREN & PRÄSENTIEREN",
656 + "PLAN & ORGANISE",
657 + "PLAN & ORGANIZE",
658 + "ORGANISE & DOCUMENT",
659 + "ORGANIZE & DOCUMENT",
660 + "PUBLISH & PRESENT"
661 + ]
662 + },
663 + {
664 + name:"YELLOW",
665 + accent:"#f0aa00",
666 + bg:"#fff8e7",
667 + text:"#785b17",
668 + labels:[
669 + "SCHÜTZEN & KLÄREN",
670 + "STANDARDISIEREN & IDENTIFIZIEREN",
671 + "ÖFFNEN, NACHNUTZEN & AUFFINDBAR MACHEN",
672 + "PROTECT & CLARIFY",
673 + "STANDARDISE & IDENTIFY",
674 + "STANDARDIZE & IDENTIFY",
675 + "OPEN, REUSE & MAKE FINDABLE"
676 + ]
677 + },
678 + {
679 + name:"GREEN",
680 + accent:"#38b76a",
681 + bg:"#edf9f1",
682 + text:"#3f7451",
683 + labels:[
684 + "INFRASTRUKTUR EINRICHTEN",
685 + "INFRASTRUKTUR & ZUSAMMENARBEIT EINRICHTEN",
686 + "SPEICHERN & ZUGRIFF STEUERN",
687 + "REPOSITORIUM, ERHALTEN & ÜBERGEBEN",
688 + "SET UP INFRASTRUCTURE",
689 + "SET UP INFRASTRUCTURE & COLLABORATION",
690 + "STORE & CONTROL ACCESS",
691 + "REPOSITORY, PRESERVE & HAND OVER"
692 + ]
693 + }
694 + ];
695 +
696 + function num(value){
697 + var n=parseFloat(value);
518 518   return Number.isFinite(n)?n:0;
519 519   }
520 520  
701 + function norm(value){
702 + return String(value||"")
703 + .replace(/\s+/g," ")
704 + .trim()
705 + .toUpperCase();
706 + }
707 +
521 521   function visible(el){
522 522   if(!el||el.nodeType!==1)return false;
523 - var s=getComputedStyle(el);
524 - if(s.display==="none"||s.visibility==="hidden"||Number(s.opacity)===0)return false;
525 - var r=el.getBoundingClientRect();
526 - return r.width>=MIN_W&&r.height>=MIN_H;
710 +
711 + var style=getComputedStyle(el);
712 + var rect=el.getBoundingClientRect();
713 +
714 + return (
715 + style.display!=="none"&&
716 + style.visibility!=="hidden"&&
717 + rect.width>20&&
718 + rect.height>4
719 + );
527 527   }
528 528  
529 - function excluded(el){
530 - return !el.matches||el.matches(
531 - "button,input,select,textarea,option,label,img,svg,canvas,table,thead,tbody,tfoot,tr,td,th,summary,script,style,noscript,template,.btn,.chip,[role=button]"
722 + function saveStyle(el,map,property){
723 + if(map.has(el))return;
724 +
725 + map.set(el,{
726 + value:el.style.getPropertyValue(property),
727 + priority:el.style.getPropertyPriority(property)
728 + });
729 + }
730 +
731 + function restoreStyle(el,map,property){
732 + var original=map.get(el);
733 +
734 + if(original&&original.value){
735 + el.style.setProperty(
736 + property,
737 + original.value,
738 + original.priority||""
739 + );
740 + }else{
741 + el.style.removeProperty(property);
742 + }
743 + }
744 +
745 + function resetRuntime(){
746 + managedHeight.forEach(function(el){
747 + restoreStyle(
748 + el,
749 + originalHeight,
750 + "min-height"
751 + );
752 + el.removeAttribute(
753 + "data-sn-master-equal-height"
754 + );
755 + });
756 +
757 + managedMargin.forEach(function(el){
758 + restoreStyle(
759 + el,
760 + originalMargin,
761 + "margin-top"
762 + );
763 + el.removeAttribute(
764 + "data-sn-master-first-row"
765 + );
766 + });
767 +
768 + managedHeight.clear();
769 + managedMargin.clear();
770 + }
771 +
772 + function themeFor(text){
773 + var value=norm(text);
774 +
775 + for(var i=0;i<THEMES.length;i++){
776 + for(var j=0;j<THEMES[i].labels.length;j++){
777 + var label=THEMES[i].labels[j];
778 +
779 + if(
780 + value===label||
781 + value.indexOf(label+" ")===0||
782 + value.indexOf(label+" -")===0||
783 + value.indexOf(label+" ·")===0
784 + ){
785 + return THEMES[i];
786 + }
787 + }
788 + }
789 +
790 + return null;
791 + }
792 +
793 + /* =======================================================
794 + BORDERLESS FILLED RED/ORANGE CTA BUTTONS
795 + ======================================================= */
796 +
797 + function colourDistance(a,b){
798 + return Math.sqrt(
799 + Math.pow(a[0]-b[0],2)+
800 + Math.pow(a[1]-b[1],2)+
801 + Math.pow(a[2]-b[2],2)
532 532   );
533 533   }
534 534  
535 - function namedLikeBox(el){
536 - var c=typeof el.className==="string"?el.className:"";
537 - return /(^|[\s_-])(box|card|tile|panel|role|check|service|source|call|area|detail|resource|topic|warn|info)([\s_-]|$)/i.test(c);
805 + function makeFilledRedOrangeCTAsBorderless(){
806 + var RED_ORANGE=[233,75,19];
807 +
808 + Array.from(
809 + root.querySelectorAll(
810 + 'a,button,[role="button"],input[type="submit"],input[type="button"]'
811 + )
812 + ).forEach(function(el){
813 + if(!visible(el))return;
814 +
815 + var style=getComputedStyle(el);
816 + var rgb=parseRGB(style.backgroundColor);
817 +
818 + if(!rgb)return;
819 +
820 + if(
821 + colourDistance(
822 + rgb,
823 + RED_ORANGE
824 + )>55
825 + ){
826 + return;
827 + }
828 +
829 + var rect=el.getBoundingClientRect();
830 +
831 + if(
832 + rect.width<80||
833 + rect.height<24
834 + ){
835 + return;
836 + }
837 +
838 + el.style.setProperty(
839 + "border",
840 + "none",
841 + "important"
842 + );
843 +
844 + el.style.setProperty(
845 + "border-left",
846 + "none",
847 + "important"
848 + );
849 +
850 + el.style.setProperty(
851 + "border-top",
852 + "none",
853 + "important"
854 + );
855 +
856 + el.style.setProperty(
857 + "border-right",
858 + "none",
859 + "important"
860 + );
861 +
862 + el.style.setProperty(
863 + "border-bottom",
864 + "none",
865 + "important"
866 + );
867 +
868 + el.style.setProperty(
869 + "box-shadow",
870 + "none",
871 + "important"
872 + );
873 + });
538 538   }
539 539  
540 - function boxLike(el){
541 - if(!visible(el)||excluded(el))return false;
542 - var s=getComputedStyle(el);
543 - var r=el.getBoundingClientRect();
544 - var border=
545 - num(s.borderTopWidth)+num(s.borderRightWidth)+
546 - num(s.borderBottomWidth)+num(s.borderLeftWidth);
547 - var radius=Math.max(
548 - num(s.borderTopLeftRadius),num(s.borderTopRightRadius),
549 - num(s.borderBottomLeftRadius),num(s.borderBottomRightRadius)
876 + /* =======================================================
877 + FULL-WIDTH THREE-LINE AREA LABELS
878 + ======================================================= */
879 +
880 + function compactText(value){
881 + return String(value||"")
882 + .replace(/\s+/g," ")
883 + .trim();
884 + }
885 +
886 + function makeThreeLineAreaLabels(){
887 + Array.from(
888 + root.querySelectorAll(
889 + ".arsn-area-label"
890 + )
891 + ).forEach(function(label){
892 + if(
893 + label.getAttribute(
894 + "data-sn-three-line"
895 + )==="1"
896 + ){
897 + return;
898 + }
899 +
900 + var number=
901 + label.querySelector(
902 + ":scope > .arsn-area-number"
903 + );
904 +
905 + var action=
906 + label.querySelector(
907 + ":scope > .arsn-area-action"
908 + );
909 +
910 + if(
911 + !number||
912 + !action
913 + ){
914 + return;
915 + }
916 +
917 + var clone=
918 + label.cloneNode(true);
919 +
920 + var cloneNumber=
921 + clone.querySelector(
922 + ":scope > .arsn-area-number"
923 + );
924 +
925 + var cloneAction=
926 + clone.querySelector(
927 + ":scope > .arsn-area-action"
928 + );
929 +
930 + if(cloneNumber){
931 + cloneNumber.remove();
932 + }
933 +
934 + if(cloneAction){
935 + cloneAction.remove();
936 + }
937 +
938 + var titleText=
939 + compactText(
940 + clone.textContent
941 + );
942 +
943 + if(!titleText){
944 + return;
945 + }
946 +
947 + var numberNode=
948 + number.cloneNode(true);
949 +
950 + var actionNode=
951 + action.cloneNode(true);
952 +
953 + var titleNode=
954 + document.createElement(
955 + "span"
956 + );
957 +
958 + titleNode.className=
959 + "sn-area-label-title";
960 +
961 + titleNode.textContent=
962 + titleText;
963 +
964 + while(label.firstChild){
965 + label.removeChild(
966 + label.firstChild
967 + );
968 + }
969 +
970 + label.appendChild(
971 + numberNode
972 + );
973 +
974 + label.appendChild(
975 + titleNode
976 + );
977 +
978 + label.appendChild(
979 + actionNode
980 + );
981 +
982 + label.setAttribute(
983 + "data-sn-three-line",
984 + "1"
985 + );
986 +
987 + var head=
988 + label.closest(
989 + ".arsn-area-head"
990 + );
991 +
992 + if(head){
993 + head.style.setProperty(
994 + "width",
995 + "100%",
996 + "important"
997 + );
998 +
999 + head.style.setProperty(
1000 + "max-width",
1001 + "100%",
1002 + "important"
1003 + );
1004 +
1005 + head.style.setProperty(
1006 + "box-sizing",
1007 + "border-box",
1008 + "important"
1009 + );
1010 + }
1011 + });
1012 + }
1013 +
1014 + /* =======================================================
1015 + PLACEHOLDER BADGE
1016 + ======================================================= */
1017 +
1018 + function applyPlaceholderBadge(){
1019 + if(!PLACEHOLDER)return;
1020 +
1021 + if(
1022 + document.querySelector(
1023 + ".sn-coming-soon-badge"
1024 + )
1025 + ){
1026 + return;
1027 + }
1028 +
1029 + var title=
1030 + document.querySelector(
1031 + "#document-title"
1032 + )||
1033 + document.querySelector(
1034 + "h1"
1035 + );
1036 +
1037 + if(!title)return;
1038 +
1039 + var badge=
1040 + document.createElement(
1041 + "span"
1042 + );
1043 +
1044 + badge.className=
1045 + "sn-coming-soon-badge";
1046 +
1047 + badge.textContent=
1048 + PLACEHOLDER_LABEL;
1049 +
1050 + badge.setAttribute(
1051 + "aria-label",
1052 + PLACEHOLDER_LABEL
550 550   );
551 - var bg=s.backgroundColor&&s.backgroundColor!=="rgba(0, 0, 0, 0)"&&s.backgroundColor!=="transparent";
552 - var shadow=s.boxShadow&&s.boxShadow!=="none";
553 - return namedLikeBox(el)||border>=1||(bg&&radius>=3)||(shadow&&r.width>=180);
1054 +
1055 + title.appendChild(
1056 + badge
1057 + );
554 554   }
555 555  
556 - function pickTarget(child){
557 - if(!visible(child))return null;
558 - if(boxLike(child))return child;
1060 + /* =======================================================
1061 + DETAIL PAGE OWN-ACCENT PROPAGATION
1062 + ======================================================= */
559 559  
560 - var cr=child.getBoundingClientRect();
561 - var q=[];
562 - Array.from(child.children||[]).forEach(function(el){
563 - q.push({el:el,depth:1});
1064 + function parseRGB(value){
1065 + var match=String(value||"").match(
1066 + /rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i
1067 + );
1068 +
1069 + if(!match)return null;
1070 +
1071 + return [
1072 + Number(match[1]),
1073 + Number(match[2]),
1074 + Number(match[3])
1075 + ];
1076 + }
1077 +
1078 + function distance(a,b){
1079 + return Math.sqrt(
1080 + Math.pow(a[0]-b[0],2)+
1081 + Math.pow(a[1]-b[1],2)+
1082 + Math.pow(a[2]-b[2],2)
1083 + );
1084 + }
1085 +
1086 + function paletteMatch(cssColor){
1087 + var rgb=parseRGB(cssColor);
1088 +
1089 + if(!rgb)return null;
1090 +
1091 + var palette=[
1092 + {hex:"#21b6d7",rgb:[33,182,215]},
1093 + {hex:"#e94b13",rgb:[233,75,19]},
1094 + {hex:"#f0aa00",rgb:[240,170,0]},
1095 + {hex:"#38b76a",rgb:[56,183,106]}
1096 + ];
1097 +
1098 + var best=null;
1099 + var bestDistance=Infinity;
1100 +
1101 + palette.forEach(function(item){
1102 + var d=distance(rgb,item.rgb);
1103 +
1104 + if(d<bestDistance){
1105 + best=item;
1106 + bestDistance=d;
1107 + }
564 564   });
565 565  
566 - var best=null,bestScore=-1;
1110 + return bestDistance<=30
1111 + ?best
1112 + :null;
1113 + }
567 567  
568 - while(q.length){
569 - var item=q.shift();
570 - var el=item.el;
571 - if(!visible(el))continue;
1115 + function propagateDetailAccents(){
1116 + if(PAGE_KIND!=="detail")return;
572 572  
573 - var r=el.getBoundingClientRect();
1118 + Array.from(
1119 + root.querySelectorAll(
1120 + ".arsn-call,.dmp-call,.ido-call,.pp-call,"+
1121 + ".arsn-source,.dmp-source,.ido-source,.pp-source"
1122 + )
1123 + ).forEach(function(el){
1124 + if(!visible(el))return;
574 574  
575 - if(r.width>=cr.width*.72&&boxLike(el)){
576 - var widthFit=1-Math.min(1,Math.abs(cr.width-r.width)/Math.max(1,cr.width));
577 - var topFit=1-Math.min(1,Math.abs(cr.top-r.top)/80);
578 - var score=widthFit*5+topFit*2+Math.min(r.height,600)/600;
579 - if(score>bestScore){
580 - best=el;
581 - bestScore=score;
1126 + var style=getComputedStyle(el);
1127 +
1128 + if(
1129 + num(style.borderTopWidth)>=2
1130 + ){
1131 + var match=
1132 + paletteMatch(
1133 + style.borderTopColor
1134 + );
1135 +
1136 + if(match){
1137 + el.style.setProperty(
1138 + "border-left",
1139 + "4px solid "+match.hex,
1140 + "important"
1141 + );
582 582   }
583 583   }
1144 + });
584 584  
585 - if(item.depth<3){
586 - Array.from(el.children||[]).forEach(function(next){
587 - q.push({el:next,depth:item.depth+1});
588 - });
1146 + // Warning families: explicit safety override.
1147 + Array.from(
1148 + root.querySelectorAll(
1149 + ".arsn-warn,.dmp-warn,.ido-warn,.pp-warn,"+
1150 + ".warn,.warning,.warningmessage,.errormessage"
1151 + )
1152 + ).forEach(function(el){
1153 + if(!visible(el))return;
1154 +
1155 + el.style.setProperty(
1156 + "border-left",
1157 + "4px solid #e94b13",
1158 + "important"
1159 + );
1160 + });
1161 +
1162 + // Info families: explicit orientation override.
1163 + Array.from(
1164 + root.querySelectorAll(
1165 + ".arsn-info,.dmp-info,.ido-info,.pp-info,.infomessage"
1166 + )
1167 + ).forEach(function(el){
1168 + if(!visible(el))return;
1169 +
1170 + el.style.setProperty(
1171 + "border-left",
1172 + "4px solid #21b6d7",
1173 + "important"
1174 + );
1175 + });
1176 + }
1177 +
1178 + /* =======================================================
1179 + OVERVIEW SEMANTIC THEME PALETTE
1180 + ======================================================= */
1181 +
1182 + function smallestThemeHeaders(){
1183 + return Array.from(
1184 + root.querySelectorAll(
1185 + "div,span,p,strong,h3,h4,h5,h6"
1186 + )
1187 + ).filter(function(el){
1188 + if(!visible(el))return false;
1189 + if(!themeFor(el.textContent))return false;
1190 +
1191 + return !Array.from(
1192 + el.children||[]
1193 + ).some(function(child){
1194 + return !!themeFor(
1195 + child.textContent
1196 + );
1197 + });
1198 + });
1199 + }
1200 +
1201 + function findOverviewCard(header){
1202 + var node=header.parentElement;
1203 + var candidates=[];
1204 +
1205 + while(node&&node!==root){
1206 + var rect=node.getBoundingClientRect();
1207 + var style=getComputedStyle(node);
1208 +
1209 + var border=
1210 + num(style.borderTopWidth)+
1211 + num(style.borderRightWidth)+
1212 + num(style.borderBottomWidth)+
1213 + num(style.borderLeftWidth);
1214 +
1215 + if(
1216 + rect.width>=220&&
1217 + rect.width<=800&&
1218 + rect.height>=120&&
1219 + border>=1
1220 + ){
1221 + candidates.push(node);
589 589   }
1223 +
1224 + node=node.parentElement;
590 590   }
591 591  
592 - return best;
1227 + if(!candidates.length)return null;
1228 +
1229 + candidates.sort(function(a,b){
1230 + return (
1231 + b.getBoundingClientRect().height-
1232 + a.getBoundingClientRect().height
1233 + );
1234 + });
1235 +
1236 + return candidates[0];
593 593   }
594 594  
595 - function reset(){
596 - managed.forEach(function(el){
597 - el.style.removeProperty("min-height");
598 - el.removeAttribute("data-sn-equal-height-managed");
1239 + function rowCandidates(link,card){
1240 + var result=[];
1241 + var cardRect=
1242 + card.getBoundingClientRect();
1243 +
1244 + var node=link;
1245 +
1246 + while(node&&node!==card){
1247 + if(visible(node)){
1248 + var rect=
1249 + node.getBoundingClientRect();
1250 +
1251 + if(
1252 + rect.height<=105&&
1253 + rect.width>=
1254 + cardRect.width*.50&&
1255 + rect.width<=
1256 + cardRect.width*1.03
1257 + ){
1258 + result.push(node);
1259 + }
1260 + }
1261 +
1262 + node=node.parentElement;
1263 + }
1264 +
1265 + return result;
1266 + }
1267 +
1268 + function chooseOuterRow(
1269 + candidates,
1270 + link
1271 + ){
1272 + if(!candidates.length){
1273 + return link;
1274 + }
1275 +
1276 + var bordered=
1277 + candidates.filter(function(el){
1278 + return (
1279 + num(
1280 + getComputedStyle(el)
1281 + .borderLeftWidth
1282 + )>=1
1283 + );
1284 + });
1285 +
1286 + var pool=
1287 + bordered.length
1288 + ?bordered
1289 + :candidates;
1290 +
1291 + pool.sort(function(a,b){
1292 + var ar=
1293 + a.getBoundingClientRect();
1294 +
1295 + var br=
1296 + b.getBoundingClientRect();
1297 +
1298 + return (
1299 + ar.left-br.left||
1300 + br.width-ar.width
1301 + );
599 599   });
600 - managed.clear();
1303 +
1304 + return pool[0]||link;
601 601   }
602 602  
603 - function horizontalLayout(parent){
604 - if(!visible(parent))return false;
605 - var s=getComputedStyle(parent);
606 - if(s.display==="grid"||s.display==="inline-grid")return true;
607 - if(s.display==="flex"||s.display==="inline-flex"){
608 - return s.flexDirection==="row"||s.flexDirection==="row-reverse";
1307 + function applyOverviewPalette(){
1308 + if(PAGE_KIND!=="overview"){
1309 + return [];
609 609   }
610 - return false;
1311 +
1312 + var headers=
1313 + smallestThemeHeaders()
1314 + .map(function(el){
1315 + return {
1316 + el:el,
1317 + theme:
1318 + themeFor(
1319 + el.textContent
1320 + ),
1321 + card:
1322 + findOverviewCard(
1323 + el
1324 + )
1325 + };
1326 + })
1327 + .filter(function(row){
1328 + return !!row.card;
1329 + });
1330 +
1331 + var unique=[];
1332 + var seenHeaders=new Set();
1333 +
1334 + headers.forEach(function(row){
1335 + var key=
1336 + row.theme.name+
1337 + "|"+
1338 + Math.round(
1339 + row.card
1340 + .getBoundingClientRect()
1341 + .left
1342 + )+
1343 + "|"+
1344 + Math.round(
1345 + row.el
1346 + .getBoundingClientRect()
1347 + .top
1348 + );
1349 +
1350 + if(!seenHeaders.has(key)){
1351 + seenHeaders.add(key);
1352 + unique.push(row);
1353 + }
1354 + });
1355 +
1356 + unique.forEach(function(row){
1357 + var headerRect=
1358 + row.el
1359 + .getBoundingClientRect();
1360 +
1361 + row.el.style.setProperty(
1362 + "background",
1363 + row.theme.bg,
1364 + "important"
1365 + );
1366 +
1367 + row.el.style.setProperty(
1368 + "color",
1369 + row.theme.text,
1370 + "important"
1371 + );
1372 +
1373 + row.el.style.setProperty(
1374 + "text-align",
1375 + "left",
1376 + "important"
1377 + );
1378 +
1379 + row.el.style.setProperty(
1380 + "word-spacing",
1381 + "normal",
1382 + "important"
1383 + );
1384 +
1385 + var later=
1386 + unique
1387 + .filter(function(other){
1388 + return (
1389 + other.card===row.card&&
1390 + other.el
1391 + .getBoundingClientRect()
1392 + .top>
1393 + headerRect.top+2
1394 + );
1395 + })
1396 + .sort(function(a,b){
1397 + return (
1398 + a.el
1399 + .getBoundingClientRect()
1400 + .top-
1401 + b.el
1402 + .getBoundingClientRect()
1403 + .top
1404 + );
1405 + });
1406 +
1407 + var stopTop=
1408 + later.length
1409 + ?later[0].el
1410 + .getBoundingClientRect()
1411 + .top
1412 + :Infinity;
1413 +
1414 + Array.from(
1415 + row.card.querySelectorAll("a")
1416 + ).forEach(function(link){
1417 + if(!visible(link))return;
1418 +
1419 + var rect=
1420 + link.getBoundingClientRect();
1421 +
1422 + if(
1423 + rect.top<=
1424 + headerRect.bottom-2||
1425 + rect.top>=
1426 + stopTop-2
1427 + ){
1428 + return;
1429 + }
1430 +
1431 + var candidates=
1432 + rowCandidates(
1433 + link,
1434 + row.card
1435 + );
1436 +
1437 + var target=
1438 + chooseOuterRow(
1439 + candidates,
1440 + link
1441 + );
1442 +
1443 + candidates.forEach(function(el){
1444 + el.style.setProperty(
1445 + "border-left",
1446 + "0 solid transparent",
1447 + "important"
1448 + );
1449 + });
1450 +
1451 + target.style.setProperty(
1452 + "border-left",
1453 + "3px solid "+
1454 + row.theme.accent,
1455 + "important"
1456 + );
1457 +
1458 + target.style.setProperty(
1459 + "box-sizing",
1460 + "border-box",
1461 + "important"
1462 + );
1463 + });
1464 + });
1465 +
1466 + return unique;
611 611   }
612 612  
613 - function rowGroups(entries){
1469 + /* =======================================================
1470 + OVERVIEW CARD HEIGHT + FIRST THEMATIC ROW
1471 + ======================================================= */
1472 +
1473 + function alignOverviewCards(headers){
1474 + if(
1475 + PAGE_KIND!=="overview"||
1476 + window.innerWidth<=MOBILE_MAX
1477 + ){
1478 + return;
1479 + }
1480 +
1481 + var cards=[];
1482 + var seen=new Set();
1483 +
1484 + headers.forEach(function(row){
1485 + if(!seen.has(row.card)){
1486 + seen.add(row.card);
1487 + cards.push(row.card);
1488 + }
1489 + });
1490 +
1491 + if(cards.length<2){
1492 + return;
1493 + }
1494 +
1495 + // Group cards by actual top position.
614 614   var groups=[];
615 - entries.slice().sort(function(a,b){
616 - return a.rect.top-b.rect.top||a.rect.left-b.rect.left;
617 - }).forEach(function(entry){
1497 +
1498 + cards.forEach(function(card){
1499 + var top=
1500 + card.getBoundingClientRect().top;
1501 +
618 618   var group=null;
1503 +
619 619   for(var i=0;i<groups.length;i++){
620 - if(Math.abs(groups[i].top-entry.rect.top)<=ROW_TOLERANCE){
1505 + if(
1506 + Math.abs(
1507 + groups[i].top-top
1508 + )<=ROW_TOLERANCE
1509 + ){
621 621   group=groups[i];
622 622   break;
623 623   }
624 624   }
1514 +
625 625   if(!group){
626 - group={top:entry.rect.top,entries:[]};
1516 + group={
1517 + top:top,
1518 + cards:[]
1519 + };
627 627   groups.push(group);
628 628   }
629 - group.entries.push(entry);
1522 +
1523 + group.cards.push(card);
630 630   });
631 - return groups;
632 - }
633 633  
634 - function run(){
635 - reset();
1526 + groups.forEach(function(group){
1527 + if(group.cards.length<2){
1528 + return;
1529 + }
636 636  
637 - if(window.innerWidth<=MOBILE_MAX)return;
1531 + var firstHeaders=
1532 + group.cards.map(function(card){
1533 + var candidates=
1534 + headers
1535 + .filter(function(row){
1536 + return row.card===card;
1537 + })
1538 + .sort(function(a,b){
1539 + return (
1540 + a.el
1541 + .getBoundingClientRect()
1542 + .top-
1543 + b.el
1544 + .getBoundingClientRect()
1545 + .top
1546 + );
1547 + });
638 638  
639 - var parents=Array.from(root.querySelectorAll("*")).filter(function(el){
640 - return el.children&&el.children.length>=2&&horizontalLayout(el);
641 - });
1549 + return candidates.length
1550 + ?candidates[0]
1551 + :null;
1552 + });
642 642  
643 - parents.forEach(function(parent){
644 - var entries=[];
1554 + if(
1555 + !firstHeaders.some(function(row){
1556 + return !row;
1557 + })
1558 + ){
1559 + var targetTop=
1560 + Math.max.apply(
1561 + Math,
1562 + firstHeaders.map(function(row){
1563 + return (
1564 + row.el
1565 + .getBoundingClientRect()
1566 + .top-
1567 + row.card
1568 + .getBoundingClientRect()
1569 + .top
1570 + );
1571 + })
1572 + );
645 645  
646 - Array.from(parent.children).forEach(function(child){
647 - if(!visible(child))return;
648 - var target=pickTarget(child);
649 - if(!target)return;
650 - entries.push({
651 - target:target,
652 - rect:target.getBoundingClientRect()
1574 + firstHeaders.forEach(function(row){
1575 + var relativeTop=
1576 + row.el
1577 + .getBoundingClientRect()
1578 + .top-
1579 + row.card
1580 + .getBoundingClientRect()
1581 + .top;
1582 +
1583 + var delta=
1584 + targetTop-relativeTop;
1585 +
1586 + if(delta>1){
1587 + saveStyle(
1588 + row.el,
1589 + originalMargin,
1590 + "margin-top"
1591 + );
1592 +
1593 + var current=
1594 + num(
1595 + getComputedStyle(
1596 + row.el
1597 + ).marginTop
1598 + );
1599 +
1600 + row.el.style.setProperty(
1601 + "margin-top",
1602 + (
1603 + current+delta
1604 + )+"px"
1605 + );
1606 +
1607 + row.el.setAttribute(
1608 + "data-sn-master-first-row",
1609 + "1"
1610 + );
1611 +
1612 + managedMargin.add(
1613 + row.el
1614 + );
1615 + }
653 653   });
1617 + }
1618 +
1619 + var maxHeight=0;
1620 +
1621 + group.cards.forEach(function(card){
1622 + maxHeight=
1623 + Math.max(
1624 + maxHeight,
1625 + card
1626 + .getBoundingClientRect()
1627 + .height
1628 + );
654 654   });
655 655  
656 - if(entries.length<2)return;
1631 + maxHeight=
1632 + Math.ceil(maxHeight);
657 657  
658 - rowGroups(entries).forEach(function(group){
659 - if(group.entries.length<2)return;
1634 + group.cards.forEach(function(card){
1635 + saveStyle(
1636 + card,
1637 + originalHeight,
1638 + "min-height"
1639 + );
660 660  
661 - var lefts=group.entries.map(function(e){return e.rect.left;}).sort(function(a,b){return a-b;});
662 - if(lefts[lefts.length-1]-lefts[0]<80)return;
1641 + card.style.setProperty(
1642 + "min-height",
1643 + maxHeight+"px"
1644 + );
663 663  
664 - var targets=[];
665 - var seen=new Set();
1646 + card.setAttribute(
1647 + "data-sn-master-equal-height",
1648 + "1"
1649 + );
666 666  
667 - group.entries.forEach(function(e){
668 - if(!seen.has(e.target)){
669 - seen.add(e.target);
670 - targets.push(e.target);
1651 + managedHeight.add(
1652 + card
1653 + );
1654 + });
1655 + });
1656 + }
1657 +
1658 + /* =======================================================
1659 + DETAIL GRID EQUAL HEIGHT, DESKTOP ONLY
1660 + ======================================================= */
1661 +
1662 + function equaliseDetailGrids(){
1663 + if(
1664 + PAGE_KIND!=="detail"||
1665 + window.innerWidth<=MOBILE_MAX
1666 + ){
1667 + return;
1668 + }
1669 +
1670 + var selectors=[
1671 + ".arsn-grid",
1672 + ".arsn-grid-2",
1673 + ".arsn-grid-3",
1674 + ".dmp-grid",
1675 + ".ido-grid",
1676 + ".pp-grid"
1677 + ];
1678 +
1679 + selectors.forEach(function(selector){
1680 + Array.from(
1681 + root.querySelectorAll(selector)
1682 + ).forEach(function(grid){
1683 + var children=
1684 + Array.from(
1685 + grid.children||[]
1686 + ).filter(visible);
1687 +
1688 + if(children.length<2){
1689 + return;
1690 + }
1691 +
1692 + var groups=[];
1693 +
1694 + children.forEach(function(child){
1695 + var top=
1696 + child
1697 + .getBoundingClientRect()
1698 + .top;
1699 +
1700 + var group=null;
1701 +
1702 + for(var i=0;i<groups.length;i++){
1703 + if(
1704 + Math.abs(
1705 + groups[i].top-top
1706 + )<=ROW_TOLERANCE
1707 + ){
1708 + group=groups[i];
1709 + break;
1710 + }
671 671   }
672 - });
673 673  
674 - if(targets.length<2)return;
1713 + if(!group){
1714 + group={
1715 + top:top,
1716 + items:[]
1717 + };
1718 + groups.push(group);
1719 + }
675 675  
676 - var max=0;
677 - targets.forEach(function(el){
678 - max=Math.max(max,el.getBoundingClientRect().height);
1721 + group.items.push(child);
679 679   });
680 680  
681 - max=Math.ceil(max);
682 - if(max<MIN_H)return;
1724 + groups.forEach(function(group){
1725 + if(group.items.length<2){
1726 + return;
1727 + }
683 683  
684 - targets.forEach(function(el){
685 - el.style.setProperty("min-height",max+"px");
686 - el.setAttribute("data-sn-equal-height-managed","1");
687 - managed.add(el);
1729 + var maxHeight=0;
1730 +
1731 + group.items.forEach(function(item){
1732 + maxHeight=
1733 + Math.max(
1734 + maxHeight,
1735 + item
1736 + .getBoundingClientRect()
1737 + .height
1738 + );
1739 + });
1740 +
1741 + maxHeight=
1742 + Math.ceil(maxHeight);
1743 +
1744 + group.items.forEach(function(item){
1745 + saveStyle(
1746 + item,
1747 + originalHeight,
1748 + "min-height"
1749 + );
1750 +
1751 + item.style.setProperty(
1752 + "min-height",
1753 + maxHeight+"px"
1754 + );
1755 +
1756 + item.setAttribute(
1757 + "data-sn-master-equal-height",
1758 + "1"
1759 + );
1760 +
1761 + managedHeight.add(item);
1762 + });
688 688   });
689 689   });
690 690   });
691 691   }
692 692  
693 - function schedule(){
694 - if(raf)cancelAnimationFrame(raf);
695 - raf=requestAnimationFrame(function(){
696 - raf=requestAnimationFrame(function(){
697 - raf=0;
698 - run();
699 - });
700 - });
1768 + /* =======================================================
1769 + RUN / RESPONSIVE SCHEDULING
1770 + ======================================================= */
1771 +
1772 + function run(){
1773 + if(running)return;
1774 +
1775 + running=true;
1776 +
1777 + try{
1778 + resetRuntime();
1779 + applyPlaceholderBadge();
1780 + propagateDetailAccents();
1781 +
1782 + var headers=
1783 + applyOverviewPalette();
1784 +
1785 + makeThreeLineAreaLabels();
1786 + makeFilledRedOrangeCTAsBorderless();
1787 +
1788 + if(
1789 + window.innerWidth>
1790 + MOBILE_MAX
1791 + ){
1792 + alignOverviewCards(
1793 + headers
1794 + );
1795 +
1796 + equaliseDetailGrids();
1797 + }
1798 + }finally{
1799 + running=false;
1800 + }
701 701   }
702 702  
703 - addEventListener("resize",schedule,{passive:true});
704 - addEventListener("load",schedule,{once:true});
1803 + function onResize(){
1804 + if(resizeTimer){
1805 + clearTimeout(
1806 + resizeTimer
1807 + );
1808 + }
705 705  
706 - root.addEventListener("click",function(){
707 - setTimeout(schedule,0);
708 - },true);
1810 + resizeTimer=
1811 + setTimeout(
1812 + function(){
1813 + resizeTimer=0;
1814 + run();
1815 + },
1816 + RESIZE_DEBOUNCE
1817 + );
1818 + }
709 709  
710 - if(document.fonts&&document.fonts.ready){
711 - document.fonts.ready.then(schedule);
1820 + async function waitForReady(){
1821 + if(
1822 + document.readyState!=="complete"
1823 + ){
1824 + await new Promise(function(resolve){
1825 + window.addEventListener(
1826 + "load",
1827 + resolve,
1828 + {once:true}
1829 + );
1830 + });
1831 + }
1832 +
1833 + if(
1834 + document.fonts&&
1835 + document.fonts.ready
1836 + ){
1837 + try{
1838 + await document.fonts.ready;
1839 + }catch(error){}
1840 + }
1841 +
1842 + var images=
1843 + Array.from(
1844 + root.querySelectorAll("img")
1845 + );
1846 +
1847 + await Promise.all(
1848 + images.map(function(img){
1849 + if(img.complete){
1850 + return Promise.resolve();
1851 + }
1852 +
1853 + return new Promise(function(resolve){
1854 + var done=function(){
1855 + resolve();
1856 + };
1857 +
1858 + img.addEventListener(
1859 + "load",
1860 + done,
1861 + {once:true}
1862 + );
1863 +
1864 + img.addEventListener(
1865 + "error",
1866 + done,
1867 + {once:true}
1868 + );
1869 + });
1870 + })
1871 + );
1872 +
1873 + run();
712 712   }
713 713  
714 - schedule();
715 - setTimeout(schedule,250);
716 - setTimeout(schedule,900);
1876 + window.addEventListener(
1877 + "resize",
1878 + onResize,
1879 + {passive:true}
1880 + );
1881 +
1882 + waitForReady();
717 717  })();
718 718  </script>
719 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_END -->
1885 +
1886 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_END -->
720 720  {{/html}}
721 721