PageSourceSearch

https://www.projecthope.org/wp-content/mu-plugins/gravityforms/ass…rm-text-counter.6f47da611701b8974efe.min.js

js projecthope.org collected 2026-09-24 17:34:45 UTC 1,948 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkgravityforms=self.webpackChunkgravityforms||[]).push([[499],{3151(t,e,n){n.r(e);var a=n(5798);const r=t=>{t.on("init",()=>{o(t.getElement(),t.getContent({format:"text"}).length,"ginput_counter_tinymce")}),t.on("input keyup paste setcontent undo redo change",()=>{c(t)})},o=(t,e,n)=>{if(!s(t))return;const a=g(t,n),r=m(t);a.textContent=d(r.template,e,r.maxLength),l(a,n,e>r.maxLength)},i=(0,a.debounce)(t=>{u(t),o(t,t.value.length)},{wait:100}),c=(0,a.debounce)(t=>{o(t.getElement(),t.getContent({format:"text"}).length,"ginput_counter_tinymce")},{wait:100}),u=t=>{const e=m(t);e.maxLength<=0||t.value.length>e.maxLength&&(t.value=t.value.substring(0,e.maxLength))},l=(t,e,n)=>{e&&t.classList.add(e),n?t.classList.add("ginput_counter_error"):t.classList.remove("ginput_counter_error")},s=t=>{const e=m(t);return e.template.length>0&&e.maxLength>0},m=t=>{const e=t.closest("[data-text-counter-max]");if(!e)return{template:"",maxLength:0};return{template:e.getAttribute("data-text-counter-template")||"",maxLength:parseInt(e.getAttribute("data-text-counter-max")||"0")}},g=t=>{let e=t.nextElementSibling;return e&&e.classList.contains("ginput_counter")||(e=document.createElement("div"),e.className="ginput_counter gfield_description",e.setAttribute("aria-live","polite"),t.insertAdjacentElement("afterend",e)),e},d=(t,e,n)=>{const a=Math.max(0,n-e);return t.replace("{current}",e).replace("{max}",n).replace("{remaining}",a)},p=t=>{const e=document.getElementById("gform_".concat(t));e.querySelectorAll('[data-text-counter-max][data-text-counter-template] :is(textarea, input[type="text"]):not(.wp-editor-area)').forEach(t=>{u(t),o(t,t.value.length)}),e.addEventListener("input",t=>{i(t.target)}),window.tinymce&&((window.tinymce.editors||[]).forEach(t=>{r(t)}),window.tinymce.on("AddEditor",t=>{r(t.editor)})),(0,a.consoleInfo)("Gravity Forms Theme: Text counter initialized for form: "+t)};n.d(e,["default",0,p])}}]);

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.