PageSourceSearch

https://app.funforms.com/chunk-TERFCLDJ.js

js funforms.com collected 2026-09-25 14:23:16 UTC 7,229 bytes, 2 lines download raw bytes

1import{c as X}from"./chunk-O653VLXQ.js";import"./chunk-COO5MJ7H.js";import{a as K}from"./chunk-FXPIADUL.js";import{b as H}from"./chunk-ZI3WPPR4.js";import{a as J}from"./chunk-6AENUKSN.js";import"./chunk-JWM7Y6EN.js";import"./chunk-IR7WLSLL.js";import{c as W,e as z}from"./chunk-SLELAYVQ.js";import"./chunk-P3QQOW6J.js";import"./chunk-FCGT5QOQ.js";import"./chunk-EHTCWYEV.js";import"./chunk-PZDGU76M.js";import{d as v,f as L,h as N,k as G,o as U,p as O}from"./chunk-IAGBHLIO.js";import{a as S}from"./chunk-J4BQZTAP.js";import"./chunk-RX4SFIR7.js";import{a as B}from"./chunk-CAQTW5HZ.js";import"./chunk-R7MHRZZF.js";import{a as j}from"./chunk-TQXKOZHM.js";import"./chunk-XUQHO62V.js";import"./chunk-XNCE5XQE.js";import"./chunk-Y3UL24R4.js";import"./chunk-KDVL22EY.js";import"./chunk-OEOOLALO.js";import"./chunk-O4GQHPXB.js";import{d as $}from"./chunk-SAMU6LRI.js";import"./chunk-FBILCCFV.js";import{$b as I,Ab as q,Fb as w,Gb as F,Hb as A,Jb as D,Kb as P,Nb as r,Ob as o,Pb as p,Tb as V,Zb as m,_b as y,a as k,ac as M,b as E,fc as d,hc as b,i as g,mb as a,mc as C,nc as Q,oa as u,pb as R,qa as h,sb as T,va as _,wa as x,yb as s}from"./chunk-3J5ILERG.js";var ee=()=>({required:"Search Term is required"}),te=["*"],Y=(()=>{class i{constructor(){this.fb=u(U),this.working=!1,this.scrapeChange=new T,this.countries=[{label:"United States",id:"us"},{label:"United Kingdom",id:"uk"},{label:"Australia",id:"au"},{label:"Canada",id:"ca"},{label:"China",id:"cn"},{label:"France",id:"fr"},{label:"Germany",id:"de"},{label:"India",id:"in"},{label:"Italy",id:"it"},{label:"Mexico",id:"mx"},{label:"Russia",id:"ru"}],this.documents=[{label:"None",id:"none"},{label:"PDF (.pdf)",id:"pdf"},{label:"Word Doc (.doc)",id:"doc"}]}ngOnInit(){this.rf=this.fb.group({query:["",v.required],document:["pdf",v.required],country:["us",v.required]})}onSubmit(){if(this.rf.valid&&this.rf.dirty){let{query:t,document:n,country:e}=this.rf.value,l={query:`${t}${n==="none"?"":` filetype:${n}`}`,country:e};this.scrapeChange.emit(l)}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=h({type:i,selectors:[["fun-admin-scraping-query"]],inputs:{currentPage:"currentPage",hasResults:"hasResults",working:"working"},outputs:{scrapeChange:"scrapeChange"},standalone:!0,features:[C],ngContentSelectors:te,decls:13,vars:19,consts:[[3,"formGroup","ngSubmit"],["position","top"],["type","text","name","query","label","Search Term","description","i.e. Massage Consultation Form","control","query",1,"block","mb-2",3,"readonly"],["control","query",3,"errors"],[3,"label","description"],["control","document","optionLabel","label",3,"options","disabled","optionValue","placeholder"],["position","bottom"],["control","country","optionLabel","label",3,"options","disabled","optionValue","placeholder"],[1,"mt-4","flex","items-center"],["size","small","type","submit","color","brand",3,"text","icon","disabled"]],template:function(n,e){n&1&&(I(),r(0,"form",0),m("ngSubmit",function(){return e.onSubmit()}),r(1,"fun-block",1)(2,"fun-input",2),p(3,"fun-field-errors",3),o()(),r(4,"fun-block"),p(5,"fun-field-label",4)(6,"fun-select",5),o(),r(7,"fun-block",6),p(8,"fun-field-label",4)(9,"fun-select",7),o(),r(10,"div",8),p(11,"fun-button",9),M(12),o()()),n&2&&(s("formGroup",e.rf),a(2),s("readonly",e.hasResults),a(),s("errors",Q(18,ee)),a(2),s("label","Document Type")("description","Which document type should be included in the query?"),a(),s("options",e.documents)("disabled",e.hasResults)("optionValue","id")("placeholder","Select Document..."),a(2),s("label","Country")("description","Where should this query execute?"),a(),s("options",e.countries)("disabled",e.hasResults)("optionValue","id")("placeholder","Select Country..."),a(2),s("text",e.working?"Hold on...":e.currentPage===0?"Run Query":"More Results")("icon",e.working?"working-white":"load")("disabled",e.rf.invalid||e.rf.pristine||e.working))},dependencies:[O,N,L,G,S,J,z,W,K,H],encapsulation:2,changeDetection:0})}}return i})();function ne(i,f){if(i&1){let t=V();r(0,"fun-button",2),m("triggered",function(){_(t);let e=y();return x(e.doQueryReset())}),o(),r(1,"fun-button",3),m("triggered",function(){_(t);let e=y();return x(e.doExportCsv())}),o()}}function ie(i,f){if(i&1&&(r(0,"div",9)(1,"div",10),d(2),o(),r(3,"div",10),d(4),o(),r(5,"div",10),d(6),o()()),i&2){let t=f.$implicit,n=f.$index;q("bg-gray-50",n%2===0),a(2),b(" ",t.title," "),a(2),b(" ",t.domain," "),a(2),b(" ",t.link," ")}}function re(i,f){if(i&1&&(r(0,"div",4)(1,"p",5),d(2,"Results"),o(),r(3,"div",6)(4,"div",7)(5,"div",8),d(6,"Title"),o(),r(7,"div",8),d(8,"Domain"),o(),r(9,"div",8),d(10,"Link"),o()(),D(11,ie,7,5,"div",11,A),o()()),i&2){let t=y();a(11),P(t.results)}}var Ee=(()=>{class i{constructor(){this.cd=u(R),this.adminService=u(X),this.confirm=u(B),this.notification=u(j),this.working=!1,this.results=[],this.queryText="",this.currentPage=0}get hasResults(){return this.results.length>0}arrayToCsv(t){let n=["Title","Domain","Link"],e=t.map(l=>[l.title.replace(/"/g,'""'),l.domain.replace(/"/g,'""'),l.link.replace(/"/g,'""')].map(c=>`"${c}"`).join(","));return[n.join(","),...e].join(`\r
2`)}downloadBlob(t,n){let e=new Blob([t],{type:"text/csv;charset=utf-8;"}),l=URL.createObjectURL(e),c=document.createElement("a");c.href=l,c.setAttribute("download",n),c.click()}doQueryReset(){this.currentPage=0,this.queryText="",this.results=[],this.cd.detectChanges()}doExportCsv(){return g(this,null,function*(){try{yield this.confirm.ask({message:"Export CSV? Query data will be destroyed.",cancelText:"No",confirmText:"Export"},()=>g(this,null,function*(){let t=this.arrayToCsv(this.results.reverse());this.downloadBlob(t,`${this.queryText}-Export.csv`),this.doQueryReset()}))}catch(t){$(t)||this.notification.show("error","Something went wrong")}})}doScrape(t){return g(this,null,function*(){try{this.working=!0;let n=E(k({},t),{page:this.currentPage}),{results:e}=yield this.adminService.getScrapeResults(n);this.currentPage=this.currentPage+1,this.queryText=t.query.replace(/filetype:[^\s]+/,""),this.results=[...e,...this.results]}catch(n){this.notification.show("error",n.message)}finally{this.working=!1,this.cd.detectChanges()}})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=h({type:i,selectors:[["fun-admin-scraping"]],standalone:!0,features:[C],decls:3,vars:5,consts:[[3,"currentPage","hasResults","working","scrapeChange"],["class","mt-4"],["text","Reset","type","button","color","danger",1,"ml-2",3,"triggered"],["text","Export CSV","type","button","color","gray",1,"ml-2",3,"triggered"],[1,"mt-4"],[1,"text-md","p-2","font-semibold"],[1,"border-t","border-t-gray-100","rounded-lg","w-full"],[1,"text-md","flex","items-center"],[1,"font-semibold","w-1/3","p-1","truncate"],[1,"text-xs","flex","items-center"],[1,"w-1/3","p-1","truncate"],["class","text-xs flex items-center",3,"bg-gray-50"]],template:function(n,e){n&1&&(r(0,"fun-admin-scraping-query",0),m("scrapeChange",function(c){return e.doScrape(c)}),w(1,ne,2,0),o(),w(2,re,13,0,"div",1)),n&2&&(s("currentPage",e.currentPage)("hasResults",e.hasResults)("working",e.working),a(),F(1,e.hasResults?1:-1),a(),F(2,e.hasResults?2:-1))},dependencies:[S,Y],encapsulation:2})}}return i})();export{Ee as FunAdminScrapingComponent};

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.