<?php if (isset($component)) { $__componentOriginal0e4a5652a74a6d8a86f69fa9a638424b = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal0e4a5652a74a6d8a86f69fa9a638424b = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.application-tools-wrapper','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('application-tools-wrapper'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <?php if (isset($component)) { $__componentOriginal970725fcc3fb24751031cfb6fb5148ba = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal970725fcc3fb24751031cfb6fb5148ba = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.tool-wrapper','data' => ['tool' => $tool]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('tool-wrapper'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['tool' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($tool)]); ?>
        <?php if (isset($component)) { $__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.ad-slot','data' => ['advertisement' => get_advert_model('above-form')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('ad-slot'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['advertisement' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(get_advert_model('above-form'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805)): ?>
<?php $attributes = $__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805; ?>
<?php unset($__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805)): ?>
<?php $component = $__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805; ?>
<?php unset($__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805); ?>
<?php endif; ?>
        <?php if (isset($component)) { $__componentOriginalf9a5f060e1fbbcbc7beb643b113b10ab = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf9a5f060e1fbbcbc7beb643b113b10ab = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.form','data' => ['method' => 'post','route' => route('tool.handle', $tool->slug),'enctype' => 'multipart/form-data']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('form'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['method' => 'post','route' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('tool.handle', $tool->slug)),'enctype' => 'multipart/form-data']); ?>
            <div class="row">
                <div class="col-md-12 mt-3 mb-3">
                    <?php if (isset($component)) { $__componentOriginal134dbb3714f64bb542bee6f2789a8a22 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal134dbb3714f64bb542bee6f2789a8a22 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.upload-wrapper','data' => ['maxFiles' => $tool->no_file_tool ?? 1,'maxSize' => $tool->fs_tool ?? 1,'accept' => $extensions,'inputName' => 'images[]','fileTitle' => __('tools.dropImageHereTitle'),'fileLabel' => __('tools.convertToSVGDesc')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('upload-wrapper'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['max-files' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($tool->no_file_tool ?? 1),'max-size' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($tool->fs_tool ?? 1),'accept' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($extensions),'input-name' => 'images[]','file-title' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(__('tools.dropImageHereTitle')),'file-label' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(__('tools.convertToSVGDesc'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal134dbb3714f64bb542bee6f2789a8a22)): ?>
<?php $attributes = $__attributesOriginal134dbb3714f64bb542bee6f2789a8a22; ?>
<?php unset($__attributesOriginal134dbb3714f64bb542bee6f2789a8a22); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal134dbb3714f64bb542bee6f2789a8a22)): ?>
<?php $component = $__componentOriginal134dbb3714f64bb542bee6f2789a8a22; ?>
<?php unset($__componentOriginal134dbb3714f64bb542bee6f2789a8a22); ?>
<?php endif; ?>
                    <?php if (isset($component)) { $__componentOriginalf94ed9c5393ef72725d159fe01139746 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf94ed9c5393ef72725d159fe01139746 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.input-error','data' => ['messages' => $errors->get('file'),'class' => 'mt-2']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('input-error'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['messages' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($errors->get('file')),'class' => 'mt-2']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf94ed9c5393ef72725d159fe01139746)): ?>
<?php $attributes = $__attributesOriginalf94ed9c5393ef72725d159fe01139746; ?>
<?php unset($__attributesOriginalf94ed9c5393ef72725d159fe01139746); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf94ed9c5393ef72725d159fe01139746)): ?>
<?php $component = $__componentOriginalf94ed9c5393ef72725d159fe01139746; ?>
<?php unset($__componentOriginalf94ed9c5393ef72725d159fe01139746); ?>
<?php endif; ?>
                </div>
            </div>
            <?php if (isset($component)) { $__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.ad-slot','data' => ['advertisement' => get_advert_model('below-form')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('ad-slot'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['advertisement' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(get_advert_model('below-form'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805)): ?>
<?php $attributes = $__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805; ?>
<?php unset($__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805)): ?>
<?php $component = $__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805; ?>
<?php unset($__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805); ?>
<?php endif; ?>
            <div class="row">
                <div class="col-md-12 text-end">
                    <?php if (isset($component)) { $__componentOriginald0f1fd2689e4bb7060122a5b91fe8561 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.button','data' => ['type' => 'submit','class' => 'btn btn-outline-primary rounded-pill']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'submit','class' => 'btn btn-outline-primary rounded-pill']); ?>
                        <?php echo app('translator')->get('tools.convertToSvg'); ?>
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561)): ?>
<?php $attributes = $__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561; ?>
<?php unset($__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561); ?>
<?php endif; ?>
<?php if (isset($__componentOriginald0f1fd2689e4bb7060122a5b91fe8561)): ?>
<?php $component = $__componentOriginald0f1fd2689e4bb7060122a5b91fe8561; ?>
<?php unset($__componentOriginald0f1fd2689e4bb7060122a5b91fe8561); ?>
<?php endif; ?>
                </div>
            </div>
         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf9a5f060e1fbbcbc7beb643b113b10ab)): ?>
