PageSourceSearch

https://web.roapp.io/static/dist/js/7297.e9d16a1e55f9d09f6248.js

js roapp.io collected 2026-09-24 12:52:45 UTC 7,299 bytes, 3 lines download raw bytes

1(self.webpackChunkorderry=self.webpackChunkorderry||[]).push([[7297,22549,44930,67311,89692],{23936:function(W,x,t){"use strict";t.r(x),t.d(x,{default:function(){return ae}});var r=t(74848),c=t(96540),w=t(1575),A=t(92630),g=t(70881),F=t(49785),L=t(62770),D=t(13965),j=t(25716),E=t(89315),e=t(99589),n=t(14854),f=t(22832),i=t(93647),y=t(23824),z=t(99813),R=t(94119),C=t(14756),l=t(57167),I=t(35102),T=t(54350),o=t(19619),a=t(76835),p=t(13935),H=t(9114),V=t(3075),Z=t(23356),$=t(69944);const J=()=>{const u=(0,$.e)();return(0,c.useMemo)(()=>u.map(({name:h,description:v})=>({value:`{${h}}`,label:h,contentProps:{tooltip:v}})),[])};function k(u){const{onSelect:h}=u,{t:v}=(0,L.Bd)(),m=J(),M=S=>{S.value&&h(S.value)};return(0,r.jsx)(V.A,{data:m,withSearch:!1,contentWidth:240,onChange:M,button:(0,r.jsx)(Z.A,{type:"link",noCaretBorder:!0}),title:v("Variables")})}var q=(0,c.memo)(k);const d={TITLE:"title",MESSAGE:"message"},B=1e3;var _="QwF1N";function ee(){const{t:u}=(0,L.Bd)(),{formState:{errors:h},watch:v,setValue:m}=(0,F.xW)(),M=v(d.MESSAGE),S=(0,c.useCallback)(s=>{m(d.MESSAGE,s)},[m]),{insert:G,setCursor:O}=(0,H.e)({value:M,onChange:S}),U=(0,c.useCallback)(s=>{O(s.target.selectionStart)},[O]);return(0,r.jsxs)("div",{className:_,children:[(0,r.jsx)(j.A,{name:d.MESSAGE,errors:h,labelProps:{label:u("Message"),htmlFor:d.MESSAGE,postContent:(0,r.jsx)(p.A,{value:M.trim().length,max:B,color:M.trim().length>B?"red_100":"grey_50"}),isSpaceBetween:!0,isRequired:!0},withoutBottomMargin:!0,children:(0,r.jsx)(a.A,{id:d.MESSAGE,name:d.MESSAGE,onBlur:U})}),(0,r.jsx)(q,{onSelect:G})]})}var te=(0,c.memo)(ee);const Y=u=>({[d.TITLE]:(u==null?void 0:u.title)||"",[d.MESSAGE]:(u==null?void 0:u.message)||""});function ne(u){const{id:h,onSubmit:v}=u,{t:m}=(0,L.Bd)(),M=(0,o.wA)(),{closeModal:S}=(0,E.k3)(),{formState:{errors:G},reset:O,handleSubmit:U}=(0,F.xW)(),{data:s,isFetching:ie}=(0,l.fg)({params:{templateId:h}},{skip:!h}),le=(0,I.f)({isObjectRef:!0}),[de,{error:ue,isLoading:ce}]=(0,l.Ac)(),[fe,{error:ve,isLoading:me}]=(0,l.pK)(),[he,{error:pe,isLoading:ge}]=(0,l.pH)();(0,T.B)(ue),(0,T.B)(ve),(0,T.B)(pe);const X=ce||me||ge,Ee=async()=>{if(s!=null&&s.id){try{await he({params:{templateId:s.id}}).unwrap()}catch{return}S()}},ye=U(async K=>{var Q;try{if(s!=null&&s.id){const P=await fe({params:{templateId:s.id},data:K}).unwrap();M(l.Ay.util.upsertQueryData("getMessageTemplate",{params:{templateId:s.id}},P)),v==null||v(P)}else{const P=await de({data:K}).unwrap();v==null||v(P),(Q=window.Intercom)==null||Q.call(window,"trackEvent","saved-reply-created")}}catch{return}S()});return(0,c.useEffect)(()=>{s&&O(Y(s))},[s]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f.A,{children:(0,r.jsx)(R.A,{title:(s==null?void 0:s.title)||m("New saved reply")})}),(0,r.jsxs)(e.A,{isShowSpinner:ie,children:[(0,r.jsx)(j.A,{name:d.TITLE,errors:G,labelProps:{label:m("Title"),isRequired:!0,htmlFor:d.TITLE},children:(0,r.jsx)(D.A,{ref:le,id:d.TITLE,name:d.TITLE})}),(0,r.jsx)(te,{})]}),(0,r.jsxs)(n.A,{children:[(0,r.jsx)(y.A,{children:(0,r.jsx)(C.A,{text:s!=null&&s.id?m("Save"):m("Create"),isLoading:X,onClick:ye})}),(s==null?void 0:s.id)&&(0,r.jsx)(z.A,{children:(0,r.jsx)(i.A,{dataCid:"deleteBtn",confirmProps:{title:m("Delete template?"),onConfirm:Ee},isLoading:X})})]})]})}var oe=(0,c.memo)(ne),b=t(12664),N=t(34338),re=b.Ik().shape({[d.TITLE]:b.Yj().trim().max(30,N.UU.maxSymbols(30)).required(N.UU.required),[d.MESSAGE]:b.Yj().trim().max(B,N.UU.maxSymbols(B)).required(N.UU.required)});function se(u){const{id:h,onSubmit:v,...m}=u,M=(0,c.useMemo)(()=>({defaultValues:Y(),resolver:(0,w.t)(re)}),[]);return(0,r.jsx)(A.Ay,{...m,formProps:M,size:g.MODAL_SIZE.SIZE_480,position:g.MODAL_POSITION.RIGHT,children:(0,r.jsx)(oe,{id:h,onSubmit:v})})}var ae=(0,c.memo)(se)},89692:function(W,x){var t,r,c;(function(w,A){if(1)r=[W,x],t=A,c=typeof t=="function"?t.apply(x,r):t,c!==void 0&&(W.exports=c);else var g})(this,function(w,A){"use strict";var g=typeof Map=="function"?new Map:function(){var e=[],n=[];return{has:function(i){return e.indexOf(i)>-1},get:function(i){return n[e.indexOf(i)]},set:function(i,y){e.indexOf(i)===-1&&(e.push(i),n.push(y))},delete:function(i){var y=e.indexOf(i);y>-1&&(e.splice(y,1),n.splice(y,1))}}}(),F=function(n){return new Event(n,{bubbles:!0})};try{new Event("test")}catch{F=function(f){var i=document.createEvent("Event");return i.initEvent(f,!0,!1),i}}function L(e){if(!e||!e.nodeName||e.nodeName!=="TEXTAREA"||g.has(e))return;var n=null,f=null,i=null;function y(){var o=window.getComputedStyle(e,null);o.resize==="vertical"?e.style.resize="none":o.resize==="both"&&(e.style.resize="horizontal"),o.boxSizing==="content-box"?n=-(parseFloat(o.paddingTop)+parseFloat(o.paddingBottom)):n=parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth),isNaN(n)&&(n=0),l()}function z(o){{var a=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=a}e.style.overflowY=o}function R(o){for(var a=[];o&&o.parentNode&&o.parentNode instanceof Element;)o.parentNode.scrollTop&&a.push({node:o.parentNode,scrollTop:o.parentNode.scrollTop}),o=o.parentNode;return a}function C(){if(e.scrollHeight!==0){var o=R(e),a=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",f=e.clientWidth,o.forEach(function(p){p.node.scrollTop=p.scrollTop}),a&&(document.documentElement.scrollTop=a)}}function l(){C();var o=Math.round(parseFloat(e.style.height)),a=window.getComputedStyle(e,null),p=a.boxSizing==="content-box"?Math.round(parseFloat(a.height)):e.offsetHeight;if(p<o?a.overflowY==="hidden"&&(z("scroll"),C(),p=a.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):a.overflowY!=="hidden"&&(z("hidden"),C(),p=a.boxSizing==="content-box"?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),i!==p){i=p;var H=F("autosize:resized");try{e.dispatchEvent(H)}catch{}}}var I=function(){e.clientWidth!==f&&l()},T=(function(o){window.removeEventListener("resize",I,!1),e.removeEventListener("input",l,!1),e.removeEventListener("keyup",l,!1),e.removeEventListener("autosize:destroy",T,!1),e.removeEventListener("autosize:update",l,!1),Object.keys(o).forEac
1h(function(a){e.style[a]=o[a]}),g.delete(e)}).bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",T,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",l,!1),window.addEventListener("resize",I,!1),e.addEventListener("input",l,!1),e.addEventListener("autosize:update",l,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",g.set(e,{destroy:T,update:l}),y()}function D(e){var n=g.get(e);n&&n.destroy()}function j(e){var n=g.get(e);n&&n.update()}var E=null;typeof window>"u"||typeof window.getComputedStyle!="function"?(E=function(n){return n},E.destroy=function(e){return e},E.update=function(e){return e}):(E=function(n,f){return n&&Array.prototype.forEach.call(n.length?n:[n],function(i){return L(i,f)}),n},E.destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],D),e},E.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],j),e}),A.default=E,w.exports=A.default})}}]);
2
3//# sourceMappingURL=7297.e9d16a1e55f9d09f6248.js.map

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.