PageSourceSearch

https://www.narayana-verlag.de/theme/60337a1f736766d5e2bb89bd312fc…/intedia-password-reveal.js?1790255439

js narayana-verlag.de collected 2026-09-24 21:06:33 UTC 9,754 bytes, 1 lines download raw bytes

1(()=>{"use strict";var t={156:t=>{var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==s},s="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?a(Array.isArray(t)?[]:{},t,e):t}function r(t,e,s){return t.concat(e).map(function(t){return i(t,s)})}function n(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function o(t,e){try{return e in t}catch(t){return!1}}function a(t,s,l){(l=l||{}).arrayMerge=l.arrayMerge||r,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=i;var c,u,h=Array.isArray(s);return h!==Array.isArray(t)?i(s,l):h?l.arrayMerge(t,s,l):(u={},(c=l).isMergeableObject(t)&&n(t).forEach(function(e){u[e]=i(t[e],c)}),n(s).forEach(function(e){(!o(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(o(t,e)&&c.isMergeableObject(s[e])?u[e]=(function(t,e){if(!e.customMerge)return a;var s=e.customMerge(t);return"function"==typeof s?s:a})(e,c)(t[e],s[e],c):u[e]=i(s[e],c))}),u)}a.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,s){return a(t,s,e)},{})},t.exports=a}},e={};function s(i){var r=e[i];if(void 0!==r)return r.exports;var n=e[i]={exports:{}};return t[i](n,n.exports,s),n.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var i=s(156),r=s.n(i);class n{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let s=n.toUpperCamelCase(t,e);return n.lcFirst(s)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>n.ucFirst(t.toLowerCase())).join(""):n.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class o{constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(t,{detail:e,cancelable:s});return this.el.dispatchEvent(i),i}subscribe(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,r=t.split("."),n=s.scope?e.bind(s.scope):e;if(s.once&&!0===s.once){let e=n;n=function(s){i.unsubscribe(t),e(s)}}return this.el.addEventListener(r[0],n),this.listeners.push({splitEventName:r,opts:s,cb:n}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,s)=>([...s.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(s.splitEventName[0],s.cb):t.push(s),t),[]),!0}reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}}class a{constructor(t,e={},s=!1){if(!(t instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${s}".`);return}this.el=t,this.$emitter=new o(this.el),this._pluginName=this._getPluginName(s),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=[this.constructor.options,this.options,t];return e.push(this._getConfigFromDataAttribute()),e.push(this._getOptionsFromDataAttribute()),r().all(e.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_getConfigFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=n.toDashCase(this._pluginName),s=this.el.getAttribute(`data-${e}-config`);return s?window.PluginConfigManager.get(this._pluginName,s):t}_getOptionsFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=n.toDashCase(this._pluginName),s=this.el.getAttribute(`data-${e}-options`);if(s)try{return JSON.parse(s)}catch(t){console.error(`The data attribute "data-${e}-options" could not be parsed to json: ${t.message}`)}return t}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}}class l extends a{static #t=this.options={wrapperClass:"intedia-password-reveal",buttonClass:"intedia-password-reveal__button",revealedClass:"is-revealed",togglingClass:"is-toggling",iconShowClass:"intedia-password-reveal__icon--show",iconHideClass:"intedia-password-reveal__icon--hide",toggleAnimationMs:280};init(){let t=window.intediaPasswordReveal||{};!1===t.active||0===t.active||"0"===t.active||this.el.closest(`.${this.options.wrapperClass}`)||(this._labels={show:t.showLabel||"Show password",hide:t.hideLabel||"Hide password"},this._wrapInput(),this._createButton(),this._registerEvents(),this._syncFeedbackState())}_wrapInput(){let t=document.createElement("div");t.className=this.options.wrapperClass,this.el.parentNode.insertBefore(t,this.el),t.appendChild(this.el),this.wrapper=t}_createButton(){let t=document.createElement("button");t.type="button",t.className=this.options.buttonClass,t.setAttribute("aria-label",this._labels.show),t.setAttribute("aria-pressed","fal
1se"),t.setAttribute("tabindex","0"),t.innerHTML=`${this._eyeShowSvg()}${this._eyeHideSvg()}`,this.wrapper.appendChild(t),this.button=t}_registerEvents(){this._onToggle=this._onToggle.bind(this),this.button.addEventListener("click",this._onToggle),this._onClassMutation=()=>this._syncFeedbackState(),this._classObserver=new MutationObserver(this._onClassMutation),this._classObserver.observe(this.el,{attributes:!0,attributeFilter:["class"]})}_syncFeedbackState(){if(!this.wrapper)return;let t=this.el.classList.contains("is-invalid")||this.el.classList.contains("is-valid");this.wrapper.classList.toggle("has-feedback",t)}_onToggle(t){t.preventDefault();let e="password"===this.el.type;this._getPairedInputs().forEach(t=>{this._applyReveal(t,e,t===this.el)})}_getPairedInputs(){let t=(this.el.getAttribute("autocomplete")||"").toLowerCase();if("current-password"===t)return[this.el];let e=this.el.closest("form");if(!e)return[this.el];let s=[...e.querySelectorAll(`.${this.options.wrapperClass} input`)];if("new-password"===t){let t=s.filter(t=>"new-password"===(t.getAttribute("autocomplete")||"").toLowerCase());return t.length?t:[this.el]}let i=this.el.getAttribute("name")||"",r=this.el.getAttribute("id")||"",n=s.filter(t=>{if(t===this.el)return!0;let e=t.getAttribute("name")||"",s=t.getAttribute("id")||"";return"current-password"!==(t.getAttribute("autocomplete")||"").toLowerCase()&&this._namesLookLikePasswordPair(i,r,e,s)});return n.length?n:[this.el]}_namesLookLikePasswordPair(t,e,s,i){let r=t=>t.toLowerCase().replace(/[^a-z0-9]/g,""),n=r(`${t}${e}`),o=r(`${s}${i}`),a=t=>t.includes("confirm"),l=t=>t.replace(/confirmation|confirm/g,"");return a(n)!==a(o)&&(l(n)===l(o)||l(n).includes("password")&&l(o).includes("password"))}_applyReveal(t,e,s){let i=t.closest(`.${this.options.wrapperClass}`);if(!i)return;let r=i.querySelector(`.${this.options.buttonClass}`),n=s?t.selectionStart:null,o=s?t.selectionEnd:null;if(this._playUnveilAnimation(i),t.type=e?"text":"password",r&&(r.setAttribute("aria-pressed",String(e)),r.setAttribute("aria-label",e?this._labels.hide:this._labels.show)),i.classList.toggle(this.options.revealedClass,e),s&&(t.focus(),"number"==typeof n&&"number"==typeof o))try{t.setSelectionRange(n,o)}catch(t){}}_playUnveilAnimation(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.wrapper;if(t&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches){if(t.classList.remove(this.options.togglingClass),t.offsetWidth,t.classList.add(this.options.togglingClass),t===this.wrapper?"_toggleTimer":null){window.clearTimeout(this._toggleTimer),this._toggleTimer=window.setTimeout(()=>{t.classList.remove(this.options.togglingClass)},this.options.toggleAnimationMs);return}window.setTimeout(()=>{t.classList.remove(this.options.togglingClass)},this.options.toggleAnimationMs)}}_eyeShowSvg(){return`<svg class="intedia-password-reveal__icon ${this.options.iconShowClass}" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>`}_eyeHideSvg(){return`<svg class="intedia-password-reveal__icon ${this.options.iconHideClass}" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg>`}}window.PluginManager.register("PasswordReveal",l,'input[type="password"]')})();

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.