<?php $attributes = $__attributesOriginalf9a5f060e1fbbcbc7beb643b113b10ab; ?>
<?php unset($__attributesOriginalf9a5f060e1fbbcbc7beb643b113b10ab); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf9a5f060e1fbbcbc7beb643b113b10ab)): ?>
<?php $component = $__componentOriginalf9a5f060e1fbbcbc7beb643b113b10ab; ?>
<?php unset($__componentOriginalf9a5f060e1fbbcbc7beb643b113b10ab); ?>
<?php endif; ?>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal970725fcc3fb24751031cfb6fb5148ba)): ?>
<?php $attributes = $__attributesOriginal970725fcc3fb24751031cfb6fb5148ba; ?>
<?php unset($__attributesOriginal970725fcc3fb24751031cfb6fb5148ba); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal970725fcc3fb24751031cfb6fb5148ba)): ?>
<?php $component = $__componentOriginal970725fcc3fb24751031cfb6fb5148ba; ?>
<?php unset($__componentOriginal970725fcc3fb24751031cfb6fb5148ba); ?>
<?php endif; ?>
    <?php if(isset($results)): ?>
        <div class="tool-results-wrapper">
            <?php if (isset($component)) { $__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.ad-slot','data' => ['advertisement' => get_advert_model('above-result')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('ad-slot'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['advertisement' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(get_advert_model('above-result'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805)): ?>
<?php $attributes = $__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805; ?>
<?php unset($__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805)): ?>
<?php $component = $__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805; ?>
<?php unset($__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805); ?>
<?php endif; ?>
            <?php if (isset($component)) { $__componentOriginal0e8b16662ac81a14be4700ec450d8cbc = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal0e8b16662ac81a14be4700ec450d8cbc = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.page-wrapper','data' => ['title' => __('common.result')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('page-wrapper'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['title' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(__('common.result'))]); ?>
                <div class="row">
                    <div class="col-md-12">
                        <div class="progress" style="height: 3px;">
                            <div id="conversion-progress" class="progress-bar bg-success" role="progressbar"
                                aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <table class="table table-style">
                            <thead>
                                <tr>
                                    <th width="75">#</th>
                                    <th><?php echo app('translator')->get('common.fileName'); ?></th>
                                    <th></th>
                                    <th width="100"><?php echo app('translator')->get('common.size'); ?></th>
                                    <th width="175"></th>
                                </tr>
                            </thead>
                            <tbody id="processing-files">

                            </tbody>
                        </table>
                    </div>
                    <div class="col-md-12 text-end">
                        <?php if (isset($component)) { $__componentOriginalf9a5f060e1fbbcbc7beb643b113b10ab = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf9a5f060e1fbbcbc7beb643b113b10ab = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.form','data' => ['class' => 'd-none download-all-btn d-inline-block no-app-loader','metho' => 'post','route' => route('tool.postAction', ['tool' => $tool->slug, 'action' => 'download-all'])]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('form'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['class' => 'd-none download-all-btn d-inline-block no-app-loader','metho' => 'post','route' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('tool.postAction', ['tool' => $tool->slug, 'action' => 'download-all']))]); ?>
                            <input type="hidden" name="process_id" value="<?php echo e($results['process_id']); ?>">
                            <?php if (isset($component)) { $__componentOriginala8b20c2a929e5d4303765b144855d57c = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala8b20c2a929e5d4303765b144855d57c = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.download-form-button','data' => ['text' => __('tools.downloadAll')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('download-form-button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['text' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(__('tools.downloadAll'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala8b20c2a929e5d4303765b144855d57c)): ?>
<?php $attributes = $__attributesOriginala8b20c2a929e5d4303765b144855d57c; ?>
<?php unset($__attributesOriginala8b20c2a929e5d4303765b144855d57c); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala8b20c2a929e5d4303765b144855d57c)): ?>
<?php $component = $__componentOriginala8b20c2a929e5d4303765b144855d57c; ?>
<?php unset($__componentOriginala8b20c2a929e5d4303765b144855d57c); ?>
<?php endif; ?>
                         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf9a5f060e1fbbcbc7beb643b113b10ab)): ?>
