/*! QF Circle Sidebar 1.1.0 — stacked-circle drop-in for the red ROI bar. * Adapted for Takeoff from the client-supplied circle-sidebar.js. * Put data-circle-sidebar on the bar's (or on a plain bar element). * On an , a drawn bar is laid over the image, so the static image stays * as the no-JS fallback and nothing flashes. Tall bars stack bottom-up * (desktop); wide bars stack left-to-right (mobile strip). * Options (attributes on the same element): data-columns (circles across, 2), * data-fill (0.65), data-axis ("auto" | "x" | "y"), data-replay ("true"). */ !function(){"use strict";if(!window.QFCircleSidebar){var t=window.matchMedia&&matchMedia("(prefers-reduced-motion: reduce)").matches,e=[];i.prototype.roll=function(){this.mirror=Math.random()<.5},i.prototype.layout=function(){var t,e,s=this.src;if(this.isImg){t=s.offsetWidth,e=s.offsetHeight;var i=this.el.style;i.display=t&&e?"":"none",i.left=s.offsetLeft+"px",i.top=s.offsetTop+"px",i.width=t+"px",i.height=e+"px"}else t=s.clientWidth,e=s.clientHeight;var a="x"===this.axis||"auto"===this.axis&&t>e,o=a?e:t,n=a?t:e,r=this.cols,l=o/r,c=[];if(l>0&&n>0)for(var h=Math.min(Math.floor(n/l+.001),Math.max(1,Math.round(n*this.fill/l))),d=h-1,m=r>1?Math.min(1,Math.max(0,h-2)):0,f=0;f1&&f===d)||u)&&!(r>1&&f=d-m&&u)){var v=this.mirror?r-1-p:p;c.push(a?{left:f*l,top:v*l}:{left:v*l,bottom:f*l})}}for(;this.dots.lengthc.length;)this.el.removeChild(this.dots.pop());var b=Math.min(c.length,Math.max(3,Math.min(6,Math.round(.5*c.length)))),g=c.length-b,x=(1.5*l).toFixed(1)+"px";this.el.style.setProperty("--cs-from",a?"translate3d("+x+",0,0)":"translate3d(0,-"+x+",0)");for(var M=0;M=g;this.dots[M].classList.toggle("cs-anim",I),w.setProperty("--cs-delay",I?380*(M-g)+"ms":"0ms")}},i.prototype.watch=function(){var e=this;if(!t&&"IntersectionObserver"in window){var s=new IntersectionObserver((function(t){t.forEach((function(t){t.isIntersecting&&t.intersectionRatio>=.35?(e.play(),e.replay||s.disconnect()):e.replay&&!t.isIntersecting&&e.reset()}))}),{threshold:[0,.35]});s.observe(this.src)}else this.play()},i.prototype.play=function(){if(!this.played){this.played=!0;var t=this.el;requestAnimationFrame((function(){requestAnimationFrame((function(){t.classList.add("cs-in")}))}))}},i.prototype.reset=function(){this.played=!1,this.el.classList.remove("cs-in"),this.roll(),this.layout()},window.QFCircleSidebar={init:a,bars:e},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",a):a()}function s(t,e){return t=parseFloat(t),isFinite(t)?t:e}function i(t){var e=t.dataset;this.src=t,this.cols=Math.max(1,Math.round(s(e.columns,2))),this.fill=Math.min(1,Math.max(0,s(e.fill,.65))),this.axis=e.axis||"auto",this.replay="true"===e.replay,this.dots=[],this.played=!1,this.isImg="IMG"===t.tagName,this.isImg?(this.el=document.createElement("div"),this.el.className="cs-bar",t.insertAdjacentElement("afterend",this.el)):(this.el=t,t.classList.add("cs-bar","cs-solo")),this.el.setAttribute("aria-hidden","true"),this.roll();var i=this,a=0,o=function(){cancelAnimationFrame(a),a=requestAnimationFrame((function(){i.layout()}))};"ResizeObserver"in window?new ResizeObserver(o).observe(t):addEventListener("resize",o),this.layout(),this.watch()}function a(){var t=document.querySelectorAll("[data-circle-sidebar]");if(t.length){if(!document.getElementById("qf-cs-css")){var s=document.createElement("style");s.id="qf-cs-css",s.textContent=".cs-bar{position:absolute;overflow:hidden;pointer-events:none;z-index:4;background:var(--red-bright,#b00a12)}.cs-bar.cs-solo{position:relative}.cs-dot{position:absolute;display:block;border-radius:50%;background:var(--red-deep,#98040b)}.cs-dot.cs-anim{opacity:0;transform:var(--cs-from);transition:transform 1200ms cubic-bezier(.25,.8,.3,1) var(--cs-delay,0ms),opacity 660ms ease-out var(--cs-delay,0ms)}.cs-in .cs-dot.cs-anim{opacity:1;transform:none}@media (prefers-reduced-motion:reduce){.cs-dot.cs-anim{opacity:1;transform:none;transition:none}}",document.head.appendChild(s)}for(var a=0;a