PageSourceSearch

https://clickdoc.fr/default-node_modules_ngx-bootstrap_positioning…otstrap-positioning_mjs.cb1f6e0671387539.js

js clickdoc.fr collected 2026-10-07 17:03:03 UTC 14,989 bytes, 1 lines download raw bytes

1(self.webpackChunkclickdoc_host=self.webpackChunkclickdoc_host||[]).push([["default-node_modules_ngx-bootstrap_positioning_fesm2022_ngx-bootstrap-positioning_mjs"],{71946:(wt,L,O)=>{O.r(L),O.d(L,{PlacementForBs5:()=>M,Positioning:()=>q,PositioningService:()=>bt,checkMargins:()=>Q,positionElements:()=>I});var S=O(69571),d=O(75281),ot=O(87199),v=O(24200),B=function(t){return t.top="top",t.bottom="bottom",t.left="left",t.right="right",t.auto="auto",t.end="right",t.start="left",t["top left"]="top left",t["top right"]="top right",t["right top"]="right top",t["right bottom"]="right bottom",t["bottom right"]="bottom right",t["bottom left"]="bottom left",t["left bottom"]="left bottom",t["left top"]="left top",t["top start"]="top left",t["top end"]="top right",t["end top"]="right top",t["end bottom"]="right bottom",t["bottom end"]="bottom right",t["bottom start"]="bottom left",t["start bottom"]="start bottom",t["start top"]="left top",t}(B||{}),M=function(t){return t.top="top",t.bottom="bottom",t.left="start",t.right="end",t.auto="auto",t.end="end",t.start="start",t["top left"]="top start",t["top right"]="top end",t["right top"]="end top",t["right bottom"]="end bottom",t["bottom right"]="bottom end",t["bottom left"]="bottom start",t["left bottom"]="start bottom",t["left top"]="start top",t["top start"]="top start",t["top end"]="top end",t["end top"]="end top",t["end bottom"]="end bottom",t["bottom end"]="bottom end",t["bottom start"]="bottom start",t["start bottom"]="start bottom",t["start top"]="start top",t}(M||{});function b(t,o){if(1!==t.nodeType)return[];const r=t.ownerDocument.defaultView?.getComputedStyle(t,null);return o?r&&r[o]:r}function C(t){if(!t)return document.documentElement;let r,e=t?.offsetParent;for(;null===e&&t.nextElementSibling&&r!==t.nextElementSibling;)r=t.nextElementSibling,e=r.offsetParent;const n=e&&e.nodeName;return n&&"BODY"!==n&&"HTML"!==n?e&&-1!==["TH","TD","TABLE"].indexOf(e.nodeName)&&"static"===b(e,"position")?C(e):e:r?r.ownerDocument.documentElement:document.documentElement}function H(t){return null!==t.parentNode?H(t.parentNode):t}function y(t,o){if(!(t&&t.nodeType&&o&&o.nodeType))return document.documentElement;const e=t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING,r=e?t:o,n=e?o:t,s=document.createRange();s.setStart(r,0),s.setEnd(n,0);const i=s.commonAncestorContainer;if(t!==i&&o!==i||r.contains(n))return function et(t){const{nodeName:o}=t;return"BODY"!==o&&("HTML"===o||C(t.firstElementChild)===t)}(i)?i:C(i);const f=H(t);return f.host?y(f.host,o):y(t,H(o).host)}function j(t){if(!t||!t.parentElement)return document.documentElement;let o=t.parentElement;for(;o?.parentElement&&"none"===b(o,"transform");)o=o.parentElement;return o||document.documentElement}function z(t,o){const e="x"===o?"Left":"Top",r="Left"===e?"Right":"Bottom";return parseFloat(t[`border${e}Width`])+parseFloat(t[`border${r}Width`])}function k(t,o,e){return Math.max(o[`offset${t}`],o[`scroll${t}`],e[`client${t}`],e[`offset${t}`],e[`scroll${t}`],0)}function Y(t){const o=t.body,e=t.documentElement;return{height:k("Height",o,e),width:k("Width",o,e)}}function E(t){return{...t,right:(t.left||0)+t.width,bottom:(t.top||0)+t.height}}function l(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function U(t){const o=t.getBoundingClientRect();if(!(o&&l(o.top)&&l(o.left)&&l(o.bottom)&&l(o.right)))return o;const e={left:o.left,top:o.top,width:o.right-o.left,height:o.bottom-o.top},r="HTML"===t.nodeName?Y(t.ownerDocument):void 0,n=r?.width||t.clientWidth||l(o.right)&&l(e.left)&&o.right-e.left||0,s=r?.height||t.clientHeight||l(o.bottom)&&l(e.top)&&o.bottom-e.top||0;let i=t.offsetWidth-n,f=t.offsetHeight-s;if(i||f){const c=b(t);i-=z(c,"x"),f-=z(c,"y"),e.width-=i,e.height-=f}return E(e)}function T(t,o,e=!1){const r="HTML"===o.nodeName,n=U(t),s=U(o),i=b(o),f=parseFloat(i.borderTopWidth),c=parseFloat(i.borderLeftWidth);e&&r&&(s.top=Math.max(s.top??0,0),s.left=Math.max(s.left??0,0));const u=E({top:(n.top??0)-(s.top??0)-f,left:(n.left??0)-(s.left??0)-c,width:n.width,height:n.height});if(u.marginTop=0,u.marginLeft=0,r){const h=parseFloat(i.marginTop),g=parseFloat(i.marginLeft);l(u.top)&&(u.top-=f-h),l(u.bottom)&&(u.bottom-=f-h),l(u.left)&&(u.left-=c-g),l(u.right)&&(u.right-=c-g),u.marginTop=h,u.marginLeft=g}return u}function A(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function K(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}const{overflow:o,overflowX:e,overflowY:r}=b(t);return/(auto|scroll|overlay)/.test(String(o)+String(r)+String(e))?t:K(A(t))}function R(t,o="top"){const e="top"===o?"scrollTop":"scrollLeft",r=t.nodeName;return"BODY"===r||"HTML"===r?(t.ownerDocument.scrollingElement||t.ownerDocument.documentElement)[e]:t[e]}function G(t){const o=t.nodeName;return"BODY"!==o&&"HTML"!==o&&("fixed"===b(t,"position")||G(A(t)))}function W(t,o,e=0,r,n=!1){let s={top:0,left:0};const i=n?j(t):y(t,o);if("viewport"===r)s=function it(t,o=!1){const e=t.ownerDocument.documentElement,r=T(t,e),n=Math.max(e.clientWidth,window.innerWidth||0),s=Math.max(e.clientHeight,window.innerHeight||0),i=o?0:R(e),f=o?0:R(e,"left");
1return E({top:i-Number(r?.top)+Number(r?.marginTop),left:f-Number(r?.left)+Number(r?.marginLeft),width:n,height:s})}(i,n);else{let f;"scrollParent"===r?(f=K(A(o)),"BODY"===f.nodeName&&(f=t.ownerDocument.documentElement)):f="window"===r?t.ownerDocument.documentElement:r;const c=T(f,i,n);if(c&&"HTML"===f.nodeName&&!G(i)){const{height:u,width:h}=Y(t.ownerDocument);l(s.top)&&l(c.top)&&l(c.marginTop)&&(s.top+=c.top-c.marginTop),l(s.top)&&(s.bottom=Number(u)+Number(c.top)),l(s.left)&&l(c.left)&&l(c.marginLeft)&&(s.left+=c.left-c.marginLeft),l(s.top)&&(s.right=Number(h)+Number(c.left))}else c&&(s=c)}return l(s.left)&&(s.left+=e),l(s.top)&&(s.top+=e),l(s.right)&&(s.right-=e),l(s.bottom)&&(s.bottom-=e),s}function nt({width:t,height:o}){return t*o}function P(t,o,e,r,n=["top","bottom","right","left"],s="viewport",i=0){if(-1===t.indexOf("auto"))return t;const f=W(e,r,i,s),c={top:{width:f?.width??0,height:(o?.top??0)-(f?.top??0)},right:{width:(f?.right??0)-(o?.right??0),height:f?.height??0},bottom:{width:f?.width??0,height:(f?.bottom??0)-(o?.bottom??0)},left:{width:(o.left??0)-(f?.left??0),height:f?.height??0}},u=Object.keys(c).map(p=>({position:p,...c[p],area:nt(c[p])})).sort((p,a)=>a.area-p.area);let h=u.filter(({width:p,height:a})=>p>=e.clientWidth&&a>=e.clientHeight);h=h.filter(({position:p})=>n.some(a=>a===p));const g=h.length>0?h[0].position:u[0].position,m=t.split(" ")[1];return e.className=e.className.replace(/bs-tooltip-auto/g,`bs-tooltip-${(0,S.getBsVer)().isBs5?M[g]:g}`),g+(m?`-${m}`:"")}const D=(t,o=0)=>t?parseFloat(t):o;function X(t){const e=t.ownerDocument.defaultView?.getComputedStyle(t),r=D(e?.marginTop)+D(e?.marginBottom),n=D(e?.marginLeft)+D(e?.marginRight);return{width:Number(t.offsetWidth)+n,height:Number(t.offsetHeight)+r}}function Z(t,o,e){return T(o,e?j(t):y(t,o),e)}function V(t,o,e){const r=e.split(" ")[0],n=X(t),s={width:n.width,height:n.height},i=-1!==["right","left"].indexOf(r),f=i?"top":"left",c=i?"left":"top",u=i?"height":"width",h=i?"width":"height";return s[f]=(o[f]??0)+o[u]/2-n[u]/2,s[c]=r===c?(o[c]??0)-n[h]:o[function ft(t){const o={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,e=>o[e])}(c)]??0,s}function J(t,o){return!!t.modifiers[o]?.enabled}const ut={top:["top","top start","top end"],bottom:["bottom","bottom start","bottom end"],start:["start","start top","start bottom"],end:["end","end top","end bottom"]};function $(t,o){return!!(0,S.getBsVer)().isBs5&&ut[o].includes(t)}function Q(t){return(0,S.getBsVer)().isBs5?$(t,"end")?"ms-2":$(t,"start")?"me-2":$(t,"top")?"mb-2":$(t,"bottom")?"mt-2":"":""}function F(t,o,e){!t||!o||Object.keys(o).forEach(r=>{let n="";-1!==["width","height","top","right","bottom","left"].indexOf(r)&&function rt(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(Number(t))}(o[r])&&(n="px"),e?e.setStyle(t,r,`${String(o[r])}${n}`):t.style[r]=String(o[r])+n})}function lt(t){let o=t.offsets.target;const e=t.instance.target.querySelector(".arrow");if(!e)return t;const r=-1!==["left","right"].indexOf(t.placement.split(" ")[0]),n=r?"height":"width",s=r?"Top":"Left",i=s.toLowerCase(),f=r?"left":"top",c=r?"bottom":"right",u=X(e)[n],h=t.placement.split(" ")[1];(t.offsets.host[c]??0)-u<(o[i]??0)&&(o[i]-=(o[i]??0)-((t.offsets.host[c]??0)-u)),Number(t.offsets.host[i])+Number(u)>(o[c]??0)&&(o[i]+=Number(t.offsets.host[i])+Number(u)-Number(o[c])),o=E(o);const g=b(t.instance.target),m=parseFloat(g[`margin${s}`])||0,p=parseFloat(g[`border${s}Width`])||0;let a;if(h){const _=parseFloat(g.borderRadius)||0,w=Number(m+p+_);a=i===h?Number(t.offsets.host[i])+w:Number(t.offsets.host[i])+Number(t.offsets.host[n]-w)}else a=Number(t.offsets.host[i])+Number(t.offsets.host[n]/2-u/2);let N=a-(o[i]??0)-m-p;return N=Math.max(Math.min(o[n]-(u+5),N),0),t.offsets.arrow={[i]:Math.round(N),[f]:""},t.instance.arrow=e,t}function gt(t){if(t.offsets.target=E(t.offsets.target),!J(t.options,"flip"))return t.offsets.target={...t.offsets.target,...V(t.instance.target,t.offsets.host,t.placement)},t;const o=W(t.instance.target,t.instance.host,0,"viewport",!1);let e=t.placement.split(" ")[0],r=t.placement.split(" ")[1]||"";const f=P("auto",t.offsets.host,t.instance.target,t.instance.host,t.options.allowedPositions),c=[e,f];
1return c.forEach((u,h)=>{if(e!==u||c.length===h+1)return;e=t.placement.split(" ")[0];const g="left"===e&&Math.floor(t.offsets.target.right??0)>Math.floor(t.offsets.host.left??0)||"right"===e&&Math.floor(t.offsets.target.left??0)<Math.floor(t.offsets.host.right??0)||"top"===e&&Math.floor(t.offsets.target.bottom??0)>Math.floor(t.offsets.host.top??0)||"bottom"===e&&Math.floor(t.offsets.target.top??0)<Math.floor(t.offsets.host.bottom??0),m=Math.floor(t.offsets.target.left??0)<Math.floor(o.left??0),p=Math.floor(t.offsets.target.right??0)>Math.floor(o.right??0),a=Math.floor(t.offsets.target.top??0)<Math.floor(o.top??0),N=Math.floor(t.offsets.target.bottom??0)>Math.floor(o.bottom??0),_="left"===e&&m||"right"===e&&p||"top"===e&&a||"bottom"===e&&N,w=-1!==["top","bottom"].indexOf(e),tt=w&&"left"===r&&m||w&&"right"===r&&p||!w&&"left"===r&&a||!w&&"right"===r&&N;(g||_||tt)&&((g||_)&&(e=c[h+1]),tt&&(r=function ct(t){return"right"===t?"left":"left"===t?"right":t}(r)),t.placement=e+(r?` ${r}`:""),t.offsets.target={...t.offsets.target,...V(t.instance.target,t.offsets.host,t.placement)})}),t}function at(t){if(!J(t.options,"preventOverflow"))return t;const o="transform",e=t.instance.target.style,{top:r,left:n,[o]:s}=e;e.top="",e.left="",e[o]="";const i=W(t.instance.target,t.instance.host,0,t.options.modifiers.preventOverflow?.boundariesElement||"scrollParent",!1);e.top=r,e.left=n,e[o]=s;const c={primary(u){let h=t.offsets.target[u];return(t.offsets.target[u]??0)<(i[u]??0)&&(h=Math.max(t.offsets.target[u]??0,i[u]??0)),{[u]:h}},secondary(u){const h="right"===u,g=h?"left":"top";let p=t.offsets.target[g];return(t.offsets.target[u]??0)>(i[u]??0)&&(p=Math.min(t.offsets.target[g]??0,(i[u]??0)-t.offsets.target[h?"width":"height"])),{[g]:p}}};return["left","right","top","bottom"].forEach(u=>{const h=-1!==["left","top","start"].indexOf(u)?c.primary:c.secondary;t.offsets.target={...t.offsets.target,...h(u)}}),t}function mt(t){const o=t.placement,e=o.split(" ")[0],r=o.split(" ")[1];if(r){const{host:n,target:s}=t.offsets,i=-1!==["bottom","top"].indexOf(e),f=i?"left":"top",c=i?"width":"height",u={start:{[f]:n[f]},end:{[f]:(n[f]??0)+n[c]-s[c]}};t.offsets.target={...s,[f]:f===r?u.start[f]:u.end[f]}}return t}class q{position(o,e){return this.offset(o,e)}offset(o,e){return Z(e,o)}positionElements(o,e,r,n,s){const i=[gt,mt,at,lt],c=function pt(t,o,e,r){if(!t||!o)return;const n=Z(t,o);!e.match(/^(auto)*\s*(left|right|top|bottom|start|end)*$/)&&!e.match(/^(left|right|top|bottom|start|end)*(?: (left|right|top|bottom|start|end))*$/)&&(e="auto");const s=!!e.match(/auto/g);let i=e.match(/auto\s(left|right|top|bottom|start|end)/)?e.split(" ")[1]||"auto":e;const f=i.match(/^(left|right|top|bottom|start|end)* ?(?!\1)(left|right|top|bottom|start|end)?/);return f&&(i=f[1]+(f[2]?` ${f[2]}`:"")),-1!==["left right","right left","top bottom","bottom top"].indexOf(i)&&(i="auto"),i=P(i,n,t,o,r?r.allowedPositions:void 0),{options:r||{modifiers:{}},instance:{target:t,host:o,arrow:void 0},offsets:{target:V(t,n,i),host:n,arrow:void 0},positionFixed:!1,placement:i,placementAuto:s}}(e,o,B[r],s);if(c)return i.reduce((u,h)=>h(u),c)}}const dt=new q;function I(t,o,e,r,n,s){const i=dt.positionElements(t,o,e,r,n);if(!i)return;const f=function st(t){return{width:t.offsets.target.width,height:t.offsets.target.height,left:Math.floor(t.offsets.target.left??0),top:Math.round(t.offsets.target.top??0),bottom:Math.round(t.offsets.target.bottom??0),right:Math.floor(t.offsets.target.right??0)}}(i);F(o,{"will-change":"transform",top:"0px",left:"0px",transform:`translate3d(${f.left}px, ${f.top}px, 0px)`},s),i.instance.arrow&&F(i.instance.arrow,i.offsets.arrow,s),function ht(t,o){const e=t.instance.target;let r=e.className;const n=(0,S.getBsVer)().isBs5?M[t.placement]:t.placement;t.placementAuto&&(r=r.replace(/bs-popover-auto/g,`bs-popover-${n}`),r=r.replace(/ms-2|me-2|mb-2|mt-2/g,""),r=r.replace(/bs-tooltip-auto/g,`bs-tooltip-${n}`),r=r.replace(/\sauto/g,` ${n}`),-1!==r.indexOf("popover")&&(r=r+" "+Q(n)),-1!==r.indexOf("popover")&&-1===r.indexOf("popover-auto")&&(r+=" popover-auto"),-1!==r.indexOf("tooltip")&&-1===r.indexOf("tooltip-auto")&&(r+=" tooltip-auto")),r=r.replace(/left|right|top|bottom|end|start/g,`${n.split(" ")[0]}`),o?o.setAttribute(e,"class",r):e.className=r}(i,s)}let bt=(()=>{class t{constructor(e,r,n){this.update$$=new v.Subject,this.positionElements=new Map,this.isDisabled=!1,(0,ot.isPlatformBrowser)(n)&&e.runOutsideAngular(()=>
1{this.triggerEvent$=(0,v.merge)((0,v.fromEvent)(window,"scroll",{passive:!0}),(0,v.fromEvent)(window,"resize",{passive:!0}),(0,v.of)(0,v.animationFrameScheduler),this.update$$),this.triggerEvent$.subscribe(()=>{this.isDisabled||this.positionElements.forEach(s=>{I(x(s.target),x(s.element),s.attachment,s.appendToBody,this.options,r.createRenderer(null,null))})})})}position(e){this.addPositionElement(e)}get event$(){return this.triggerEvent$}disable(){this.isDisabled=!0}enable(){this.isDisabled=!1}addPositionElement(e){this.positionElements.set(x(e.element),e)}calcPosition(){this.update$$.next(null)}deletePositionElement(e){this.positionElements.delete(x(e))}setOptions(e){this.options=e}static{this.\u0275fac=function(r){return new(r||t)(d.\u0275\u0275inject(d.NgZone),d.\u0275\u0275inject(d.RendererFactory2),d.\u0275\u0275inject(d.PLATFORM_ID))}}static{this.\u0275prov=d.\u0275\u0275defineInjectable({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function x(t){return"string"==typeof t?document.querySelector(t):t instanceof d.ElementRef?t.nativeElement:t??null}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.