1"use strict";(self.webpackChunktinggly_web=self.webpackChunktinggly_web||[]).push([[2056],{2056:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var n=r(9726),o={key:0,class:"alert text-danger d-flex align-items-center fs-xs ls-xs mt-3 gap-1 px-0 py-1 text-center text-md-start",role:"alert"},s=["innerHTML"];var a=r(7536),c=r(9607),l=r(5298);const d={props:{value:{type:String,default:""},redeemText:{type:String,default:"Redeem"},unexpectedErrorText:{type:String,default:"An unexpected error occurred. Please try again later."}},data:function(){return{loading:"",code:"",error:"",success:""}},methods:{submit:function(){var e=this;this.loading=!0,this.success="",this.error="",(0,l.A)("redeem_gift"),a.A.post(this.route("redeem.apply"),{code:this.code}).then((function(t){e.loading=!1,e.success="Success",e.error="","gift_card"===t.data.type?window.location.href=e.route("profile.exchanged")+"?voucher_id="+t.data.id:window.location.href=e.route("book",t.data.code||e.code)})).catch((function(t){e.success="",e.loading=!1,e.error=t&&t.response&&t.response.data.message?t.response.data.message:e.unexpectedErrorText,404!==t.response.status&&403!==t.response.status&&(0,c.A)(t)}))}},mounted:function(){this.value&&(this.code=this.value)}};const i=(0,r(6262).A)(d,[["render",function(e,t,r,a,c,l){return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createElementVNode)("form",{class:"d-flex flex-column flex-sm-row flex-wrap flex-md-nowrap gap-3 justify-content-center align-items-center",onSubmit:t[1]||(t[1]=(0,n.withModifiers)((function(){return l.submit&&l.submit.apply(l,arguments)}),["prevent"]))},[(0,n.withDirectives)((0,n.createElementVNode)("input",{class:"form-control form-control-xl text-center text-md-start","onUpdate:modelValue":t[0]||(t[0]=function(e){return c.code=e}),placeholder:"Enter voucher code",required:""},null,512),[[n.vModelText,c.code]]),(0,n.createElementVNode)("button",{type:"submit",class:(0,n.normalizeClass)(["btn btn-xl btn-secondary btn-redeem",{disabled:c.loading}])},(0,n.toDisplayString)(r.redeemText),3)],32),c.error?((0,n.openBlock)(),(0,n.createElementBlock)("div",o,[t[2]||(t[2]=(0,n.createElementVNode)("img",{src:"/images/icons/alert-danger.svg",alt:"Warning"},null,-1)),(0,n.createElementVNode)("span",{innerHTML:c.error},null,8,s)])):(0,n.createCommentVNode)("",!0)],64)}]])}}]);
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.