PageSourceSearch

https://www.kidthink.ca/wp-content/plugins/gravityformssignature/assets/js/dist/scripts-theme.min.js

js kidthink.ca collected 2026-10-01 14:03:51 UTC 10,588 bytes, 1 lines download raw bytes

1!function(){"use strict";var e,t={7031:function(e,t,r){var n=r(455),i=window.regeneratorRuntime,o=r.n(i),a=window.gform.utils,c=r(2888),u=r(8856),s=r(8545),l=r(2146),d=r(5674);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function p(){p=function(e,t){return new r(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function r(e,n,i){var o=RegExp(e,n);return t.set(o,i||t.get(e)),(0,l.A)(o,r.prototype)}function n(e,r){var n=t.get(r);return Object.keys(n).reduce(function(t,r){var i=n[r];if("number"==typeof i)t[r]=e[i];else{for(var o=0;void 0===e[i[o]]&&o+1<i.length;)o++;t[r]=e[i[o]]}return t},Object.create(null))}return(0,s.A)(r,RegExp),r.prototype.exec=function(t){var r=e.exec.call(this,t);if(r){r.groups=n(r,this);var i=r.indices;i&&(i.groups=n(i,this))}return r},r.prototype[Symbol.replace]=function(r,i){if("string"==typeof i){var o=t.get(this);return e[Symbol.replace].call(this,r,i.replace(/\$<([^>]+)(>|$)/g,function(e,t,r){if(""===r)return e;var n=o[t];return Array.isArray(n)?"$"+n.join("$"):"number"==typeof n?"$"+n:""}))}if("function"==typeof i){var a=this;return e[Symbol.replace].call(this,r,function(){var e=arguments;return"object"!=(0,c.A)(e[e.length-1])&&(e=[].slice.call(e)).push(n(e,a)),i.apply(this,e)})}return e[Symbol.replace].call(this,r,i)},p.apply(this,arguments)}var g=function(){var e=(0,n.A)(o().mark(function e(t){var r,n;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=t.detail.formId,n=document.querySelector("#gform_"+r),v(n);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),v=function(e){e&&(e.querySelectorAll(".gfield_signature_container").forEach(function(){var e=(0,n.A)(o().mark(function e(t){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m(t);case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()),window.gform.addAction("gform_repeater_post_item_add",y))},y=function(e,t){e.get(0).querySelectorAll(".gfield--type-signature").forEach(function(){var e=(0,n.A)(o().mark(function e(t){var r,n,i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(r=t.querySelector(".gfield_signature_container")).removeAttribute("data-initialized"),t.querySelectorAll('input[type="hidden"]').forEach(function(e){e.value=""}),(n=t.querySelector('[id$="_signature_image"]'))&&(n.style.display="none"),(i=t.querySelector('[id$="_lockedReset"]'))&&(i.style.display="none"),t.querySelector('[id$="_resetbutton"]').style.display="block",r.style.display="block",e.next=11,m(r);case 11:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}())},m=function(){var e=(0,n.A)(o().mark(function e(t){var r,n;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.dataset.initialized){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,k(t);case 4:if(r=e.sent,n=O(t,r)){e.next=8;break}return e.abrupt("return");case 8:n.hasSignatureData()&&_(n),h(n),t.dataset.initialized=!0;case 11:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),h=function(e){e.container.parentElement.querySelector('[id$="_resetbutton"]').addEventListener("click",function(){S(e)});var t=e.container.parentElement.querySelector('[id$="_lockedReset"]');t&&t.addEventListener("click",function(){S(e)}),e.signaturePad.addEventListener("endStroke",function(){e.dataInput.value=e.signaturePad.toDataURL()+";background-color:"+e.backgroundColor}),window.addEventListener("resize",function(){b(e)}),document.addEventListener("gfcf/conversational/navigate/next",function(t){w(t,e)}),document.addEventListener("gfcf/conversational/navigate/prev",function(t){w(t,e)});var r=parseInt(e.container.closest("form").dataset.formid,10);rgars(window,"gf_form_conditional_logic/".concat(r))?(document.addEventListener("gform/conditionalLogic/init/end",function(t){t.detail.formId===r&&b(e)}),window.gform.addAction("gform_post_conditional_logic_field_action",function(t,r,n,i,o){if(!o&&"show"===r&&n.startsWith("#field_")){var a=n.replace("#field","input");e.fieldID===a&&b(e)}})):(0,a.trigger)({event:"resize"})},w=function(e,t){var r=e.detail.target.id.replace("field","input");t.fieldID===r&&b(t)},b=function(e){var t=parseInt(window.getComputedStyle(e.container).width,10),r=document.getElementById(e.fieldID);if(t<e.canvasWidth)r.width=t;else{if(!(t>=e.canvasWidth&&r.width!==e.canvasWidth))return;r.width=e.canvasWidth}e.signaturePad.fromData(e.signaturePad.toData())},_=function(e){e.signaturePad.off(),e.signaturePad.fromDataURL(e.getSignatureData()),e.container.parentElement.querySelector('[id$="_lockedReset"]').style.display="block"},S=function(e){e.signaturePad.clear(),e.dataInput.value="";var t=e.container.closest(".gfield--type-signature,.detail-view").querySelector('[id$="_signature_image"]');t&&(t.style.display="none");var r=e.container.parentElement.querySelector('[id$="_lockedReset"]');r&&(r.style.display="none"),e.container.parentElement.querySelector('[id$="_resetbutton"]').style.display="block",e.container.style.display="block",e.signaturePad.on(),(0,a.trigger)({event:"resize"})},k=function(){var e=(0,n.A)(o().mark(function e(t){var r,n,i,a,c,u,s,l;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(r=window.gform.config)||void 0===r||!r.getFormConfig){e.next=6;break}return n=t.closest(".gfield").id.match(p(/field_(\d+)_(\d+)/,{formId:1,fieldId:2})).groups,i=n.formId,a=n.fieldId,e.next=4,window.gform.config.getFormConfig("gform_theme_config/addon/signature",i);case 4:return c=e.sent,e.abrupt("return",c[a]);case 6:return u=x(t),s=u.split("-"),l=s[0],e.abrupt("return",window["gform_signature_settings_"+l]);case 10:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),O=function(e,t){var r=x(e),n=e.parentElement.querySelector('input[id$="_data"]');if(!r||!n)return!1;var i=t.backgroundColor,o=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?f(Object(r),!0).forEach(function(t){(0,u.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},t);o.backgroundColor="rgba(0, 0, 0, 0)";var a=e.querySelector("#"+r);return{container:e,fieldID:r,dataInput:n,signaturePad:new d.A(a,o),backgroundColor:i,canvasWidth:a.width,hasSignatureData:function(){return this.dataInput.value.length>0},getSignatureData:function(){return atob(this.dataInput.value.split(";background-color")[0])}}},x=function(e){var t=e.querySelector("canvas");return!!t&&t.getAttribute("id")},E=function(){var e=(0,n.A)(o().mark(function e(t,r,n,i){var a,c;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(confirm(gform_signature_frontend_strings.confirm_delete)){e.next=2;break}return e.abrupt("return");case 2:return(a=new FormData).append("lead_id",t),a.append("field_id",n),a.append("action","gf_delete_signature"),a.append("gf_delete_signature",gform_signature_frontend_strings.delete_nonce),e.next=9,fetch(ajaxurl,{method:"POST",body:a});case 9:e.sent,(c=i.closest(".gfield--type-signature,.detail-view")).querySelector('[id$="_signature_filename"]').value="",c.querySelector('[id$="_signature_image"]').style.display="none",c.querySelector('[id$="_Container"]').style.display="block",c.querySelector('[id$="_resetbutton"]').style.display="block";case 15:case"end":return e.stop()}},e)}));return function(t,r,n,i){return e.apply(this,arguments)}}();window.gform=window.gform||{},window.gform.signature={init:v,deleteSignature:E,handlePostRender:g,initField:m,getSettings:k,createSignatureObject:O,getFieldId:x};var P,j,q=function(){var e=(0,n.A)(o().mark(function e(){var t;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:!!document.querySelector(".entry-details")?v(document):"function"==typeof(null===(t=window.gform)||void 0===t||null===(t=t.core)||void 0===t?void 0:t.triggerPostRenderEvents)?document.addEventListener("gform/post_render",g):document.addEventListener("gform/postRender",g);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),A=function(){(0,a.ready)(q)};r.p=(null===(P=window.gform_theme_config)||void 0===P?void 0:P.public_path)||(null===(j=window.gform_admin_config)||void 0===j||null===(j=j.data)||void 0===j?void 0:j.public_path),A()}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}};return t[e].call(o.exports,o,o.exports,n),o.exports}n.m=t,e=[],n.O=function(t,r,i,o){if(!r){var a=1/0;for(l=0;l<e.length;l++){r=e[l][0],i=e[l][1],o=e[l][2];for(var c=!0,u=0;u<r.length;u++)(!1&o||a>=o)&&Object.keys(n.O).every(function(e){return n.O[e](r[u])})?r.splice(u--,1):(c=!1,o<a&&(a=o));if(c){e.splice(l--,1);var s=i();void 0!==s&&(t=s)}}return t}o=o||0;for(var l=e.length;l>0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[r,i,o]},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=r[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e}(),function(){var e={593:0};n.O.j=function(t){return 0===e[t]};var t=function(t,r){var i,o,a=r[0],c=r[1],u=r[2],s=0;if(a.some(function(t){return 0!==e[t]})){for(i in c)n.o(c,i)&&(n.m[i]=c[i]);if(u)var l=u(n)}for(t&&t(r);s<a.length;s++)o=a[s],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return n.O(l)},r=self.webpackChunkgravityformssignature=self.webpackChunkgravityformssignature||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),n.O(void 0,[721],function(){return n(7920)});var i=n.O(void 0,[721],function(){return n(7031)});i=n.O(i)}();

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.