PageSourceSearch

https://www.springadventure.no/wp-content/plugins/peepso/assets/js/sections.min.js?ver=9.0.5.7

js springadventure.no collected 2026-10-09 18:33:33 UTC 8,985 bytes, 1 lines download raw bytes

1!function l(s,d,n){function a(t,e){if(!d[t]){if(!s[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(o)return o(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}i=d[t]={exports:{}},s[t][0].call(i.exports,function(e){return a(s[t][1][e]||e)},i,i.exports,l,s,d,n)}return d[t].exports}for(var o="function"==typeof require&&require,e=0;e<n.length;e++)a(n[e]);return a}({1:[function(e,t,i){var l=d(e("./profile")),s=d(e("./search"));function d(e){return e&&e.__esModule?e:{default:e}}document.addEventListener("DOMContentLoaded",()=>{l.default.init(),s.default.init()})},{"./profile":3,"./search":4}],2:[function(e,t,d){!function(i){!function(){Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var h=e("undefined"!=typeof window?window._:void 0!==i?i._:null),s=e("undefined"!=typeof window?window.jQuery:void 0!==i?i.jQuery:null),$="undefined"!=typeof window?window.peepso:void 0!==i?i.peepso:null,b="undefined"!=typeof window?window.peepsodata:void 0!==i?i.peepsodata:null;function e(e){return e&&e.__esModule?e:{default:e}}let l=b.sections&&b.sections.profile&&b.sections.profile.textSaveAllErrorNotice;class t{constructor(e){this.$container=(0,s.default)(e),this.$btnEditAll=this.$container.find(".ps-js-btn-edit-all"),this.$btnSaveAll=this.$container.find(".ps-js-btn-save-all").hide(),this.$fields=this.$container.find(".ps-js-profile-item").filter(function(){return!(0,s.default)(this).find(".ps-js-profile-separator").length}),this.$fields.length||this.$btnEditAll.hide(),this.$fields.each((e,t)=>
1this.fieldInit(t)),this.fieldChanged=[],this.fieldChangedHandler=e=>!!this.fieldChanged.length||e,$.observer.addFilter("beforeunload",this.fieldChangedHandler,10,1),this.$btnEditAll.on("click",()=>this.fieldsEditAll()),this.$btnSaveAll.on("click",()=>this.fieldsSaveAll())}fieldInit(e){(0,s.default)(e).on("click",".ps-js-btn-edit",()=>this.fieldEdit(e)).on("click",".ps-js-btn-cancel",()=>this.fieldEditCancel(e)).on("click",".ps-js-btn-save",()=>this.fieldEditSave(e))}fieldGetData(e){let t=(0,s.default)(e).closest(".ps-js-profile-item"),i;var l;return t.length&&!(i=t.data()).$field&&(l=(e=t.find(".ps-list-info-content-form")).find("input[type=text],input[type=checkbox],input[type=radio],textarea,select"),i={$field:t,$label:t.find(".ps-list-info-content-text"),$form:t.find(".ps-list-info-content-form"),$error:t.find(".ps-list-info-content-error"),$validation:t.find(".ps-js-validation"),$inputs:l,$btnEdit:t.find(".ps-js-btn-edit"),$btnCancel:e.find(".ps-js-btn-cancel"),$btnSave:e.find(".ps-js-btn-save"),id:l.data("id"),type:this.fieldGetType(l),value:this.fieldGetValue(l)},t.data(i)),i}fieldGetType(e){let t=e.eq(0),i=t.prop("tagName").toLowerCase(),l=t.attr("type")||"";return-1<["select","textarea"].indexOf(i)?l=i:"text"===l&&t.hasClass("datepicker")&&(l="datepicker"),l}fieldGetValue(e){let t=this.fieldGetType(e),i,l;return i="checkbox"===t?(i=e.filter(":checked").map((e,t)=>t.value),JSON.stringify([...i])):"radio"===t?e.filter(":checked").val():"datepicker"===t?(l=e.val(),{value:i=e.data("value"),formatted:l}):"text"===t?e.val().trim():e.val()}fieldSetValue(e,i){var t=this.fieldGetType(e);"checkbox"===t?(i=JSON.parse(i),e.each((e,t)=>{t.checked=-1<i.indexOf(t.value)})):"radio"===t?e.each((e,t)=>{t.checked=t.value===i}):"datepicker"===t?(e.val(i.formatted),e.data("value",i.value)):e.val(i)}fieldEdit(e,t=!1){let i=this.fieldGetData(e),{$label:l,$form:s,$error:d,$validation:n,$inputs:a,id:o,type:r}=i,f=("text"===r&&a.off("keydown").on("keydown",e=>{13===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.fieldEditSave(e.target))}),()=>{});if(-1<["text","textarea"].indexOf(r)){let t=a.next(".ps-js-counter");t.length&&(t.show(),(f=h.default.throttle(e=>t.html(e),500))(a.val().length))}a.off("input.ps-field").on("input.ps-field",e=>{-1===this.fieldChanged.indexOf(o)&&this.fieldChanged.push(o),f(e.target.value.length)}),l.hide(),s.show(),d.hide(),n.addClass("ps-alert--neutral").removeClass("ps-alert--abort"),t||-1===["checkbox","radio"].indexOf(r)&&a.focus()}fieldEditCancel(e){var{$label:e,$form:t,$error:i,$inputs:l,id:s,value:d}=this.fieldGetData(e),l=(this.fieldSetValue(l,d),e.show(),t.hide(),i.hide(),this.fieldChanged.indexOf(s));-1<l&&this.fieldChanged.splice(l,1)}fieldEditSave(e){let d=this.fieldGetData(e),{$field:n,$label:l,$form:a,$error:o,$inputs:s,$btnCancel:r,$btnSave:f,id:h,type:u}=d,p=f.find("img"),c=this.fieldGetValue(s),v=(s.attr("disabled","disabled"),f.add(r).attr("disabled","disabled"),p.show(),"datepicker"===u&&(c=c.value),c=$.observer.applyFilters("profile_field_save",c,s),e=>{var t=e.display_value,i=l.find(".ps-list-info-content-data"),t=(d.value=c,void 0!==t?(t=$.observer.applyFilters("peepso_parse_content",t),i.html(t)):"select"===u?i.html(s.find("option:selected").text()):i.html(s.val()),l.show(),a.hide(),o.hide(),n.addClass("ps-list-info-success"),setTimeout(()=>n.removeClass("ps-list-info-success"),1e3),$.observer.doAction("profile_field_updated",d,e),$.hooks.doAction("profile_completeness_updated",b.userid,e),this.fieldChanged.indexOf(h));-1<t&&this.fieldChanged.splice(t,1)});return new $.Promise((e,t)=>{let i=!1;$.modules.user.updateField(b.userid,h,c).then(v).catch(e=>{(e=>{let t=d.$validation,i=[];if(t.addClass("ps-alert--neutral").removeClass("ps-alert--abort"),e)for(var l in e){var s=a.find(".ps-js-validation-"+l);s.length?s.addClass("ps-alert--abort").removeClass("ps-alert--neutral"):i.push(e[l])}i.length?(i=i.join("<br>"),o.html(i).show()):o.hide(),n.addClass("ps-list-info-error"),setTimeout(()=>n.removeClass("ps-list-info-error"),1e3)})(e),i=!0}).then(()=>{s.removeAttr("disabled"),f.add(r).removeAttr("disabled"),p.hide(),i?t(n[0]):e()})})}fieldsEditAll(){this.$btnEditAll.hide(),this.$btnSaveAll.show(),this.$fields.each((e,t)=>{this.fieldEdit(t,"nofocus")})}fieldsSaveAll(){this.$btnSaveAll.attr("disabled","disabled");let i=[];this.$fields.each((e,t)=>{i.push(this.fieldEditSave(t))}),$.Promise.all(i.map(e=>e.catch(e=>e))).then(e=>{var t,e=e.filter(e=>e);this.$btnSaveAll.removeAttr("disabled"),e.length?(e=(0,s.default)(e[0]).offset().top-window.innerHeight/2,t=h.default.debounce(()=>alert(l),200),(0,s.default)("html, body").animate({scrollTop:e},1e3,t)):(this.$btnSaveAll.hide(),this.$btnEditAll.show())})}}d.default={init(){var e=document.querySelectorAll('[data-ps-section="profile/about"]');
1e.length&&[...e].forEach(e=>new t(e))}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(e,t,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var l=(e=e("./about"))&&e.__esModule?e:{default:e};i.default={init:function(){l.default.init()}}},{"./about":2}],4:[function(e,t,f){!function(r){!function(){Object.defineProperty(f,"__esModule",{value:!0}),f.default=void 0;var a=(t="undefined"!=typeof window?window.jQuery:void 0!==r?r.jQuery:null)&&t.__esModule?t:{default:t},e="undefined"!=typeof window?window._:void 0!==r?r._:null,l="undefined"!=typeof window?window.peepso:void 0!==r?r.peepso:null,t="undefined"!=typeof window?window.peepsodata:void 0!==r?r.peepsodata:null;var i=t.sections.search||{};let s=t.rest_url,o=+i.show_empty_sections,d=0;class n{constructor(e){this.uniqueId=++d,this.$container=(0,a.default)(e),this.$query=this.$container.find("input.ps-js-query"),this.$loading=this.$container.find(".ps-js-loading").hide(),this.$box=this.$container.find(".ps-js-box").hide(),this.$results=this.$container.find(".ps-js-result").hide(),this.tplSection=(0,l.template)(this.$container.find(".ps-js-template-section").text().trim()),this.tplItems=(0,l.template)(this.$container.find(".ps-js-template-items").text().trim()),this.tplEmpty=(0,l.template)(this.$container.find(".ps-js-template-empty").text().trim()),this.$query.on("input",e=>{this.$query.val().trim()?(this.$box.hide(),this.$results.hide(),this.$loading.show(),this.searchWithDelay()):(this.$box.hide(),this.$results.hide(),this.$loading.hide())}),this.$query.val().trim()&&this.$query.triggerHandler("input")}search(){var e=this.$query.val().trim(),t=s+"search",i=t+"_"+this.uniqueId;e?l.modules.request.get(i,t,{query:e}).then(e=>{this.render(e),this.$loading.hide(),this.$box.show(),this.$results.show()}).catch(()=>{this.$loading.hide()}):(this.$loading.hide(),this.$box.hide(),this.$results.hide())}searchWithDelay(){this.searchWithDelay=(0,e.debounce)(this.search,1e3),this.searchWithDelay()}render(e){let t=e.results,i=e.meta.sections,l=!!o,s="";if(t)for(var d in t){var n=a.default.extend({},i[d],{type:d});t.hasOwnProperty(d)&&t[d].length?(n.html=this.tplItems({results:t[d],type:d}),l=!0):n.html=this.tplEmpty(),s+=this.tplSection(n)}l||(s=this.tplEmpty()),this.$results.html(s)}}f.default={init:function(){(0,a.default)(".ps-js-section-search").each(function(){new n(this)})}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);

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.