OwlCyberSecurity - MANAGER
Edit File: 334.js
(self.webpackChunkrishiExports=self.webpackChunkrishiExports||[]).push([[334],{9334:(e,n,t)=>{"use strict";t.r(n),t.d(n,{handleClick:()=>oe,mount:()=>re});var o=t(7891),r="data-focus-lock",i=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},c=function(e){return Array.isArray(e)?e:[e]},u=function(e){return Array.isArray(e)?e[0]:e},a=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},l=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},d=function(e,n){var t=e.get(n);if(void 0!==t)return t;var o=function(e,n){return!e||l(e)||!function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var n=window.getComputedStyle(e,null);return!(!n||!n.getPropertyValue||"none"!==n.getPropertyValue("display")&&"hidden"!==n.getPropertyValue("visibility"))}(e)&&n(a(e))}(n,d.bind(void 0,e));return e.set(n,o),o},f=function(e,n){var t=e.get(n);if(void 0!==t)return t;var o=function(e,n){return!(e&&!l(e))||!!p(e)&&n(a(e))}(n,f.bind(void 0,e));return e.set(n,o),o},s=function(e){return e.dataset},v=function(e){return"INPUT"===e.tagName},m=function(e){return v(e)&&"radio"===e.type},p=function(e){var n=e.getAttribute("data-no-autofocus");return![!0,"true",""].includes(n)},y=function(e){var n;return Boolean(e&&(null===(n=s(e))||void 0===n?void 0:n.focusGuard))},b=function(e){return!y(e)},h=function(e){return Boolean(e)},g=function(e,n){var t=e.tabIndex-n.tabIndex,o=e.index-n.index;if(t){if(!e.tabIndex)return 1;if(!n.tabIndex)return-1}return t||o},w=function(e,n,t){return i(e).map((function(e,n){return{node:e,index:n,tabIndex:t&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(g)},O=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),S="".concat(O,", [data-focus-guard]"),E=function(e,n){var t;return i((null===(t=e.shadowRoot)||void 0===t?void 0:t.children)||e.children).reduce((function(e,t){return e.concat(t.matches(n?S:O)?[t]:[],E(t))}),[])},_=function(e,n){return e.reduce((function(e,t){var o,r=E(t,n),c=(o=[]).concat.apply(o,r.map((function(e){return function(e,n){return e instanceof HTMLIFrameElement&&e.contentDocument?_([e.contentDocument.body],n):[e]}(e,n)})));return e.concat(c,t.parentNode?i(t.parentNode.querySelectorAll(O)).filter((function(e){return e===t})):[])}),[])},A=function(e,n){return i(e).filter((function(e){return d(n,e)})).filter((function(e){return function(e){return!((v(e)||function(e){return"BUTTON"===e.tagName}(e))&&("hidden"===e.type||e.disabled))}(e)}))},N=function(e,n){return void 0===n&&(n=new Map),i(e).filter((function(e){return f(n,e)}))},T=function(e,n){return w(A(_(e),n),!1)},k=function(e,n){return e.shadowRoot?k(e.shadowRoot,n):!(void 0===Object.getPrototypeOf(e).contains||!Object.getPrototypeOf(e).contains.call(e,n))||i(e.children).some((function(e){var t;if(e instanceof HTMLIFrameElement){var o=null===(t=e.contentDocument)||void 0===t?void 0:t.body;return!!o&&k(o,n)}return k(e,n)}))},x=function(e){var n;if(void 0===e&&(e=document),e&&e.activeElement){var t=e.activeElement;return t.shadowRoot?x(t.shadowRoot):t instanceof HTMLIFrameElement&&(null===(n=t.contentWindow)||void 0===n?void 0:n.document)?x(t.contentWindow.document):t}},C=function(e){return e.parentNode?C(e.parentNode):e},L=function(e){return c(e).filter(Boolean).reduce((function(e,n){var t=n.getAttribute(r);return e.push.apply(e,t?function(e){for(var n=new Set,t=e.length,o=0;o<t;o+=1)for(var r=o+1;r<t;r+=1){var i=e[o].compareDocumentPosition(e[r]);(i&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&n.add(r),(i&Node.DOCUMENT_POSITION_CONTAINS)>0&&n.add(o)}return e.filter((function(e,t){return!n.has(t)}))}(i(C(n).querySelectorAll("[".concat(r,'="').concat(t,'"]:not([').concat("data-focus-lock-disabled",'="disabled"])')))):[n]),e}),[])},P=function(e,n){return m(e)&&e.name?function(e,n){return n.filter(m).filter((function(n){return n.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,n):e},q=function(e){return e[0]&&e.length>1?P(e[0],e):e[0]},D=function(e,n){return e.length>1?e.indexOf(P(e[n],e)):n},I="NEW_FOCUS",M=function(e,n){return void 0===n&&(n=[]),n.push(e),e.parentNode&&M(e.parentNode.host||e.parentNode,n),n},j=function(e,n){for(var t=M(e),o=M(n),r=0;r<t.length;r+=1){var i=t[r];if(o.indexOf(i)>=0)return i}return!1},B=function(e,n){var t,o,r,a,l,d,f=x(c(e).length>0?document:u(e).ownerDocument),v=L(e).filter(b),m=function(e,n,t){var o=c(e),r=c(n),i=o[0],u=!1;return r.filter(Boolean).forEach((function(e){u=j(u||e,e)||u,t.filter(Boolean).forEach((function(e){var n=j(i,e);n&&(u=!u||k(n,u)?n:j(n,u))}))})),u}(f||e,e,v),p=new Map,g=T(v,p),O=function(e,n,t){return w(A(_(e,t),n),!0,t)}(v,p).filter((function(e){var n=e.node;return b(n)}));if(O[0]||(O=g)[0]){var S,E,C,M=T([m],p).map((function(e){return e.node})),B=(S=M,E=O,C=new Map,E.forEach((function(e){return C.set(e.node,e)})),S.map((function(e){return C.get(e)})).filter(h)),W=B.map((function(e){return e.node})),R=function(e,n,t,o){var r=e.length,i=e[0],c=e[r-1],u=y(t);if(!(t&&e.indexOf(t)>=0)){var a,l,d=void 0!==t?n.indexOf(t):-1,f=o?n.indexOf(o):d,s=o?e.indexOf(o):-1,v=d-f,m=n.indexOf(i),p=n.indexOf(c),b=(a=n,l=new Set,a.forEach((function(e){return l.add(P(e,a))})),a.filter((function(e){return l.has(e)}))),h=(void 0!==t?b.indexOf(t):-1)-(o?b.indexOf(o):d),g=D(e,0),w=D(e,r-1);return-1===d||-1===s?I:!v&&s>=0?s:d<=m&&u&&Math.abs(v)>1?w:d>=p&&u&&Math.abs(v)>1?g:v&&Math.abs(h)>1?s:d<=m?w:d>p?g:v?Math.abs(v)>1?s:(r+s+v)%r:void 0}}(W,M,f,n);if(R===I){var U=(t=g,o=W,r=function(e,n){return e.reduce((function(e,t){return e.concat(function(e,n){return A((t=e.querySelectorAll("[".concat("data-autofocus-inside","]")),i(t).map((function(e){return _([e])})).reduce((function(e,n){return e.concat(n)}),[])),n);var t}(t,n))}),[])}(v,p),l=t.map((function(e){return e.node})),(d=N(l.filter((a=r,function(e){var n,t=null===(n=s(e))||void 0===n?void 0:n.autofocus;return e.autofocus||void 0!==t&&"false"!==t||a.indexOf(e)>=0}))))&&d.length?q(d):q(N(o)));return U?{node:U}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===R?R:B[R]}},W=0,R=!1;var U=0,F=null,G=function(e){U=e,e&&function(){var e,n;if(U){var t=U;document&&document.activeElement===document.body||function(e){void 0===e&&(e=document);var n=x(e);return!!n&&i(e.querySelectorAll("[".concat("data-no-focus-lock","]"))).some((function(e){return k(e,n)}))}()||(t&&(e=t,void 0===n&&(n=x(u(e).ownerDocument)),!(!(!n||n.dataset&&n.dataset.focusGuard)&&L(e).some((function(e){return k(e,n)||function(e,n){return Boolean(i(e.querySelectorAll("iframe")).some((function(e){return function(e,n){return e===n}(e,n)})))}(e,n)}))))&&function(e,n,t){void 0===t&&(t={});var o,r,i=B(e,n);if(!R&&i){if(W>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),R=!0,void setTimeout((function(){R=!1}),1);W++,o=i.node,r=t.focusOptions,"focus"in o&&o.focus(r),"contentWindow"in o&&o.contentWindow&&o.contentWindow.focus(),W--}}(t,F),F=document.activeElement)}}()},H=[],V=function(e){return!!G((n=H,n.filter((function(e){return e})).slice(-1)[0]))&&(e&&e.preventDefault(),!0);var n};const Y=function(e){0===H.length&&document.addEventListener("focusin",V),H.indexOf(e)<0&&(H.push(e),V())},K=function(e){H=H.filter((function(n){return n!==e})),V(),0===H.length&&document.removeEventListener("focusin",V)};var $=t(9515);function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}function J(e){return function(e){if(Array.isArray(e))return Q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return Q(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Q(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}function X(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function Z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?X(Object(t),!0).forEach((function(n){ee(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):X(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function ee(e,n,t){return(n=function(e){var n=function(e,n){if("object"!==z(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!==z(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===z(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var ne=function(e){var n;e=Z({onClose:function(){},container:null,forceOpen:!1,focus:!0},e),J(document.querySelectorAll('[href*="'.concat(e.container.id,'"]'))).map((function(e){e.classList.add("active")})),e.container&&e.container.classList.add("active"),e.focus&&setTimeout((function(){e.container.querySelector("input")&&e.container.querySelector("input").focus()}),200),e.container.querySelector(".cb__panel_content")&&e.container.querySelector(".cb__panel_content").addEventListener("click",(function(n){Array.from(e.container.querySelectorAll("select")).map((function(e){return e.selectr&&e.selectr.events.dismiss(n)}))})),e.clickOutside&&e.container.querySelector(".cb__panel_content")&&e.container.addEventListener("click",e.handleContainerClick),e.forceOpen||(document.body.dataset.panel="in".concat(e.container.dataset.behaviour.indexOf("left")>-1?":left":e.container.dataset.behaviour.indexOf("right")>-1?":right":"")),e.container.addEventListener(e.container.dataset.behaviour.indexOf("side")>-1?"transitionend":"animationend",(function(){}),{once:!0}),e.forceOpen||document.addEventListener("keyup",(function(n){var t=n.keyCode;n.target,27===t&&(n.preventDefault(),document.body.hasAttribute("data-panel")&&te(e))}),{once:!0}),e.container&&e.container.querySelector(".close-button")&&e.container.querySelector(".close-button").addEventListener("click",(function(n){n.preventDefault(),te(e)}),{once:!0}),(e.scrollContainer||e.container.querySelector(".cb__panel_content"))&&(n=e.scrollContainer||e.container.querySelector(".cb__panel_content"),(0,o.disableBodyScroll)(n,{reserveScrollBarGap:!0}),Y(e.container.querySelector(".cb__panel_content"))),e.forceOpen||requestAnimationFrame((function(){return window.addEventListener("click",e.handleWindowClick)}))},te=function(e){if(e=Z({onClose:function(){},container:null},e),!document.body.hasAttribute("data-panel"))return e.container.classList.remove("active"),void e.onClose();J(document.querySelectorAll('[href*="'.concat(e.container.id,'"]'))).map((function(e){e.classList.remove("active")})),e.container.classList.remove("active"),document.body.dataset.panel="out",setTimeout((function(){var n;document.body.removeAttribute("data-panel"),$.default.trigger("ct:modal:closed",e.container),n=e.scrollContainer||e.container.querySelector(".cb__panel_content"),(0,o.enableBodyScroll)(n,{reserveScrollBarGap:!0}),K(e.container.querySelector(".cb__panel_content"))}),300),window.removeEventListener("click",e.handleWindowClick),e.container.removeEventListener("click",e.handleContainerClick),e.onClose()},oe=function(e,n){if(e.preventDefault(),n=Z({onClose:function(){},container:null,focus:!0,clickOutside:!0,isModal:!1,forceOpen:!1,scrollContainer:null,handleContainerClick:function(e){e.target!==n.container.querySelector(".cb__panel_content")&&e.target.closest(".cb__panel_content")||document.body.hasAttribute("data-panel")&&te(n)},handleWindowClick:function(e){n.container.contains(e.target)||e.target===document.body||document.body.hasAttribute("data-panel")&&te(n)}},n),document.body.hasAttribute("data-panel")&&!n.forceOpen)if(n.isModal&&!n.container.classList.contains("active")){var t=document.querySelector(".cb__header-trigger");t&&t.click(),setTimeout((function(){ne(n)}),600)}else te(n);else ne(n)};$.default.on("ct:offcanvas:force-close",(function(e){return te(e)}));var re=function(e){e.hasSearchEventListener||(e.hasSearchEventListener=!0,e.addEventListener("click",(function(n){oe(n,{isModal:!0,container:document.querySelector(e.hash),clickOutside:!0})})))}},7891:function(e,n){var t,o;t=function(e){"use strict";function n(e){if(Array.isArray(e)){for(var n=0,t=Array(e.length);n<e.length;n++)t[n]=e[n];return t}return Array.from(e)}Object.defineProperty(e,"__esModule",{value:!0});var t=!1;if("undefined"!=typeof window){var o={get passive(){t=!0}};window.addEventListener("testPassive",null,o),window.removeEventListener("testPassive",null,o)}function r(e){return a.some((function(n){return!(!n.options.allowTouchMove||!n.options.allowTouchMove(e))}))}function i(e){var n=e||window.event;return!!r(n.target)||1<n.touches.length||(n.preventDefault&&n.preventDefault(),!1)}function c(){setTimeout((function(){void 0!==s&&(document.body.style.paddingRight=s,s=void 0),void 0!==f&&(document.body.style.overflow=f,f=void 0)}))}var u="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&1<window.navigator.maxTouchPoints),a=[],l=!1,d=-1,f=void 0,s=void 0;e.disableBodyScroll=function(e,o){if(u){if(!e)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");if(e&&!a.some((function(n){return n.targetElement===e}))){var c={targetElement:e,options:o||{}};a=[].concat(n(a),[c]),e.ontouchstart=function(e){1===e.targetTouches.length&&(d=e.targetTouches[0].clientY)},e.ontouchmove=function(n){var t,o,c,u;1===n.targetTouches.length&&(o=e,u=(t=n).targetTouches[0].clientY-d,r(t.target)||(o&&0===o.scrollTop&&0<u||(c=o)&&c.scrollHeight-c.scrollTop<=c.clientHeight&&u<0?i(t):t.stopPropagation()))},l||(document.addEventListener("touchmove",i,t?{passive:!1}:void 0),l=!0)}}else{m=o,setTimeout((function(){if(void 0===s){var e=!!m&&!0===m.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;e&&0<n&&(s=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===f&&(f=document.body.style.overflow,document.body.style.overflow="hidden")}));var v={targetElement:e,options:o||{}};a=[].concat(n(a),[v])}var m},e.clearAllBodyScrollLocks=function(){u?(a.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),l&&(document.removeEventListener("touchmove",i,t?{passive:!1}:void 0),l=!1),a=[],d=-1):(c(),a=[])},e.enableBodyScroll=function(e){if(u){if(!e)return void console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");e.ontouchstart=null,e.ontouchmove=null,a=a.filter((function(n){return n.targetElement!==e})),l&&0===a.length&&(document.removeEventListener("touchmove",i,t?{passive:!1}:void 0),l=!1)}else(a=a.filter((function(n){return n.targetElement!==e}))).length||c()}},void 0===(o=t.apply(n,[n]))||(e.exports=o)}}]);