<?php $attributes = $__attributesOriginalf9a5f060e1fbbcbc7beb643b113b10ab; ?>
<?php unset($__attributesOriginalf9a5f060e1fbbcbc7beb643b113b10ab); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf9a5f060e1fbbcbc7beb643b113b10ab)): ?>
<?php $component = $__componentOriginalf9a5f060e1fbbcbc7beb643b113b10ab; ?>
<?php unset($__componentOriginalf9a5f060e1fbbcbc7beb643b113b10ab); ?>
<?php endif; ?>
                        <?php if (isset($component)) { $__componentOriginalf16071108ab9e9eddc8ccc5ffe6c02e3 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf16071108ab9e9eddc8ccc5ffe6c02e3 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.reload-button','data' => ['link' => route('tool.show', ['tool' => $tool->slug])]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('reload-button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['link' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('tool.show', ['tool' => $tool->slug]))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf16071108ab9e9eddc8ccc5ffe6c02e3)): ?>
<?php $attributes = $__attributesOriginalf16071108ab9e9eddc8ccc5ffe6c02e3; ?>
<?php unset($__attributesOriginalf16071108ab9e9eddc8ccc5ffe6c02e3); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf16071108ab9e9eddc8ccc5ffe6c02e3)): ?>
<?php $component = $__componentOriginalf16071108ab9e9eddc8ccc5ffe6c02e3; ?>
<?php unset($__componentOriginalf16071108ab9e9eddc8ccc5ffe6c02e3); ?>
<?php endif; ?>
                    </div>
                </div>
             <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal0e8b16662ac81a14be4700ec450d8cbc)): ?>
