Änderungen von Dokument Prepare

Zuletzt geändert von Veronika Kocher am Freitag, 18 Sep. 2026 16:47

Von Version 1.12
bearbeitet von Veronika Kocher
am Freitag, 04 Sep. 2026 14:45
Änderungskommentar: Es gibt keinen Kommentar für diese Version
Auf Version 1.7
bearbeitet von Veronika Kocher
am Donnerstag, 03 Sep. 2026 9:34
Änderungskommentar: Es gibt keinen Kommentar für diese Version

Zusammenfassung

Details

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