PageSourceSearch

https://flixier.com/_next/static/chunks/8250.7d906831922ecb95.js

js flixier.com collected 2026-10-02 04:29:27 UTC 6,040 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8250],{78250:function(e,t,r){r.r(t),r.d(t,{default:function(){return p}});var a=r(85893),o=r(67294),l=r(14640),n=r(66393),i=r(99603),s=r(60270);let u={progress:0,error:null,result:null,isRunning:!1,speedFactor:null};var c=r(21170),d=r(12124);function m(e){return!isFinite(e)||e<=0?"0:00":"".concat(Math.floor(e/60),":").concat(Math.floor(e%60).toString().padStart(2,"0"))}function p(){let{onIdleChange:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,l.useTranslations)(),[p,f]=(0,o.useState)(!0),[_,g]=(0,o.useState)(null),[h,b]=(0,o.useState)(0),{progress:x,error:w,result:v,isRunning:j,speedFactor:R,make:k,reset:y,cancel:S}=function(){let e=(0,l.useTranslations)(),[t,a]=(0,o.useState)(u),n=(0,o.useRef)(null),i=(0,o.useRef)((0,s.kg)()),c=(0,o.useCallback)(async()=>{n.current&&(URL.revokeObjectURL(n.current),n.current=null),await (0,s.pQ)(i.current),a(u)},[]);(0,o.useEffect)(()=>()=>{n.current&&URL.revokeObjectURL(n.current),(0,s.pQ)(i.current).catch(()=>{})},[]);let d=(0,o.useCallback)(async t=>{n.current&&(URL.revokeObjectURL(n.current),n.current=null),await (0,s.pQ)(i.current),a({...u,isRunning:!0});let o=performance.now(),{Input:l,Output:c,BlobSource:d,BufferTarget:m,Mp4OutputFormat:p,ALL_FORMATS:f,VideoSampleSource:_,VideoSampleSink:g,getFirstEncodableVideoCodec:h}=await Promise.all([r.e(2803),r.e(7744),r.e(8501)]).then(r.bind(r,7744));try{let r=new l({source:new d(t),formats:f});i.current.input=r;let[u,b]=await Promise.all([r.computeDuration(),r.getPrimaryVideoTrack()]);if(!b)throw Error(e("media_tools_boomerang_error_no_video"));let[x,w]=await Promise.all([b.getDisplayWidth(),b.getDisplayHeight()]),v=new p,j=v.getSupp
1ortedVideoCodecs(),R=(0,s.UO)().filter(e=>j.includes(e)),k=await h(R,{width:x,height:w,bitrate:5e6})||"avc",y=new c({format:v,target:new m});i.current.output=y;let S=new _({codec:k,bitrate:5e6});y.addVideoTrack(S),await y.start();let z=new g(b),L=2*u,N=0;for await(let e of z.samples())await S.add(e),N+=e.duration,a(e=>({...e,progress:Math.min(.49,N/L)})),e.close();let E=Math.max(1,Math.ceil(u/5));for(let e=E-1;e>=0;e--){let t=5*e,r=Math.min(u,(e+1)*5),o=[];for await(let e of z.samples(t,r))o.push(e);for(let e=o.length-1;e>=0;e--){let t=o[e],r=2*u-t.timestamp-t.duration;t.setTimestamp(r<u?u:r),await S.add(t),N+=t.duration,a(e=>({...e,progress:Math.min(.99,N/L)})),t.close()}}await y.finalize();let C=y.target.buffer;if(!C)throw Error(e("media_tools_boomerang_error_no_output"));let U=new Blob([C],{type:y.format.mimeType}),F=URL.createObjectURL(U);n.current=F,i.current.input=null,i.current.output=null,i.current.conversion=null,a({progress:1,error:null,isRunning:!1,speedFactor:null,result:{blob:U,url:F,originalSize:t.size,outputSize:U.size,durationMs:performance.now()-o,width:x,height:w,outputDurationSec:L}})}catch(t){if(await (0,s.pQ)(i.current),(0,s.jT)(t)){a(u);return}a({progress:0,error:t instanceof Error?t.message:e("media_tools_boomerang_error_failed"),result:null,isRunning:!1,speedFactor:null})}},[e]),m=(0,o.useCallback)(async()=>{await (0,s.pQ)(i.current)},[]);return{...t,make:d,reset:c,cancel:m}}(),{isUploading:z,uploadProgress:L,error:N,editInFlixier:E}=(0,s.Z5)(),C=(0,o.useRef)(null),U=(0,o.useRef)(null),F=(0,o.useRef)(null),M=(0,d.T)(C,U,F,!!(_&&!v&&!j&&!z));(0,o.useEffect)(()=>{f((0,s.Fs)())},[]),(0,o.useEffect)(()=>{if(!_){b(0);return}(0,s.aH)(_).then(b)},[_]);let T=p&&!_&&!v&&!j&&!z;(0,o.useEffect)(()=>{null==e||e(T)},[T,e]);let P=(0,s.Rl)(null==_?void 0:_.name,"boomerang","mp4");if(!p)return(0,a.jsx)(s.BW,{});if(j||z)return(0,a.jsx)(s.fz,{title:z?t("media_tools_sending_to_flixier"):t("media_tools_boomerang_processing"),subtitle:z?t("media_tools_almost_there"):t("media_tools_your_file_never_leaves"),progress:j?x:null!==L?L/100:null,speedFactor:j?R:null,onCancel:j?S:void 0});if(v)return(0,a.jsx)(s.e7,{tool:"boomerang",doneLabel:t("media_tools_boomerang_done"),preview:(0,a.jsx)("video",{controls:!0,src:v.url,className:"mx-auto max-h-[55vh] w-full rounded-lg bg-black object-contain sm:max-h-[60vh]"}),stats:[{label:t("media_tools_original_size"),value:(0,s.td)(v.originalSize)},{label:t("media_tools_boomerang_output_size"),value:(0,s.td)(v.outputSize),highlight:!0},{label:t("media_tools_duration"),value:m(v.outputDurationSec)}],downloadUrl:v.url,downloadName:P,downloadLabel:t("media_tools_boomerang_download"),onReset:()=>{y(),g(null)},onEditInFlixier:()=>E(v.blob,P),uploadError:N,resetLabel:t("media_tools_boomerang_another")});if(_){let e=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"h-[45px] w-full";return(0,a.jsx)(c.ZP,{variant:c.L$.Primary,value:t("media_tools_boomerang_action"),onClick:()=>k(_),tabIndex:e?void 0:-1,className:r})};return(0,a.jsxs)("div",{ref:C,className:"relative mx-auto w-full max-w-[820px] rounded-2xl bg-white p-6 shadow-xl",children:[(0,a.jsx)(s.Lz,{file:_,expectedSize:_.size,expectedSavings:null,onClear:()=>g(null),expectedLabel:t("media_tools_boomerang_new_duration"),expectedValue:m(2*h)}),w&&(0,a.jsx)("div",{className:"mt-3 text-sm text-error",children:w}),(0,a.jsxs)("div",{className:"mt-6 flex items-center justify-center gap-3 rounded-xl bg-light-gray-bg p-6 text-sm text-gray-600",children:[(0,a.jsx)(i.G,{icon:n.go9,className:"text-primary",size:"lg"}),t("media_tools_boomerang_hint")]}),h>15&&(0,a.jsxs)("div",{className:"mt-3 flex items-start gap-2 rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-800",children:[(0,a.jsx)(i.G,{icon:n.ik8,className:"mt-0.5 shrink-0"}),(0,a.jsx)("span",{children:t("media_tools_boomerang_warning")})]}),(0,a.jsx)("div",{className:"hidden sm:mt-6 sm:flex sm:justify-end sm:pt-6",children:e(!0,"h-[45px] sm:w-auto sm:px-10")}),(0,a.jsx)("div",{ref:U,"aria-hidden":M||void 0,className:"pt-6 sm:hidden ".concat(M?"invisible":""),children:e(!M)}),(0,a.jsx)(s.CG,{fixedRef:F,active:M,maxWidthClassName:"max-w-[820px]",children:e(M)})]})}return(0,a.jsx)(s.rE,{accept:s.D7,onFile:g,acceptPredicate:e=>e.type.startsWith("video/")})}}}]);

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.