<?php $attributes = $__attributesOriginal0e8b16662ac81a14be4700ec450d8cbc; ?>
<?php unset($__attributesOriginal0e8b16662ac81a14be4700ec450d8cbc); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal0e8b16662ac81a14be4700ec450d8cbc)): ?>
<?php $component = $__componentOriginal0e8b16662ac81a14be4700ec450d8cbc; ?>
<?php unset($__componentOriginal0e8b16662ac81a14be4700ec450d8cbc); ?>
<?php endif; ?>
        </div>
        <?php if (isset($component)) { $__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.ad-slot','data' => ['advertisement' => get_advert_model('below-result')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('ad-slot'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['advertisement' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(get_advert_model('below-result'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805)): ?>
<?php $attributes = $__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805; ?>
<?php unset($__attributesOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805)): ?>
<?php $component = $__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805; ?>
<?php unset($__componentOriginal43e1d90ca5f26d2b3f1aa3bef8ea2805); ?>
<?php endif; ?>
    <?php endif; ?>
    <?php if (isset($component)) { $__componentOriginal6d6c7c82b1aa6d3dea85c61a68ca611a = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal6d6c7c82b1aa6d3dea85c61a68ca611a = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.tool-content','data' => ['tool' => $tool]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('tool-content'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['tool' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($tool)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal6d6c7c82b1aa6d3dea85c61a68ca611a)): ?>
<?php $attributes = $__attributesOriginal6d6c7c82b1aa6d3dea85c61a68ca611a; ?>
<?php unset($__attributesOriginal6d6c7c82b1aa6d3dea85c61a68ca611a); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal6d6c7c82b1aa6d3dea85c61a68ca611a)): ?>
<?php $component = $__componentOriginal6d6c7c82b1aa6d3dea85c61a68ca611a; ?>
<?php unset($__componentOriginal6d6c7c82b1aa6d3dea85c61a68ca611a); ?>
<?php endif; ?>
    <?php if(isset($results)): ?>
        <?php $__env->startPush('page_scripts'); ?>
            <script>
                const APP = function() {
                    let processed = 0;
                    const process_id = '<?php echo e($results['process_id']); ?>',
                        files = <?php echo collect($results['files'])->pick('original_filename', 'size', 'filename')->toJson(); ?>,
                        max_files = 20,
                        route = '<?php echo e(route('tool.postAction', ['tool' => $tool->slug, 'action' => 'process-file'])); ?>',
                        attachEvents = function(cursor) {
                            document.querySelectorAll('.download-file-btn').forEach(button => {
                                button.addEventListener('click', e => {
                                    ArtisanApp.downloadFromUrl(e.target.dataset.url, e.target.dataset.filename)
                                })
                            });
                        },
                        startConversion = async function(files, cursor) {
                                const file = files[cursor]
                                processingNow(file, cursor)
                                await axios.post(route, {
                                    process_id: process_id,
                                    file: file.original_filename,
                                }).then(resp => {
                                    updateProgress(cursor);
                                    showDownload(resp.data, cursor)
                                }).catch(err => {
                                    const cursorElem = document.querySelector(`#file-cursor-${cursor}`)
                                    cursorElem.innerHTML = '<span class="badge bg-danger"><?php echo e(__('common.failed')); ?></span>'
                                })

                                cursor += 1
                                if (cursor < files.length && cursor <= max_files) {
                                    startConversion(files, cursor);
                                } else if (processed > 1) {
                                    document.querySelector('.download-all-btn').classList.remove('d-none')
                                }
                            },
                            processingNow = function(file, index) {
                                const element = document.querySelector('#processing-files');
                                const html = `<tr>
                                        <td>${index+1}</td>
                                        <td><div class="mw-350 text-truncate fw-bold">${file.original_filename}</div></td>
                                        <td><div class="mw-350 text-truncate fw-bold" id="new-name-${index}"></div></td>
                                        <td id="new-size-${index}"></td>
                                        <td id="file-cursor-${index}"><div class="spinner-border" role="status"></div></td>
                                    </tr>`;

                                element.innerHTML += html;
                            },
                            updateProgress = function(cursor) {
                                var progress = (parseInt(cursor + 1) / files.length) * 100;
                                progress = Math.round(progress);

                                document.getElementById('conversion-progress').style.width = progress + '%'
                            },
                            showDownload = function(data, index) {
                                const button =
                                    `<button class="btn btn-outline-primary rounded-pill download-file-btn" type="button" id="download-${index}" data-url="${data.url}" data-filename="${data.filename}">
                                            <?php echo e(__('common.download')); ?>

                                        </button>`
                                if (data.success) {
                                    processed += 1;
                                }
                                document.getElementById('file-cursor-' + index).innerHTML = data.success ? button :
                                    '<span class="badge bg-danger"><?php echo e(__('common.failed')); ?></span>'
                                document.getElementById('new-size-' + index).innerHTML = data.success ? data.size.filesize() :
                                    '-'
                                document.getElementById('new-name-' + index).innerHTML = data.success ? data.filename :
                                    '-'
                                attachEvents()
                            };

                    return {
                        init: function() {
                            if (files.length > 0) {
                                startConversion(files, 0)
                            }
                        }
                    }
                }();
                document.addEventListener("DOMContentLoaded", function(event) {
                    APP.init();
                });
            </script>
        <?php $__env->stopPush(); ?>
    <?php endif; ?>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal0e4a5652a74a6d8a86f69fa9a638424b)): ?>
<?php $attributes = $__attributesOriginal0e4a5652a74a6d8a86f69fa9a638424b; ?>
<?php unset($__attributesOriginal0e4a5652a74a6d8a86f69fa9a638424b); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal0e4a5652a74a6d8a86f69fa9a638424b)): ?>
<?php $component = $__componentOriginal0e4a5652a74a6d8a86f69fa9a638424b; ?>
<?php unset($__componentOriginal0e4a5652a74a6d8a86f69fa9a638424b); ?>
<?php endif; ?>
<?php /**PATH /www/wwwroot/webtoolzone.com/resources/themes/canvas/tools/svg-converter.blade.php ENDPATH**/ ?>