PageSourceSearch

https://app.pawsitivefoster.com/assets/plea-Cgn7VUmQ.js

js pawsitivefoster.com collected 2026-10-02 01:42:21 UTC 2,329 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B0wWhsKS.js","assets/index-DT3kekOa.css"])))=>i.map(i=>d[i]);
2import{q as t,bj as a,b as n,bk as e,bl as l,_ as i,a as r}from"./index-B0wWhsKS.js";function s(t){const a={...t};if(!a.animal_id){const n=new Date,e=n.getFullYear().toString().slice(-2),l=(n.getMonth()+1).toString().padStart(2,"0"),i=t.id.toString().padStart(4,"0");a.animal_id="PAWS-".concat(e).concat(l,"-").concat(i)}return a}const{apiBaseUrl:o}=n,c=async(t,a="GET",n)=>{const{getResilientAuthToken:e}=await i(async()=>{const{getResilientAuthToken:t}=await import("./index-B0wWhsKS.js").then(t=>t.fi);return{getResilientAuthToken:t}},__vite__mapDeps([0,1])),l=await e(),s={url:t,method:a,headers:l?{Authorization:"Bearer ".concat(l)}:{},...n&&{data:n}};return(await r(s)).data},d={getPlea:async(t,a=!0)=>{const n="".concat(o,"/plea/").concat(t).concat(a?"?include=animals":""),e=await c(n);return e.animals&&(e.animals=e.animals.map(s)),e},createPlea:async(a,n,e="High",l)=>{const i="".concat(o,"/plea"),r=Array.isArray(a)?a.filter(
2Boolean):a?[a]:[],s=Array.from(new Set(r.map(t=>String(t)))),d={message:n,urgency_level:e,sent_date:(new Date).toISOString(),status:"draft",is_urgent:"Immediate"===e,organization_id:null!=l?l:null};s.length>1?d.animal_ids=s:1===s.length&&(d.animal_id=s[0]);const u=await c(i,"POST",d);return t("plea_created",{plea_id:(null==u?void 0:u.id)||null,animal_count:s.length,urgency_level:e,organization_id:null!=l?l:null}),u},updatePlea:async(t,a)=>{const n="".concat(o,"/plea");return c(n,"PATCH",{id:t,...a})},sendPlea:async(n,i={})=>{var r,s,d,u,g;const _="".concat(o,"/plea/").concat(n,"/send"),m={},f=i.fosterIds&&i.fosterIds.length>0?"targeted":i.filter||"all";let p;i.fosterIds&&i.fosterIds.length>0&&(m.fosterIds=i.fosterIds),m.filter=f,a(n);try{p=await c(_,"POST",m)}catch(y){throw e(n),y}const h=null!=(u=null!=(d=null!=(s=null==p?void 0:p.totalFosters)?s:null==(r=null==p?void 0:p.plea)?void 0:r.total_foster_count)?d:null==p?void 0:p.sentCount)?u:0;return l(n,h,null!=(g=null==p?void 0:p.batchId)?g:null),t("plea_sent",{plea_id:n,recipient_count:h,filter:f}),p},generateDraftMessage:async a=>{const n="".concat(o,"/plea/draft-message"),e=await c(n,"POST",{animal_ids:a});return t("plea_draft_generated",{animal_count:a.length}),e}};export{d as default};

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.